from django.conf.urls import include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
from django.contrib import admin
from django.conf import settings

import views
from core.views import BookmarksList, BookmarkTagList
from core.views import BookmarkCreate, BookmarkUpdate
from core.views import Charts
from api.api import API_Bookmarks, API_RecentBookmarks, API_Tags
import django.contrib.auth.views

admin.autodiscover()

urlpatterns = [
    url(r'^$', BookmarksList.as_view(), name='index'),
    url(r'^tag/(?P<slug>[^/]+)/$', BookmarkTagList.as_view(), name='tag'),
    url(r'^new/$', BookmarkCreate.as_view(), name='bookmark_create'),
    url(r'^edit/(?P<pk>\d+)/$', BookmarkUpdate.as_view(), name='bookmark_update'),
    url(r'^charts/$', Charts.as_view(), name='charts'),
    url(r'^api/all/$', API_Bookmarks.as_view(), name='api_all'),
    url(r'^api/recent/$', API_RecentBookmarks.as_view(), name='api_recent'),
    url(r'^api/tags/$', API_Tags.as_view(), name='api_tags'),
    url(r'^login/$', django.contrib.auth.views.login, name='log_in'),
    url(r'^logout/$', views.log_out, name='log_out'),
    url(r'^admin/logout/$', views.log_out),
    url(r'^admin/', include(admin.site.urls)),

]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

@@ -1,29 +1,24 @@
 from django.
-conf.
 urls import 
@@ -26,19 +26,23 @@
 nclude, 
-url
+re_path
 %0Afrom dj
@@ -190,16 +190,23 @@
 ttings%0A%0A
+from . 
 import v
@@ -210,16 +210,16 @@
 t views%0A
-
 from cor
@@ -485,27 +485,31 @@
 rns = %5B%0A    
-url
+re_path
 (r'%5E$', Book
@@ -544,27 +544,31 @@
 ndex'),%0A    
-url
+re_path
 (r'%5Etag/(?P%3C
@@ -623,27 +623,31 @@
 'tag'),%0A    
-url
+re_path
 (r'%5Enew/$', 
@@ -697,27 +697,31 @@
 eate'),%0A    
-url
+re_path
 (r'%5Eedit/(?P
@@ -784,27 +784,31 @@
 date'),%0A    
-url
+re_path
 (r'%5Echarts/$
@@ -840,35 +840,39 @@
 ='charts'),%0A    
-url
+re_path
 (r'%5Eapi/all/$', 
@@ -909,35 +909,39 @@
 'api_all'),%0A    
-url
+re_path
 (r'%5Eapi/recent/$
@@ -994,27 +994,31 @@
 cent'),%0A    
-url
+re_path
 (r'%5Eapi/tags
@@ -1060,27 +1060,31 @@
 tags'),%0A    
-url
+re_path
 (r'%5Elogin/$'
@@ -1134,27 +1134,31 @@
 g_in'),%0A    
-url
+re_path
 (r'%5Elogout/$
@@ -1192,27 +1192,31 @@
 _out'),%0A    
-url
+re_path
 (r'%5Eadmin/lo
@@ -1244,19 +1244,23 @@
 t),%0A    
-url
+re_path
 (r'%5Eadmi
@@ -1268,16 +1268,8 @@
 /', 
-include(
 admi
@@ -1280,17 +1280,16 @@
 te.urls)
-)
 ,%0A%0A%5D%0A%0Aif

Use re_path for old URL patterns