Writing a custom auth system (like the default django auth system), use it to generate tables in DB
Posted
by dotty
on Stack Overflow
See other posts from Stack Overflow
or by dotty
Published on 2010-03-18T12:59:28Z
Indexed on
2010/03/18
13:01 UTC
Read the original article
Hit count: 257
Hay all, I've been reading up on middleware and how to use it with a context object. I want to write a simple middleware class which i can use on my own applications, it will essentially be a cut down version of the django one.
The problem i seem to have is that if i have
INSTALLED_APPS = ('django.contrib.my_auth')
in the settings file, all is well. I've also added
MIDDLEWARE_CLASSES = ('django.contrib.my_auth.middleware.MyAuthMiddleware')
in it and everything is fine.
My question is, how would i make my middleware automatically generate tables from a models.py module, much like how the django auth does when i run manage.py syncdb?
thanks
© Stack Overflow or respective owner