Snippet List
Official GitHub page: https://github.com/Mimino666/django-admin-autoregister
One call to autoregister_admin() automatically creates and registers admin views for all the models in the specified module with intelligent linking between ForeignKey, OneToOneField and ManyToManyField fields.
- models
- admin
- auto
- autoregister
A management command to automatically generate a fully specified admin for the models in a specific app.
It automatically generates raw_id_fields, search_fields, list_filter and more. It bases this on date fields, fields named as "name" or slug.
Usage: ./manage admin_autogen <model>
- django
- scaffold
- auto
- django-admin
- automatic
- generation
- generate
See code
- zipfile
- auto
- writedir
- py
- pyc
Here is a class decorator that allows not to bother with stripping leading and trailing white space from user input provided via forms. This could be a temporary solution for an issue addressed in the ticket [#6362](http://code.djangoproject.com/ticket/6362).
The documentation is provided in the form of doctest. The decorator works with `ModelForm`'s just as well as with ordinary forms.
Note however that this is not a 100% panacea. Your models still could become malformed if theirs data is obtained from another source, not forms.
- newforms
- forms
- strip
- auto
6 snippets posted so far.