RE: showing user data in a view

2009-10-13 Thread Ed Kawas
Thanks, I guess I made it out to be harder than it was. Eddie -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of Brian McKeever Sent: October-12-09 1:20 PM To: Django users Subject: Re: showing user data in a view You could

Re: showing user data in a view

2009-10-12 Thread Brian McKeever
n McKeever > Sent: October-12-09 12:50 PM > To: Django users > Subject: Re: showing user data in a view > > It's the same thing. > > Lets say this is your view: > def x_edit(request, x_id): >     x = X.objects.get(id = x_id) >     if x.user != request.user:

RE: showing user data in a view

2009-10-12 Thread Ed Kawas
die > > -Original Message- > From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] > > On Behalf Of Brian McKeever > Sent: October-12-09 11:52 AM > To: Django users > Subject: Re: showing user data in a view > > The easy way is to just check tha

Re: showing user data in a view

2009-10-12 Thread Brian McKeever
ssage- > From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] > > On Behalf Of Brian McKeever > Sent: October-12-09 11:52 AM > To: Django users > Subject: Re: showing user data in a view > > The easy way is to just check that the owner of X is the u

RE: showing user data in a view

2009-10-12 Thread Ed Kawas
: showing user data in a view The easy way is to just check that the owner of X is the user logged in. I don't know that you can pass an argument to the decorator, but you could certainly just use an if statement. http://docs.djangoproject.com/en/dev/topics/auth/#limiting-access-to-logge

Re: showing user data in a view

2009-10-12 Thread Brian McKeever
The easy way is to just check that the owner of X is the user logged in. I don't know that you can pass an argument to the decorator, but you could certainly just use an if statement. http://docs.djangoproject.com/en/dev/topics/auth/#limiting-access-to-logged-in-users-that-pass-a-test On Oct 12,

showing user data in a view

2009-10-12 Thread Ed
Hi All, I am completely lost. I *think* that I have read most of the doc that i can find and I must be pretty dense, because I cannot figure this one out ... Let me outline what i have and where i want to go! model: # an X class X(db.Model): user = models.ForeignKey(User, unique=True) nam