Problem in urls.py

0

urls.py

#home/urls.py
from django.urls import path, re_path
from home.views import homePageView, dashboardPageView, userPageView, CoinsPageView

urlpatterns = [
    path('',homePageView.as_view(),name='home'),
    re_path('activate/(?P<code_>[a-zA-Z0-9]{15})/(?P<email_>[\w.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})/$', homePageView.activate, name='activate'),
    path('dashboard/', dashboardPageView.as_view(), name='dashboard'),
    path('dashboard/user/', userPageView.as_view(), name='userprofile'),
    re_path('auth/(?P<code_>[a-zA-Z0-9]{12})/(?P<email_>[\w.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})/$', homePageView.autenticate, name='autenticate'),
    path('actualice/$', CoinsPageView.actualice, name="actualice")
]

Why do you give me that error, if I have it defined in my urls ...

    
asked by XBoss 09.07.2018 в 23:44
source

1 answer

1

You have to remove the '$' at the end of the url (it's django 2.)

path('actualice/', CoinsPageView.actualice, name="actualice")
    
answered by 10.07.2018 / 00:27
source