Code

Opened 7 years ago

Closed 7 years ago

#5654 closed (invalid)

possible error in newforms documentation

Reported by: django@… Owned by: nobody
Component: Documentation Version: 0.96
Severity: Keywords: newforms
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I am a django newbie but I think I have noticed a possible error in your documentation on this page:

http://www.djangoproject.com/documentation/0.96/newforms/

When I have a forms object, f, and want to print it as f.as_p() I get the following error:

Request Method:  	GET
Request URL: 	http://127.0.0.1:8000/tradestats/MainCountryCorrelations/
Exception Type: 	TemplateSyntaxError
Exception Value: 	Could not parse the remainder: ()
Exception Location: 	/var/lib/python-support/python2.5/django/template/__init__.py in __init__, line 558

However, calling it without the parentheses (i.e. "f.as_p") I get the output I want. This is also true of .as_ul() and .as_table(). The documention always has the parentheses, so I'm guessing this is an error in the documentation.

Hope this helps you. (I'm really liking the framework by the way.)

~daveZ

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed
  1. If you've found an error in the 0.96 docs, it _won't_ be fixed. The 0.96 docs are as they were published. We only make changes to the trunk documentation.
  2. It doesn't sound like you have found a bug - it sounds like you're using a template with {{ f.as_p() }}. This is as-designed - you don't include the function call brackets in the template. It is also a documented feature in the documentation on the Django template language. If you have further questions about this, please ask them on the django-users mailing list.

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.