Re: [Django] #16774: Backtracking URL resolver

2024-03-18 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  Nowell Strite  |Owner:  (none)
 Type:  New feature|   Status:  new
Component:  Core (URLs)|  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Ülgen Sarıkavak):

 * cc: Ülgen Sarıkavak (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e5060c5f3-4b223dc4-76b7-400c-a10c-7edddfffacf4-00%40eu-central-1.amazonses.com.


Re: [Django] #16774: Backtracking URL resolver

2021-05-07 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  Nowell Strite  |Owner:  (none)
 Type:  New feature|   Status:  new
Component:  Core (URLs)|  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Tijani-Dia):

 * owner:  Tijani-Dia => (none)
 * status:  assigned => new


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5153da54effc13be75511644b261ea5c%40djangoproject.com.


Re: [Django] #16774: Backtracking URL resolver

2021-05-07 Thread Django
#16774: Backtracking URL resolver
---+--
 Reporter:  Nowell Strite  |Owner:  Tijani-Dia
 Type:  New feature|   Status:  assigned
Component:  Core (URLs)|  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Tijani-Dia):

 Thanks for the feedback, Adam.

 Alright, I liked working on it but I understand that it may no longer be a
 much-desired feature.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5856c4af02d48764e46199f95befdbc2%40djangoproject.com.


Re: [Django] #16774: Backtracking URL resolver

2021-05-06 Thread Django
#16774: Backtracking URL resolver
---+--
 Reporter:  Nowell Strite  |Owner:  Tijani-Dia
 Type:  New feature|   Status:  assigned
Component:  Core (URLs)|  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Adam Johnson):

 Well done for reviving an old ticket Tijani-Dia

 I think I'm against this feature. It won't interact work with
 Middleware.process_view() particularly well at all. For example, atomic
 requests, as [https://groups.google.com/g/django-
 developers/c/UQZmLNzlDcw/m/8NfZxMOMEQAJ Florian mentioned on django-
 developers], or `@csrf_exempt`.

 Also there's a potential footgun: if a view raises `DoesNotResolve` at a
 very late stage, the view could have had many side effects but then be
 less visible in logging or APM traces.

 I think the already-suggested solution of one view that calls other
 subviews is sensible for most situations.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b31ca78624c260681a7d548de348deb2%40djangoproject.com.


Re: [Django] #16774: Backtracking URL resolver

2021-05-01 Thread Django
#16774: Backtracking URL resolver
---+--
 Reporter:  Nowell Strite  |Owner:  Tijani-Dia
 Type:  New feature|   Status:  assigned
Component:  Core (URLs)|  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Tijani-Dia):

 I've tried to put everything said here in this patch https://github.com
 /Tijani-Dia/django/tree/ticket_16774.
 Let me know what you think about it.

 I also made the following patch https://github.com/Tijani-
 Dia/django/tree/ticket_22425 which adresses
 https://code.djangoproject.com/ticket/22425
 I am putting it here since the two tickets are closely related.

 I am ready to make any changes necessary/write docs for both tickets.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.cfcaa2c8a78a927321f7cc72456f087d%40djangoproject.com.


Re: [Django] #16774: Backtracking URL resolver

2021-05-01 Thread Django
#16774: Backtracking URL resolver
---+--
 Reporter:  Nowell Strite  |Owner:  Tijani-Dia
 Type:  New feature|   Status:  assigned
Component:  Core (URLs)|  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Tijani-Dia):

 * owner:  nobody => Tijani-Dia
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5edf718dcb60f58336c710b778a85be6%40djangoproject.com.


Re: [Django] #16774: Backtracking URL resolver

2015-05-24 Thread Django
#16774: Backtracking URL resolver
-+
 Reporter:  nbstrite |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Core (URLs)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+
Changes (by knbk):

 * component:  HTTP handling => Core (URLs)


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.fccf27b62bc399981f8572a95a4891de%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #16774: Backtracking URL resolver

2014-02-05 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Kronuz):

 When using a generator, as it did before, patch for #16774 wasn't
 resolving nested patterns like the following because the generator for the
 first pattern`r'^nestred/'` had already been extracted from the generator
 by the second try (so HTTP 404 was returned instead of HttpResponse "OK"):

 {{{#!python

 def response_view():
 return HttpResponse("OK")

 def does_not_resolve_view():
 raise DoesNotResolve

 urlpatterns += patterns('',
 (r'^nested/', include(patterns('',
 (r'^overlapping_view/$', does_not_resolve_view),
 (r'^overlapping_view/$', response_view),
 ))),
 )
 }}}

 I'm attaching a patch with tests.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d079d602e3f92885affbea79a053d285%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #16774: Backtracking URL resolver

