Login

Tag "django-admin"

Snippet List

Django-admin autoregister -- automatic model registration

Automatically register models for the Django-admin. This snippet aids in the process of keeping your admin.py up-to-date with the models in your apps, have all models automatically added to the admin and reflect any future changes without updating the file. [zweckdev.com](http://zweckdev.com/)

  • django
  • models
  • admin
  • model
  • django-admin
  • autoregister
  • auto-register
Read More

Extended logging module

The django_admin_log only logs changes, not simple requests. Sometimes it can be useful to log when a user of your admin interface is checking out important data, for instance if you are making a system with personal sensitive data, that needs to comply with government / company policies. This will log such hits to the django_admin_log by overriding the change_view method in ModelAdmin. So you must override this method in all classes you want to have logged.

  • log
  • request
  • logging
  • django-admin
  • django_admin_log
  • extended
  • change_view
Read More

backupdb command

`backupdb` command allows to make a database backup automatically. It's supposed to do this just before a `syncdb`, `reset` or `flush` command in a server deployment. A usual upgrade task in production server could be: ./manage.py backupdb ./manage.py reset myapp ./manage.py syncdb Put this code in your project's `management/commands/backupdb.py` file.

  • management
  • command
  • django-admin
Read More

18 snippets posted so far.