Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 13, 2005 04:29:31

Bryan M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

enforce login on generic views


How do I limit access to a generic view to logged in users?

Bryan

Offline

#2 Nov. 13, 2005 04:50:01

Adrian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

enforce login on generic views


On 11/12/05, Bryan Murdock <> wrote:
> How do I limit access to a generic view to logged in users?

Hey Bryan,

I've added a section to the docs for you:

Limiting access to generic viewshttp://www.djangoproject.com/documentation/authentication/#limiting-access-to-generic-viewsAdrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Offline

#3 Nov. 13, 2005 05:45:33

Bryan M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

enforce login on generic views


On 11/12/05, Adrian Holovaty <> wrote:
>
> On 11/12/05, Bryan Murdock <> wrote:
> > How do I limit access to a generic view to logged in users?
>
> Hey Bryan,
>
> I've added a section to the docs for you:

All for me? I'm...I'm touched.

:-)

After that kind of generosity, I hate to ask more annoying questions,
but is it possible to customize the url of the login page that the
login_required decorator uses? Glancing at the source it doesn't look
like it.

The problem is, I set up my test site with www.example.com/appname so
that plain old apache serves www.example.com/anything_but_appname.
The default of /accounts/login doesn't get sent to django at all for
me.

It's not a huge deal, I put a test for anonymous user in the generic
view wrapper myself. It works very nicely.

Bryan

Offline

#4 Nov. 13, 2005 06:07:35

Ian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

enforce login on generic views


Hi Adrian.
would it be too hard to just stick the 'user login' views in the main codebase?

regards
ian

On 11/13/05, Adrian Holovaty <> wrote:
>
> On 11/12/05, Bryan Murdock <> wrote:
> > How do I limit access to a generic view to logged in users?
>
> Hey Bryan,
>
> I've added a section to the docs for you:
>
> Limiting access to generic views
>http://www.djangoproject.com/documentation/authentication/#limiting-access-to-generic-views>
> Adrian
>
> --
> Adrian Holovaty
> holovaty.com | djangoproject.com | chicagocrime.org
>


--
-- ++61-3-9877-0909
If everything seems under control, you're not going fast enough. -
Mario Andretti

Offline

Board footer

Moderator control

Enjoy the 18th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support