2014-02-04 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Kronuz):

 The problem with using a generator is when the url patterns are themselves
 resolvers (includes) and one wants to skip, for example, the first match
 in that nested resolver, but not the second. At this point, when the
 DoesNotResolve exception is caught the generator would not allow trying
 the nested "unfinished" resolver once again, where it left and where it
 would march the second url.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.23195f086366b6d2f6f1bb34f25fb9f4%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #16774: Backtracking URL resolver

2014-01-24 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Kronuz):

 * cc: german.mb@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b74fa2ff8d9fb1b18bead96d5b00c5bc%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #16774: Backtracking URL resolver

2013-05-31 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by timo):

 https://github.com/django/django/pull/378

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.2273b44ee51a170ee72d6bb8e5ed1903%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2012-12-30 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by apollo13):

 * needs_docs:  0 => 1
 * version:  1.3 => master


-- 
Ticket URL: 
Django 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2012-09-17 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by meric):

 Forum thread: https://groups.google.com/d/topic/django-
 developers/BAk5pGb7zE8/discussion

-- 
Ticket URL: 
Django 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2012-09-13 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by meric):

 I have continued to work on the patch here:
 https://github.com/meric/django/compare/ticket_16774

-- 
Ticket URL: 
Django 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2012-09-12 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Eric Man ):

 * owner:  meric => nobody


-- 
Ticket URL: 
Django 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2012-09-12 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  meric
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Eric Man ):

 * owner:  nobody => meric


Comment:

 Replying to [comment:10 anonymous]:

-- 
Ticket URL: 
Django 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2012-09-12 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by meric):

 * owner:  anonymous => nobody


-- 
Ticket URL: 
Django 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2012-09-12 Thread Django
#16774: Backtracking URL resolver
---+-
 Reporter:  nbstrite   |Owner:  anonymous
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+-
Changes (by meric):

 * owner:  meric => anonymous


-- 
Ticket URL: 
Django 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2012-09-12 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  meric
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by anonymous):

 This patch is naive and cannot get around this problem:

 "However, I suspect that this could cause some problems when people need
 to resolve a URL in their own code (not as part of the normal
 request/view/response machinery)."

 But it uses generators and has the functionality enabled by default and
 named the exception to be raised as ```urlresolvers.DoesNotResolve```.

-- 
Ticket URL: 
Django 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2012-09-12 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  meric
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by anonymous):

 * owner:  nobody => meric


-- 
Ticket URL: 
Django 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #16774: Backtracking URL resolver

2011-11-14 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by julien):

 * needs_better_patch:  0 => 1


Comment:

 The patch looks great. Nice work! I've updated it to current trunk.

 I had a few remarks and questions regarding the implementation:

 * Would it be possible to implement the generator as a class rather than a
 private method of `RegexURLResolver`, or even merge it with
 `ResolverMatches`? That would seem cleaner.
 * Shouldn't the backtracking functionality be enabled by default, i.e.
 done by `RegexURLResolver.resolve()` itself, since it is meant to be
 backwards-compatible? I'm not sure we need two separate methods
 (`resolve()` and `backtracking_resolve()`).
 * The 'peeking' implementation in `ResolverMatches` feels a bit
 convoluted. Could it be simplified by using a buffer? See:
 http://stackoverflow.com/questions/1517862/using-lookahead-with-
 generators/1517965#1517965
 * I'm not sure `ContinueResolving` is a good name for the exception, since
 the exception is meant to be raised by the view and the name is quite
 suggestive about the implementation that happens outside of the view (i.e.
 in the resolver). As far as the view is concerned, the only thing it cares
 to say is "Do not use me", or "Skip me", so a name like `SkipView`, for
 example, would seem more appropriate.

 Other than that, I think it's already in great shape and it's getting
 pretty close!

-- 
Ticket URL: 
Django 
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.



Re: [Django] #16774: Backtracking URL resolver

