Re: Why does my Django project open the same home page irrespective or which url I type?

2018-11-13 Thread Alex Callaway
Thanks! On Monday, November 12, 2018 at 7:06:37 PM UTC-8, Jason wrote: > > you have an ending slash on your login urls, and no ending slash in your > links defined. try adding a trailing slash > -- You received this message because you are subscribed to the Google Groups "Django users" group.

Why does my Django project open the same home page irrespective or which url I type?

2018-11-12 Thread Alex Callaway
In my urlpatterns in the url.py file of my app, I have two pages: from django.urls import path, re_path from django.conf.urls import url from . import views from django.contrib.auth.views import LoginView urlpatterns=[ re_path(r'^$',views.home, name='home'), path('login/', LoginView.as_view(templ

Re: TypeError at /users/login/ login() got an unexpected keyword argument 'template_name'

2018-11-12 Thread Alex Callaway
> > path('login/', auth_views.LoginView.as_view(), name='login'), How does it re-direct to which page to open in above method? How does it open the template the user wanted here? He is trying to open the page 'users/login.html' when users type: http://127.0.0.1/login/ on the browser. I have