Opened 17 years ago

Closed 17 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: no UI/UX: no

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

Change History (1)

comment:1 by Russell Keith-Magee, 17 years ago

Resolution: invalid
Status: newclosed
  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.
Note: See TracTickets for help on using tickets.
Back to Top