I've already read those papers, but it still helped...it works now ;-) Thanks a lot !
Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT-Entwickler LexisNexis Marxergasse 25, 1030 Wien mailto:[email protected] Tel.: +43 (1) 534 52 - 1573 Fax: +43 (1) 534 52 - 146 -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Martin Melin Gesendet: Montag, 14. Februar 2011 09:45 An: [email protected] Betreff: Re: login-required On Mon, Feb 14, 2011 at 9:40 AM, Szabo, Patrick (LNG-VIE) <[email protected]> wrote: > Hi, > > I've tried using the @login_required decorator to limit acces to a > certain view. > This worked fine. > Unfortunately in the template that you are redirected to if the login > was succesfull I don't have acces to any information like username oder > alike. > > How do I realize that ?! > I'm assuming your question is how you can access the logged-in user's information in subsequent views and templates. If I've misunderstood your question please let me know. You need to make sure that you have the Session and Authentication middlewares installed. Have a look at this link: http://docs.djangoproject.com/en/dev/topics/auth/#authentication-in-web-requests Best regards, Martin Melin > For the login template i used the example shown in the documentation. > > My template looks like this: > > {% extends "main/base_site.html" %} > {% block content %} > <h1> TEST </h1> > <p>...........................</p> > <p>{% firstof request.user.id %}</p> > <p>...........................</p> > {% endblock %} > > Kind regards > > . . . . . . . . . . . . . . . . . . . . . . . . . . > Patrick Szabo > XSLT-Entwickler > LexisNexis > Marxergasse 25, 1030 Wien > > mailto:[email protected] > Tel.: +43 (1) 534 52 - 1573 > Fax: +43 (1) 534 52 - 146 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

