On Sep 5, 2016 6:06 AM, "arun kumar" <arunkumarparunku...@gmail.com> wrote: > > Hi, > > I'm working in Django 1.10 and I got the type error in the below file at this line " url(r'^$', views.dashboard, name = 'dashboard')," > > from django.conf.urls import include, url > from . import views > > urlpatterns = [ > #preview login view > #url(r'^login/$',views.user_login, name='login') > > # logged - in user dashboard > url(r'^$', views.dashboard, name = 'dashboard'), > > #login / logout urls > url(r'^login/$', 'django.contrib.auth.views.login', name='login'), >
Here is where your problem starts. Django 1.10 removed the ability to use string arguments to refer to views. See the deprecation notice in 1.8: https://docs.djangoproject.com/en/1.8/ref/urls/#django.conf.urls.url Import your views and pass them along directly. -James -- 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/CA%2Be%2BciVqSYGyBn0d8zE6FZGuWDCG9P-m_JXtL-83r7U_tNfpTg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.