mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-28 20:44:03 +03:00
update list URL to not match instead of the change url
This commit is contained in:
parent
8837903f83
commit
68487c846b
|
@ -73,7 +73,7 @@ class DjangoRestFrameworkSite(object):
|
|||
prefix += '/'
|
||||
if issubclass(view, ListModelMixin):
|
||||
urlpatterns = patterns('',
|
||||
url(r'^%s%s/' % (prefix,resource_name),
|
||||
url(r'^%s%s/$' % (prefix,resource_name),
|
||||
view.as_view(resource=resource),
|
||||
name=resource_name
|
||||
)
|
||||
|
|
|
@ -143,7 +143,10 @@ class Serializer(object):
|
|||
|
||||
|
||||
def get_related_serializer(self, key):
|
||||
info = _fields_to_dict(self.fields).get(key, None)
|
||||
fields = _fields_to_dict(self.fields)
|
||||
fields.update(_fields_to_dict(self.include))
|
||||
info = fields.get(key, None)
|
||||
|
||||
|
||||
# If an element in `fields` is a 2-tuple of (str, tuple)
|
||||
# then the second element of the tuple is the fields to
|
||||
|
|
Loading…
Reference in New Issue
Block a user