2011-11-10 Thread Django
#16774: Backtracking URL resolver
---+
 Reporter:  nbstrite   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  HTTP handling  |  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by anonymous):

 Replying to [comment:6 jacob]:
 > I've wanted this feature since literally before Django was open sourced.
 Alex agrees this is a good idea. Marking accepted.
 >
 > I should note that we probably should use a completely new exception to
 avoid any possible backwards incompatibilities (and provide a better-
 reading API. Maybe something along the lines of `ContinueResolving` or
 something.

 Any chance of this being accepted and merged?

-- 
Ticket URL: 
Django 
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.



Re: [Django] #16774: Backtracking URL resolver

2011-09-17 Thread Django
#16774: Backtracking URL resolver
---+---
   Reporter:  nbstrite |  Owner:  nobody
   Type:  New feature  | Status:  new
  Milestone:   |  Component:  HTTP handling
Version:  1.3  |   Severity:  Normal
 Resolution:   |   Keywords:
   Triage Stage:  Accepted |  Has patch:  1
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+---

Comment (by nbstrite):

 Replying to [comment:6 jacob]:
 > I've wanted this feature since literally before Django was open sourced.
 Alex agrees this is a good idea. Marking accepted.
 >
 > I should note that we probably should use a completely new exception to
 avoid any possible backwards incompatibilities (and provide a better-
 reading API. Maybe something along the lines of `ContinueResolving` or
 something.

 Hey Jacob, I Implemented your suggestion and separated the exception off
 into it's own subclass of Resolver404 called ContinueResolving to provide
 a cleaner API as well as ensure no possible backwards incompatibility. Any
 suggestions on where you would like this functionality documented? In
 docs/topics/http/urls.txt? I can take a stab at docs if you like.

 Thanks!
 Nowell

-- 
Ticket URL: 
Django 
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.



Re: [Django] #16774: Backtracking URL resolver

2011-09-16 Thread Django
#16774: Backtracking URL resolver
---+---
   Reporter:  nbstrite |  Owner:  nobody
   Type:  New feature  | Status:  new
  Milestone:   |  Component:  HTTP handling
Version:  1.3  |   Severity:  Normal
 Resolution:   |   Keywords:
   Triage Stage:  Accepted |  Has patch:  1
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+---
Changes (by jacob):

 * stage:  Design decision needed => Accepted


Comment:

 I've wanted this feature since literally before Django was open sourced.
 Alex agrees this is a good idea. Marking accepted.

 I should note that we probably should use a completely new exception to
 avoid any possible backwards incompatibilities (and provide a better-
 reading API. Maybe something along the lines of `ContinueResolving` or
 something.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #16774: Backtracking URL resolver

2011-09-09 Thread Django
#16774: Backtracking URL resolver
-+-
   Reporter:  nbstrite   |  Owner:  nobody
   Type:  New| Status:  new
  feature|  Component:  HTTP handling
  Milestone: |   Severity:  Normal
Version:  1.3|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Design |Needs tests:  0
  decision needed|  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by nbstrite):

 * has_patch:  0 => 1


Comment:

 Replying to [comment:2 russellm]:
 > As for the issue itself: DDN is the right result, but I'm not sure it's
 for the right reason. My concern is over backwards compatibility -- a
 valid URLpatterns file that currently rejects a request could, if this
 change were adopted, result in a view actually being served. I'm not
 entirely certain that this is a bad thing --  it's really an ambiguity of
 the original URLpattern -- but it's worth some deeper consideration.

 @russellm: I'm not sure I understand the backwards incompatible concern.
 Any view written prior to this feature will never raise a Resolver404
 exception, and therefore the URL Resolver process will terminate with the
 existing view. Only in the case of a view being written to take advantage
 of this feature will trigger the URL resolver to act in the new fashion.
 As far as I can tell, this feature it totally backwards compatible. Here
 is a contrived example of how to leverage this new feature:


 {{{
 def legacy_url_redirect_view(request, path):
 try:
 redirect = DummyRedirectModel.objects.get(old_path=path)
 except: DummyRedirectModel.DoesNotExist:
 raise Resolver404
 else:
 return HttpResponsePermanentRedirect(redirect.new_path)
 }}}

 @mrmachine  The default urlresolvers.resolve method still works in the
 backwards compatible way (it only returns the first matching regex result
 (and does not try and decent into calling the view, etc.) it works exactly
 as it did before, with no backwards incompatibility. It does add a new
 method urlresolvers.backtracking_resolve that an implementor can call that
 returns a generator that the implementor can use to leverage the
 backtracking ability)

 Does this make sense? Do you see any wholes in the basic logic/backwards
 compatible construction?

 Thanks!
 Nowell Strite

-- 
Ticket URL: 
Django 
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.



Re: [Django] #16774: Backtracking URL resolver

2011-09-09 Thread Django
#16774: Backtracking URL resolver
-+-
   Reporter:  nbstrite   |  Owner:  nobody
   Type:  New| Status:  new
  feature|  Component:  HTTP handling
  Milestone: |   Severity:  Normal
Version:  1.3|   Keywords:
 Resolution: |  Has patch:  0
   Triage Stage:  Design |Needs tests:  0
  decision needed|  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-

Comment (by jezdez):

 Replying to [comment:2 russellm]:
 > @mrmachine -- Github pull requests are an accepted form of contribution.
 I'm not 100% certain that this is laid out in our contribution guide; if
 it isn't, it should be. We have official mirrors on Github and BitBucket
 for a reason. The link provided can be trivially used to show a patch
 (click on the "diff" button above the changelist).

 This isn't how I remembered the discussion about it (and not what I've
 been telling people for the last couple of months). Github and Bitbucket
 only host mirrors for the ease of diff creation. Trac (and patches) are
 still the preferred form of contribution.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #16774: Backtracking URL resolver

2011-09-09 Thread Django
#16774: Backtracking URL resolver
-+-
   Reporter:  nbstrite   |  Owner:  nobody
   Type:  New| Status:  new
  feature|  Component:  HTTP handling
  Milestone: |   Severity:  Normal
Version:  1.3|   Keywords:
 Resolution: |  Has patch:  0
   Triage Stage:  Design |Needs tests:  0
  decision needed|  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-

Comment (by aaugustin):

 @russellm: I worked the contributing guide in #16469 and I think it
 doesn't mention that pull requests are acceptable => #16777.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #16774: Backtracking URL resolver

2011-09-09 Thread Django
#16774: Backtracking URL resolver
-+-
   Reporter:  nbstrite   |  Owner:  nobody
   Type:  New| Status:  new
  feature|  Component:  HTTP handling
  Milestone: |   Severity:  Normal
Version:  1.3|   Keywords:
 Resolution: |  Has patch:  0
   Triage Stage:  Design |Needs tests:  0
  decision needed|  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-

Comment (by russellm):

 @mrmachine -- Github pull requests are an accepted form of contribution.
 I'm not 100% certain that this is laid out in our contribution guide; if
 it isn't, it should be. We have official mirrors on Github and BitBucket
 for a reason. The link provided can be trivially used to show a patch
 (click on the "diff" button above the changelist).

 As for the issue itself: DDN is the right result, but I'm not sure it's
 for the right reason. My concern is over backwards compatibility -- a
 valid URLpatterns file that currently rejects a request could, if this
 change were adopted, result in a view actually being served. I'm not
 entirely certain that this is a bad thing --  it's really an ambiguity of
 the original URLpattern -- but it's worth some deeper consideration.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #16774: Backtracking URL resolver

2011-09-08 Thread Django
#16774: Backtracking URL resolver
-+-
   Reporter:  nbstrite   |  Owner:  nobody
   Type:  New| Status:  new
  feature|  Component:  HTTP handling
  Milestone: |   Severity:  Normal
Version:  1.3|   Keywords:
 Resolution: |  Has patch:  0
   Triage Stage:  Design |Needs tests:  0
  decision needed|  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by mrmachine):

 * needs_better_patch:   => 0
 * has_patch:  1 => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Design decision needed


