To add permissions.
For user: user.user_permissions.add(perm)
(I think, don't have the chance to double check) For group:
group.permissions.add(perm)
For your question, the permission table contains the codename, verbose
name and content type of the object. In most cases, you could probably
get
Chris Long escreveu:
> If I have a group instance called students and I wanted to add it to
> the user instance bill I would use:
> bill.groups.add(students)
>
> If you want to have a permission for a view, you will have to use the
> has_perm method that is within the user model
If I have a group instance called students and I wanted to add it to
the user instance bill I would use:
bill.groups.add(students)
If you want to have a permission for a view, you will have to use the
has_perm method that is within the user model (user.has_perm) and check
for the permission you
Hi,
What I want to do is to let users access some views but not others.
Users can fit in groups. I've not set up the admin interface for this
package because I don't find it useful for my purpose, at least yet.
Users can already register themselves for the site. But they will only
be able to
4 matches
Mail list logo