On Fri, Jan 26, 2018 at 3:01 AM, sum abiut <suab...@gmail.com> 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. > > <.. snip..> > 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), > > ] > > What's confusing you is the '^$' pattern which you believe should be activated if you navigate to "http://localhost:8000/" where in fact this will point to the root url module under your rbv_payslip package. That root url module has a pattern called "userprofile" which in turn includes the url file you posted above. If you look closely at the error you're getting, django is telling you that it could not find the pattern you tried, but it found "admin" and "userprofile". The latter should work for you. Have a look at this part of the tutorial: https://docs.djangoproject.com/en/1.11/intro/tutorial01/#write-your-first-view Regards, -- 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+unsubscr...@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/CAFwtXp2MZDC8Hj7styWQNDWPtJWBCv6D4vsoczVqO094CZXu1Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.