Sunday, January 28, 2018

Re: url issues

Thanks heaps manage to fix it.



On Fri, Jan 26, 2018 at 6:34 PM, <rajendran.p@rxprism.com> wrote:
def login(request):
    return render(request,'login.html')

On Friday, January 26, 2018 at 6:33:07 AM UTC+5:30, suabiut wrote:
Hi,
i am having some issues with my url pattern. i can't seem to figure out the problem. i am running django 1.11.

i have an app name userprofile which automatically create user profiles on user creation. I have create a login template to allow users to login in before i can direct them to update their profile but i cannot seem to access the login page.

i get this below error

Inline image 1

view.py
def login(request):
    return render(request,'login.html')



urls.py
from django.conf.urls import url
from django.contrib import admin

from . import views


urlpatterns = [
    url(r'^$',views.login,name='login'),

    #url('', views.edit_user),
    url(r'success/$', views.success),

]


cheers

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/636f672a-7ab9-4853-892b-374e1b16f461%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPCf-y5Xor4Ykd7eputBtpXACPo0%3D0ASRqAcB-A9rPiJ3EcF3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment