Ticket #3291: ticket_3291__revision_6467.diff

File ticket_3291__revision_6467.diff, 635 bytes (added by Ben Slavin, 17 years ago)

Adds ability to pass arguments to get_absolute_url method which are passed through to underlying function

  • django/db/models/base.py

     
    469469# HELPER FUNCTIONS (CURRIED MODEL FUNCTIONS) #
    470470##############################################
    471471
    472 def get_absolute_url(opts, func, self):
    473     return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self)
     472def get_absolute_url(opts, func, self, *args, **kwargs):
     473    return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self, *args, **kwargs)
Back to Top