Re: Adding a URL tagging feature

2015-09-29 Thread Atul Bhouraskar
Thanks Marc& Shai for taking the time to look at this. Apologies for the late response as I was busy. Yes, I agree that decorators can be used to tag urls, however I think that the way that the URL rework code applies decorators can be improved. The reason I've called the decorators approach 'hea

Re: Adding a URL tagging feature

2015-09-28 Thread Shai Berger
Assume decorators, then, more or less: def tagged(*tags): def decorate(view): @functools.wraps(view) def decorated(*args, **kw): view(*args, **kw) decorated.tags = tags return decorated return d

Re: Adding a URL tagging feature

2015-09-18 Thread Marc Tamlyn
Some quick thoughts: - I'm unconvinced that selecting urls by a given type is a common use case - can you expand on that? - Implementing the detection and usage of tags as middleware seems not as nice as in decorators to me, especially as the middleware tree can be... unpredictable in its behaviou

Adding a URL tagging feature

2015-09-17 Thread Atul Bhouraskar
I've received a few comments on Ticket #25409 and so I'm opening up the discussion here. The pull request is https://github.com/django/django/pull/5309 Apologies for the long post, just wanted to be as clear I could! The objectives of the discussion are to determine: 1. Is this something that co