#9958: Split contrib.comments CommentForm class to allow easier customization
----------------------------------------------+-----------------------------
          Reporter:  arne                     |         Owner:  nobody          
       
            Status:  new                      |     Milestone:                  
       
         Component:  django.contrib.comments  |       Version:  SVN             
       
        Resolution:                           |      Keywords:  comments, 
customization
             Stage:  Design decision needed   |     Has_patch:  0               
       
        Needs_docs:  0                        |   Needs_tests:  0               
       
Needs_better_patch:  0                        |  
----------------------------------------------+-----------------------------
Comment (by arne):

 Using 9958.diff solves a different problem than my original patch
 comments.diff. With the approach in 9958.diff neither inheriting from
 !BaseCommentForm nor inheriting from !CommentForm allows for easy
 customization of the fields the form uses.

 Please consider that not every projects needs a comment form with the
 fields "name", "email", "url" and "comment". Sometimes "name" and
 "comment" may be enough and 9958.diff gives no form-class from which I can
 inherit to cleanly build my own comment form with less fields than the
 original !CommentForm. I feel like overriding !__init!__() and using del
 to delete form-fields is not a clean solution.

 Using an approach like in comments.diff one can either subclass
 !BaseCommentForm to customize the fields the form has and use all the
 existing Spam-protection logic or could use a completly other form
 (inheriting form forms.Form) to circumvent the Spam-protection as
 thejaswi_puthraya pointed out and the ability to customize the fields.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9958#comment:3>
Django <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