Hi,
I try to use the class_prepared signal to register permissions on a
model class.
Example: MyModel has a View-Permission. To avoid typos I don't want
to use the string representation of permissions ('myapp_view_mymodel').
I want to use a class attribute (MyModel.PERM_VIEW) in my code.
It seems like a chicken-egg problem: If the class_prepared gets called,
I can't import the model class, since it is not ready:
ImportError: cannot import name MyModel.
If I try to write the code into models.py, I can't create a new db with
syncdb, since the table itself and the entry in the permission table
is not done yet.....
Any suggestions?
Thomas
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---