Re: [Django] #11935: Add a get_context(self, request, step) method to FormWizard

2010-02-03 Thread Django
#11935: Add a get_context(self, request, step) method to FormWizard
--+-
  Reporter:  Rob Hudson   | Owner:  
nobody
Status:  new  | Milestone:  
  
 Component:  django.contrib.formtools |   Version:  1.1 
  
Resolution:   |  Keywords:  
formwizard
 Stage:  Accepted | Has_patch:  0   
  
Needs_docs:  0|   Needs_tests:  0   
  
Needs_better_patch:  0|  
--+-
Changes (by russellm):

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

Comment:

 Not necessarily sold on adding a method as the solution, but the idea
 (allowing for extra_context) is certainly valid.

-- 
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] #11935: Add a get_context(self, request, step) method to FormWizard

2009-09-23 Thread Django
#11935: Add a get_context(self, request, step) method to FormWizard
-+--
 Reporter:  Rob Hudson   |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  django.contrib.formtools | Version:  1.1   
 Keywords:  formwizard   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 If you want to simply add context to a step of a FormWizard there are
 currently two documented ways, both of which have shortcomings...

 1. Override `render_template`.  The problem with this is quite a bit is
 happening in the to the variables in the context.  The user mostly has to
 copy/paste the code, get it right, and hope this method doesn't change out
 from underneath him for future releases, just to add context.

 2. Override `process_step`.  If the above turns the user's stomach, this
 seems like the next best place.  The problem, as noted in the
 documentation, is that "... this method is called every time a page is
 rendered for all submitted steps."  If you are only adding context, not
 processing anything, this can result in a pretty heavy load, for example
 if you are doing database calls to get a list of objects to display on a
 certain step.

 I'm proposing adding a method just for adding context to any given step,
 and make it called only when the step is rendered.

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