Ticket #7292: modelform.patch

File modelform.patch, 1.0 KB (added by programmerq, 7 years ago)
  • docs/form_preview.txt

    From be38bc5bb37628267d3461b7481f729b12aaba80 Mon Sep 17 00:00:00 2001
    From: Jeff Anderson <jefferya@cs.byu.edu>
    Date: Thu, 22 May 2008 20:15:20 -0600
    Subject: [PATCH] Took out a form_for_model reference
    
    ---
     docs/form_preview.txt |    7 +++----
     1 files changed, 3 insertions(+), 4 deletions(-)
    
    diff --git a/docs/form_preview.txt b/docs/form_preview.txt
    index e6f9b05..f1530b1 100644
    a b How to use ``FormPreview`` 
    6969
    7070       ...and add the following line to the appropriate model in your URLconf::
    7171
    72            (r'^post/$', SomeModelFormPreview(forms.models.form_for_model(SomeModel))),
    73 
    74        Or, if you already have a Form class defined for the model::
    75 
    7672           (r'^post/$', SomeModelFormPreview(SomeModelForm)),
    7773
     74       Where ``SomeModelForm`` is a Form class or ModelForm class defined for
     75       the model.
     76
    7877    4. Run the Django server and visit ``/post/`` in your browser.
    7978
    8079.. _template loader docs: ../templates_python/#loader-types
Back to Top