Hi folks, I am a little confused with the ordering of the post_syncdb
signal? (using 1.2.4)

Looking at the code in auth and contenttype, what makes
auth.permission so sure that the appropriate content type was created
before the necessary permission is created?

Similarly, I have another app called 'payment', and inside my
management/__init__.py, i have the following:

from django.contrib.auth.models import Group, Permission
import payment.models as payModels

def init_permissions(sender, **kwargs):
    """ initialization when appliation starts """
    agents = Group.objects.get(name = "agents")
    import pdb
    pdb.set_trace()
    if not
agents.permissions.filter(codename="can_buy_package").exists():
        perm = Permission.objects.get(codename="can_buy_package")
        agents.permissions.add(perm)

post_syncdb.connect(init_permissions, sender=payModels)

I couldn't get this to work because the permissions were not created
for my models at this stage. So, how is the ordering of the
post_syncdb executed?

-- 
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.

Reply via email to