Re: User permissions to see a view

2010-02-19 Thread ALJ
I am restricting access to particular pages. The reports page doesn't have a particular model. It's going to have some 'flat' content and links to lots of other reports. So that is why I was confused. There is no underlying data model for that page. I was going to query rebus's suggestion. I didn'

Re: User permissions to see a view

2010-02-18 Thread rebus_
On 18 February 2010 14:02, Alexey Kostyuk wrote: > Hi ALJ! > > Why can not you add a model 'reports' (in your example) and add the > required permissions? > Also you can add custom permissions[1] to any other models of your app > and use them. > > [1]http://docs.djangoproject.com/en/dev/topics/aut

Re: User permissions to see a view

2010-02-18 Thread Alexey Kostyuk
Hi ALJ! Why can not you add a model 'reports' (in your example) and add the required permissions? Also you can add custom permissions[1] to any other models of your app and use them. [1]http://docs.djangoproject.com/en/dev/topics/auth/#id2 On Thu, 2010-02-18 at 04:29 -0800, ALJ wrote: > Hi Alexe

Re: User permissions to see a view

2010-02-18 Thread ALJ
Hi Rebus, Yeah, I got that, but where do I put the meta permissions? In which model? The user? > #models.py class UserType(models.Model): id = models.CharField(max_length=3, primary_key=True) name = models.CharField(max_length=30)

Re: User permissions to see a view

2010-02-18 Thread rebus_
On 18 February 2010 13:29, ALJ wrote: > Hi Alexey, > > But how do you set a permission for a view? There's no underlying > model to which to add the custom meta permissions. > > ALJ > > On Feb 18, 12:48 pm, Alexey Kostyuk wrote: >> On Thu, 2010-02-18 at 02:30 -0800, ALJ wrote: >> > First project

Re: User permissions to see a view

2010-02-18 Thread ALJ
Hi Alexey, But how do you set a permission for a view? There's no underlying model to which to add the custom meta permissions. ALJ On Feb 18, 12:48 pm, Alexey Kostyuk wrote: > On Thu, 2010-02-18 at 02:30 -0800, ALJ wrote: > > First project and struggling a bit. > > > I have some views that I w

Re: User permissions to see a view

2010-02-18 Thread Alexey Kostyuk
On Thu, 2010-02-18 at 02:30 -0800, ALJ wrote: > First project and struggling a bit. > > I have some views that I want to restrict access to, depending on user > type. How do I do that? > > For example, I have a 'reports' view that I only want teachers to > see ... not students. I can't see how to