Re: [Django] #15180: reverse doesn't check default_args

2015-03-19 Thread Django
#15180: reverse doesn't check default_args
-+-
 Reporter:  olaf |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Core (URLs)  |  Version:  1.3-beta
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  resolve  | Triage Stage:  Accepted
  default_args   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by bpeschier):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 This was fixed in #13154

--
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/062.012332c2f9b69f239cf45ec087729394%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #15180: reverse doesn't check default_args

2011-02-12 Thread Django
#15180: reverse doesn't check default_args
--+-
   Reporter:  olaf| Owner:  nobody  
 Status:  new | Milestone:  
  Component:  Core framework  |   Version:  1.3-beta
 Resolution:  |  Keywords:  resolve default_args
   Triage Stage:  Accepted| Has patch:  1   
Needs documentation:  0   |   Needs tests:  1   
Patch needs improvement:  0   |  
--+-
Changes (by julien):

  * milestone:  1.3 =>


Comment:

 This can't make it into 1.3 unless comprehensive regression tests are
 provided. Olaf, if you're interested in writing some tests, take a look at
 the guide available at
 http://docs.djangoproject.com/en/dev/topics/testing/
 Don't hesitate to ask questions on the django-users list too if need be.

-- 
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] #15180: reverse doesn't check default_args

2011-01-31 Thread Django
#15180: reverse doesn't check default_args
--+-
   Reporter:  olaf| Owner:  nobody  
 Status:  new | Milestone:  1.3 
  Component:  Core framework  |   Version:  1.3-beta
 Resolution:  |  Keywords:  resolve default_args
   Triage Stage:  Accepted| Has patch:  1   
Needs documentation:  0   |   Needs tests:  1   
Patch needs improvement:  0   |  
--+-

Comment (by olaf):

 Ok, I changed my patch a little bit. I added a new optional parameter to
 the reverse function. If check_default_args is not set(=None), reverse
 tries to find a match the standard way, if it will not succeed it tries
 one time again including the default_args. If it is set to False, it
 behaves just like the current reverse function. If it is set to true, it
 will check them from the beginning.

 I would like to write those test cases, but I don't know how to use
 different url configs. Could you point me to an Howto or give me a small
 example, and I will write them.

 Thanks

-- 
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] #15180: reverse doesn't check default_args

2011-01-29 Thread Django
#15180: reverse doesn't check default_args
--+-
   Reporter:  olaf| Owner:  nobody  
 Status:  new | Milestone:  1.3 
  Component:  Core framework  |   Version:  1.3-beta
 Resolution:  |  Keywords:  resolve default_args
   Triage Stage:  Accepted| Has patch:  1   
Needs documentation:  0   |   Needs tests:  1   
Patch needs improvement:  0   |  
--+-

Comment (by russellm):

 I have a background suspicion that this will cause all sorts of havoc with
 existing URL lookups -- for example, existing views with default arguments
 that *aren't* using the default arguments to differentiate between views.

 However, since the patch doesn't have any tests, I can't verify this
 quickly.

 Marking this as a qualified accepted, the qualification being that the
 implementation *must* be backwards compatible with existing uses, and be
 tested as such. If that can't be achieved, then we'll need to close
 wontfix.

-- 
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] #15180: reverse doesn't check default_args

2011-01-29 Thread Django
#15180: reverse doesn't check default_args
--+-
   Reporter:  olaf| Owner:  nobody  
 Status:  new | Milestone:  1.3 
  Component:  Core framework  |   Version:  1.3-beta
 Resolution:  |  Keywords:  resolve default_args
   Triage Stage:  Accepted| Has patch:  1   
Needs documentation:  0   |   Needs tests:  1   
Patch needs improvement:  0   |  
--+-
Changes (by russellm):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * needs_tests:  => 1
  * stage:  Unreviewed => Accepted


-- 
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.



[Django] #15180: reverse doesn't check default_args

2011-01-27 Thread Django
#15180: reverse doesn't check default_args
--+-
 Reporter:  olaf  |   Owner:  nobody
   Status:  new   |   Milestone:  1.3   
Component:  Core framework| Version:  1.3-beta  
 Keywords:  resolve default_args  |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 Lets say we have the following urls:
 {{{
 (r'^photos/?$', 'views.photo_index', {'lang':'en'}, "photo_index"),
 (r'^fotos/?$', 'views.photo_index', {'lang':'de'}, "photo_index"),
 (r'^photo/(?P[\d]+)$', 'views.photo', {"lang":"en"}
 ,"photo"),
 (r'^foto/(?P[\d]+)$', 'views.photo', {"lang":"de"}
 ,"photo"),
 }}}

 When I want to get the specific URL for a German visitor I wan't to just
 to get the reverse for photo an add a keyword argument {'lang':'de'}. It
 is very much writing to write for each language a different wrapper
 function. You also would need to write a bunch of if-else statements to
 select the correct one.

 I saw that also some else expected this and asked a question at
 stackoverflow about this, but he got only workaround as answers. I added a
 few lines to correct behavior, and I hope this is useful for someone. I am
 not sure, if I broke something so it would be nice someone else could test
 this code also.

-- 
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.