What does not work: If i create a link (e.g. on domain.tld/main
) with href="#"
i get the link displayed as domain.tld/main#
and not as i wanted it to be as domain.tld/main/#
. I want the consistency as it is displayed on my index page with no url subdirectory as domain.tld/#
.
Configuration:
urls.py
urlpatterns = [
url(r'^$', views.UserLogin),
url(r'^logout$', 'django.contrib.auth.views.logout', {'next_page':'/'}),
url(r'^main$', views.Main),
]
views.py
def Main(request):
if not request.user.is_authenticated():
return HttpResponseRedirect("http://www.domain.tld")
else:
return render(request, "main")