Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit a4ea8d4e939295178b593ebeaf15269b658e8a6a 1 parent b6002d4
@malcolmt malcolmt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/base.py
View
4 django/db/models/base.py
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.