mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-01 05:54:01 +03:00
allow primary key to be non-numeric
This commit is contained in:
parent
0d213f1439
commit
eef995a21c
|
@ -26,7 +26,7 @@ class ApiEntry(object):
|
|||
)
|
||||
elif issubclass(self.view, InstanceMixin):
|
||||
urlpatterns = patterns('',
|
||||
url(r'^%s%s/(?P<pk>[0-9]+)/$' % (url_prefix, self.resource_name),
|
||||
url(r'^%s%s/(?P<pk>[0-9a-zA-Z]+)/$' % (url_prefix, self.resource_name),
|
||||
self.view.as_view(resource=self.resource),
|
||||
name=self.resource_name + '_change',
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user