mirror of https://github.com/django/django.git
Fixed #3291 -- Allow calling get_absolute_url() with extra positional and
keyword arguments. Not usually required, but useful for people wanting to write some kinds of customisations. Patch from __hawkeye__. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b6002d4af6
commit
a4ea8d4e93
|
@ -469,5 +469,5 @@ def method_get_order(ordered_obj, self):
|
|||
# HELPER FUNCTIONS (CURRIED MODEL FUNCTIONS) #
|
||||
##############################################
|
||||
|
||||
def get_absolute_url(opts, func, self):
|
||||
return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self)
|
||||
def get_absolute_url(opts, func, self, *args, **kwargs):
|
||||
return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self, *args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue