Re: [Django] #14803: ModelFormMixing's handling of "success_url" is inconsistent with old generic view behaviour

2010-12-04 Thread Django
#14803: ModelFormMixing's handling of "success_url" is inconsistent with old
generic view behaviour
+---
  Reporter:  gg | Owner:  gg 
Status:  new| Milestone:  1.3
 Component:  Generic views  |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * stage:  Unreviewed => Ready for checkin

Comment:

 Patch looks good, mod some minor PEP8 stuff that can easily get cleaned up
 prior to commit.

 As for the aside -- sounds like a good idea to me, but it needs a separate
 ticket, and a patch that implements a get_absolute_url() solution that
 defers to success_url if it is provided.

-- 
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-upda...@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] #14803: ModelFormMixing's handling of "success_url" is inconsistent with old generic view behaviour

2010-11-28 Thread Django
#14803: ModelFormMixing's handling of "success_url" is inconsistent with old
generic view behaviour
+---
  Reporter:  gg | Owner:  gg 
Status:  new| Milestone:  1.3
 Component:  Generic views  |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Unreviewed | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by gg):

  * needs_better_patch:  => 0
  * has_patch:  0 => 1
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
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-upda...@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] #14803: ModelFormMixing's handling of "success_url" is inconsistent with old generic view behaviour

2010-11-28 Thread Django
#14803: ModelFormMixing's handling of "success_url" is inconsistent with old
generic view behaviour
---+
 Reporter:  gg |   Owner:  gg
   Status:  new|   Milestone:  1.3   
Component:  Generic views  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Handling of "success_url" in ModelFormMixing seems to be inconsistent with
 how "get_absolute_url" is handled in
 views.generic.create_update.redirect()

 In old generic views, the url could be a format string into which the
 object's fields would be interpolated. But that doesn't happed in
 ModelFormMixin: form_valid() just redirects to the result of
 get_success_url() (which doesn't do the interpolation)


 This inconsistency should be dealt with by either:

 1. documenting the discrepency in
 [http://docs.djangoproject.com/en/dev/topics/generic-views-migration/
 here] (presumably with the suggestion that the reader override the
 "get_success_url()" method to implement the interpolation)

 2. patching ModelFormMixin.get_success_url() to be consistent with old
 generic view handling and document the behaviour
 [http://docs.djangoproject.com/en/dev/ref/class-based-
 views/#modelformmixin here]

 I prefer the latter, but the behaviour change could be a design decision
 (which I'm certainly not qualified to override :). Let me know, and I can
 prepare a patch.

 Also, as an aside, it seems that redirecting back to the POSTed form would
 be a better last-resort, rather than throwing an ImproperlyConfigured
 error.

 Comments?

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