#11891: The attributes of the original get_absolute_url defined in the model is not copied ------------------------------------------+--------------------------------- Reporter: nfg | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: 1.1 Keywords: attributes get_absolute_url | Stage: Unreviewed Has_patch: 1 | ------------------------------------------+--------------------------------- I have made an app that assist in purging upstream web caches and it uses, among other methods, get_absolute_url. Because I don't always want to purge based on get_absolute_url I added an attribute to get_absolute_url named purge. This attribute gets lost because get_absolute_url is changed with the get_absolute_url that do absolute url overrides, curried with the original function. The original function's attributes should be added to the new curried function. {{{ #!python class AModel(models.Model): def get_absolute_url(self): return '/some_url/' get_absolute_url.purge = True }}}
-- Ticket URL: <http://code.djangoproject.com/ticket/11891> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---