#3639: use newforms in generic create_update view
---------------------------------------------------+------------------------
          Reporter:  webograph <[EMAIL PROTECTED]>  |         Owner:           
            Status:  new                           |     Milestone:  1.0 alpha
         Component:  Generic views                 |       Version:  SVN      
        Resolution:                                |      Keywords:  newforms 
             Stage:  Ready for checkin             |     Has_patch:  1        
        Needs_docs:  0                             |   Needs_tests:  0        
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by gwilson):

  * needs_better_patch:  1 => 0
  * stage:  Accepted => Ready for checkin

Comment:

 I've taken Brian's patch and added the following:
  * Brought back the ``model`` argument, but made it optional.  We now
 check that one of ``model`` or ``form_class`` is given.  ``form_class``,
 if given, overrides the default ModelForm created from ``model``.
  * Issue a deprecation warning if the ``follow`` parameter is used,
 letting people know that generic views now use newforms and to use
 ``form_class`` if a custom form is needed.
  * Fixed an error I was getting in the tests when using "model = model" in
 the inner Meta class (works fine in my shell, but gives me "model not
 defined" errors when I run the tests) by introducing a tmp_model variable.
  * Added a GenericViewError class and made a couple AttributeErrors use
 this Exception class instead since AttributeError doesn't really fit.
  * Added a get_model_and_form_class helper function to remove duplicate
 ModelForm-generating code.
  * Finished off the test_create_custom_save_article test with a
 custom_create view that passes a custom form to the create_update generic
 view.
  * Factored out some duplicated code into the apply_extra_context,
 redirect, and lookup_object functions.
  * Added more tests for the post_save_redirect parameter and models
 with/without a get_absolute_url method.

 The first two points were [http://groups.google.com/group/django-
 developers/browse_frm/thread/ee8d746f1df89c46 discussed here].

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3639#comment:30>
Django Code <http://code.djangoproject.com/>
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to