Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 1.39 KB

README.md

File metadata and controls

53 lines (31 loc) · 1.39 KB

Django Samples

Provides some boilerplate code for commons operations in Django If like me you always use django, you may that a lot of tasks are just repetitive. This extension will solve the issue for you with a simple !cmd + TAB and your up and running with a full sample.

Alt text

Shortcuts/Commands

Command Function
!fbv Creates a function based view
!cbv Creates a class based view
!form Provides a sample for forms.Form
!modelForm Provides a sample for model.ModelForm
!model Provides a sample for model.Model
!email Send email with one line
!c_email Generates a function to send email with alternatives
!paginate Provides a simple pagination code
!django_pdf Generate pdf from html
!object_404 Get Object or 404
!list_404 Get List or 404
!f_field Provides a ForeignKeyField sample
!c_field Provides a Charfield sample
!m2m_field Provides a ManyToMany field sample

Requirements

Note that xhtml2pdf.pisa is used to render pdf from html, you may want to install it for this to work.

Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

Release Notes

This is my first extension, hope you find it useful.

1.2.0

Initial release of Django Samples

Enjoy!