Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8721 closed (fixed)

Two typos in /documentation/form_preview/

Reported by: Rodolfo <rhcarvalho@…> Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

On "How to use FormPreview", 3rd step, the code snippet imports "SomeModel", and then mistakenly refers to "SomeModelFormPreview(SomeModelForm))".

Here is the current text in the documentation:

3. Change your URLconf to point to an instance of your FormPreview subclass:

from myapp.preview import SomeModelFormPreview
from myapp.models import SomeModel
from django import forms

…and add the following line to the appropriate model in your URLconf:

(r'^post/$', SomeModelFormPreview(SomeModelForm)),

where SomeModelForm is a Form or ModelForm class for the model.

Also, on "FormPreview templates", a template is referenced using slash-notation and then using dot-notation. Probably should be slash for both.

By default, the form is rendered via the template formtools/form.html, and the preview page is rendered via the template formtools.preview.html.

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by anonymous

  • milestone set to 1.0
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by ubernostrum

  • Resolution set to fixed
  • Status changed from new to closed

(In [8753]) Fixed #8721: Clarification in docs for form previews

comment:3 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.