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:
Malcolm Tredinnick 2007-11-29 16:32:09 +00:00
parent b6002d4af6
commit a4ea8d4e93
1 changed files with 2 additions and 2 deletions

View File

@ -469,5 +469,5 @@ def method_get_order(ordered_obj, self):
# HELPER FUNCTIONS (CURRIED MODEL FUNCTIONS) # # HELPER FUNCTIONS (CURRIED MODEL FUNCTIONS) #
############################################## ##############################################
def get_absolute_url(opts, 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) return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self, *args, **kwargs)