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
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:
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
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
: 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
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,
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
7 matches
Mail list logo