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.
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 |
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 |
Note that xhtml2pdf.pisa is used to render pdf from html, you may want to install it for this to work.
Calling out known issues can help limit users opening duplicate issues against your extension.
This is my first extension, hope you find it useful.
Initial release of Django Samples
Enjoy!