> urlpatterns = patterns('', > (r'^someurl/', login_required(direct_to_template), { 'template': > 'template.html', }), > )
http://groups.google.com/group/django-users/browse_thread/thread/e9f85ce0666da8c/ Cheers, Ryan http://consulting.ryankaskel.com On Jul 19, 5:31 pm, AKK <andrewkenyon...@gmail.com> wrote: > Hi, i have a login form using the generic view like so: > > (r'^accounts/login/$', 'django.contrib.auth.views.login', > {'template_name': 'blogSite/login.html'}), > > but i only want the form to show up if your not logged in, but since > its is a generic view how can i use > > if not request.user.is_authenticated(): > > as well as the view and also pass the template name. > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---