Re: Adding a custom permission to the User model

2008-10-30 Thread Benedict Verheyen
Benedict Verheyen wrote: > > Now i need to find out how i can make the syndb command aware of the > models in that subdirectory. Can i trigger this from the __init__.py > file that lives in the main application directory? I added the directory (project.app.modeldir) to the INSTALLED_APPS apps

Re: Adding a custom permission to the User model

2008-10-30 Thread Benedict Verheyen
Benedict Verheyen wrote: > When i do python manage.py syncdb i don't see anything written to the > db. The permission is also not visible from within the users part of the > admin site. I found out that the syncdb command didn't work. I deleted a table and after i did the syncdb, the table

Re: Adding a custom permission to the User model

2008-10-24 Thread Benedict Verheyen
Benedict Verheyen wrote: > Hi, > > I'm trying to specify a custom permission on the User model. > I would use it to delegate control to users over certain models. > > I have an admin.py file where i add this: > > from django.contrib.auth.models import User > ... > class

Adding a custom permission to the User model

2008-10-21 Thread Benedict Verheyen
Hi, I'm trying to specify a custom permission on the User model. I would use it to delegate control to users over certain models. I have an admin.py file where i add this: from django.contrib.auth.models import User ... class UserAdmin(admin.ModelAdmin): class Meta: permissions = (