Login

Tag "auto"

Snippet List

Django admin autoregister

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
Read More

Automatically generate admin

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
Read More

automatic urlpattern creator

This method creates urlpatterns based on view functions that have 'request' as their first parameter. See docstring for details.

  • url
  • urlconf
  • patterns
  • auto
  • urlpattern
Read More

Automatic stripping textual form fields

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
Read More

Auto slug field

New field type which allows prepopulate_from to work not only from javascript but in python too. If the slugfield has unique=True creates a unique slug too.

  • slug
  • field
  • auto
  • prepopulate_from
Read More

6 snippets posted so far.