Comment:

 I have had a need for multiple catch-all views in my own projects. I solve
 the problem in my own code by creating a single catch-all view that
 executes the others in sequence, continuing until one returns a valid
 response and raising Http404 if all fail.

 This is somewhat similar to middleware that handles Http404 responses, but
 I needed to implement this as a catch-all URL and view because one of the
 catch-all views needed to determine the requested app name and namespace
 from the URL by looking up a ResolverMatch object in order to know which
 templates to load.

 It would be nicer to allow any view to raise Resolver404 and have Django
 continue to the next matching URL if there is one. I'd like to see this
 feature or something similar to it make it into Django.

 However, I suspect that this could cause some problems when people need to
 resolve a URL in their own code (not as part of the normal
 request/view/response machinery).

 In this case, the resolved view returned may not actually be the view they
 want, and they may not know until it is too late -- when they attempt to
 execute it In many cases it may not be appropriate to execute a resolved
 view in order to test if it is the correct one. I don't have a specific
 use-case to demonstrate a problem, though.

 This could probably use some discussion on django-dev, so I'm marking as
 DDN.

 I found it difficult to review the "patch" (a pull request with many
 commits on GitHub), so I'm also removing the "has patch" flag. Please
 attach a single diff here in Trac if you would like the patch to be
 reviewed (e.g. I don't even know if it has tests).

-- 
Ticket URL: 
Django 
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.