from django.conf.urls import url
from django.views import generic

from . import views

app_name = 'main'
urlpatterns = [
    url(r'^$', views.AboutView.as_view(), name='about'),
    url(r'^chas/$', views.AboutChasView.as_view(), name='chas'),
    url(r'^evan/$', views.AboutEvanView.as_view(), name='evan'),
]

from django.urls import include, path

from . import views

app_name = 'main'
urlpatterns = [
    path('', views.AboutView.as_view(), name='about'),
    path('chas/', views.AboutChasView.as_view(), name='chas'),
    path('evan/', views.AboutEvanView.as_view(), name='evan'),
]

Move some urlpatterns to DJango 2.0 preferred method
Move some urlpatterns to DJango 2.0 preferred method

+ from django.urls import include, path
- from django.conf.urls import url
- from django.views import generic
  
  from . import views
  
  app_name = 'main'
  urlpatterns = [
-     url(r'^$', views.AboutView.as_view(), name='about'),
+     path('', views.AboutView.as_view(), name='about'),
-     url(r'^chas/$', views.AboutChasView.as_view(), name='chas'),
+     path('chas/', views.AboutChasView.as_view(), name='chas'),
-     url(r'^evan/$', views.AboutEvanView.as_view(), name='evan'),
+     path('evan/', views.AboutEvanView.as_view(), name='evan'),
  ]
  
Move some urlpatterns to DJango 2.0 preferred method
## Code Before:
from django.conf.urls import url
from django.views import generic

from . import views

app_name = 'main'
urlpatterns = [
    url(r'^$', views.AboutView.as_view(), name='about'),
    url(r'^chas/$', views.AboutChasView.as_view(), name='chas'),
    url(r'^evan/$', views.AboutEvanView.as_view(), name='evan'),
]

## Instruction:
Move some urlpatterns to DJango 2.0 preferred method
## Code After:
from django.urls import include, path

from . import views

app_name = 'main'
urlpatterns = [
    path('', views.AboutView.as_view(), name='about'),
    path('chas/', views.AboutChasView.as_view(), name='chas'),
    path('evan/', views.AboutEvanView.as_view(), name='evan'),
]
