Skip to content

Commit

Permalink
Drop string view arguments (django 1.10 compat)
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-m authored and brianmay committed Feb 11, 2016
1 parent ff360e9 commit 39221d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions example_project/posts/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from guardian.compat import url

from posts import views

urlpatterns = [
'posts.views',
url(r'^$', view='post_list', name='posts_post_list'),
url(r'^(?P<slug>[-\w]+)/$', view='post_detail', name='posts_post_detail'),
url(r'^$', views.post_list, name='posts_post_list'),
url(r'^(?P<slug>[-\w]+)/$', views.post_detail, name='posts_post_detail'),
]
4 changes: 2 additions & 2 deletions example_project/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from guardian.compat import include, url, handler404, handler500
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.views import logout

__all__ = ['handler404', 'handler500']

Expand All @@ -9,8 +10,7 @@

urlpatterns = [
(r'^admin/', include(admin.site.urls)),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'},
name='logout'),
url(r'^logout/$', logout, {'next_page': '/'}, name='logout'),
(r'^', include('posts.urls')),
]

Expand Down

0 comments on commit 39221d6

Please sign in to comment.