Skip to content

Commit

Permalink
removed urls.W002 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ar4s committed Mar 26, 2016
1 parent 321b05f commit d9ce1eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions dedal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
ACTION_CREATE, ACTION_READ, ACTION_UPDATE, ACTION_DELETE, ACTION_LIST = ACTIONS
ACTIONS_REQUIRED_OBJ = set((ACTION_READ, ACTION_UPDATE, ACTION_DELETE))
ACTIONS_RE = {
ACTION_LIST: r'^s/$',
ACTION_CREATE: r'^/{}/$'.format(ACTION_CREATE),
ACTION_READ: r'^/(?P<pk>\d+)/$',
ACTION_UPDATE: r'^/(?P<pk>\d+)/{}/$'.format(ACTION_UPDATE),
ACTION_DELETE: r'^/(?P<pk>\d+)/{}/$'.format(ACTION_DELETE),
ACTION_LIST: r'^list$',
ACTION_CREATE: r'^{}/$'.format(ACTION_CREATE),
ACTION_READ: r'^(?P<pk>\d+)/$',
ACTION_UPDATE: r'^(?P<pk>\d+)/{}/$'.format(ACTION_UPDATE),
ACTION_DELETE: r'^(?P<pk>\d+)/{}/$'.format(ACTION_DELETE),
}
2 changes: 1 addition & 1 deletion dedal/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_urls(self):
]
for model, dedal in self._register.items():
urlpatterns += [
url(r'^{}'.format(
url(r'^{}/'.format(
model.__name__.lower()
), include(dedal.urls))
]
Expand Down

0 comments on commit d9ce1eb

Please sign in to comment.