Commit c0674e36 by Tom Christie

Drop implicit 'pk' on last arg in urlconf. (Too magical).

parent 765ec0b7
...@@ -507,11 +507,6 @@ class ModelMixin(object): ...@@ -507,11 +507,6 @@ class ModelMixin(object):
if BaseRenderer._FORMAT_QUERY_PARAM in tmp: if BaseRenderer._FORMAT_QUERY_PARAM in tmp:
del tmp[BaseRenderer._FORMAT_QUERY_PARAM] del tmp[BaseRenderer._FORMAT_QUERY_PARAM]
if args:
# If we have any no kwargs then assume the last arg represents the
# primrary key. Otherwise assume the kwargs uniquely identify the
# model.
tmp.update({'pk': args[-1]})
return Q(**tmp) return Q(**tmp)
def get_instance_data(self, model, content, **kwargs): def get_instance_data(self, model, content, **kwargs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment