If you have a model with foreign key to User, you can use this manager to show (i.e. in admin interface) only objects, that are related to currently logged-in user. Superuser sees all objects, not only his.
Requires: [ThreadlocalsMiddleware](http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser)
This is another foreign key to User model. User is automatically associated before save.
Requires: [ThreadlocalsMiddleware](http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser)
Inspired by: [snippet 509](http://www.djangosnippets.org/snippets/509/)
This example shows, how to use database views with django models. NewestArticle models contains 100 newest Articles. Remember, that NewestArticle model is read-only. Tested with mysql.
With these models, you can use your Django's database directly as backend for PowerDNS server (tested with MySQL).
License: GNU GPL.
More info:
http://downloads.powerdns.com/documentation/html/configuring-db-connection.html#CONFIGURING-MYSQL
This is my first snipplet. With this, you can manage your models in console using ncurses Dialog or Whiptail or XDialog. Models are auto-discovered. You can browse, edit, add and delete models. Bugreports very welcome.