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

from . 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
@@ -81,54 +81,8 @@
 tic%0A
-from django.views.generic import TemplateView%0A
 from
@@ -439,27 +439,31 @@
 rns = %5B%0A    
-url
+re_path
 (r'%5E$', Book
@@ -498,27 +498,31 @@
 ndex'),%0A    
-url
+re_path
 (r'%5Etag/(?P%3C
@@ -577,27 +577,31 @@
 'tag'),%0A    
-url
+re_path
 (r'%5Enew/$', 
@@ -651,27 +651,31 @@
 eate'),%0A    
-url
+re_path
 (r'%5Eedit/(?P
@@ -738,27 +738,31 @@
 date'),%0A    
-url
+re_path
 (r'%5Echarts/$
@@ -794,35 +794,39 @@
 ='charts'),%0A    
-url
+re_path
 (r'%5Eapi/all/$', 
@@ -863,35 +863,39 @@
 'api_all'),%0A    
-url
+re_path
 (r'%5Eapi/recent/$
@@ -948,27 +948,31 @@
 cent'),%0A    
-url
+re_path
 (r'%5Eapi/tags
@@ -1014,27 +1014,31 @@
 tags'),%0A    
-url
+re_path
 (r'%5Elogin/$'
@@ -1088,27 +1088,31 @@
 g_in'),%0A    
-url
+re_path
 (r'%5Elogout/$
@@ -1146,27 +1146,31 @@
 _out'),%0A    
-url
+re_path
 (r'%5Eadmin/lo
@@ -1198,19 +1198,23 @@
 t),%0A    
-url
+re_path
 (r'%5Eadmi
@@ -1222,16 +1222,8 @@
 /', 
-include(
 admi
@@ -1234,17 +1234,16 @@
 te.urls)
-)
 ,%0A%0A%5D%0A%0Aif

Update URL syntax