On Jul 20, 2006, at 1:49 PM, Josh Trutwin wrote:
> I was browsing through the docs and tutorials but I'm not sure what
> is the best place to look for how to implement the login portion.
> I imagine this would require some use of sessions.
>
> Any tips/pointers?

The auth docs are probably the best place to start: http:// 
www.djangoproject.com/documentation/authentication/.

Here's a quick example of a way you might do a page that requires  
login and only shows the logged-in user her own reports:

        @login_required
        def report_list(request):
                context = {"reports" : 
Report.objects.filter(owner=request.user)}
                return render_to_response("report_list.html", context)

(assuming, of course, a ``Report`` object with an ``owner`` FK to  
``auth.User``)

Good luck!

Jacob

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to