Re: Form Rendering API Proposal

2011-06-23 Thread Jjdelc
> > {% formconfig widget widgets.Textarea for "comment" %} > {% formconfig row using "forms/rows/ul.html" %} > > The first statement instructs the form to use a textarea widget for any > formfield named "comment." The second instructs the form to use ul's as the > default formrow template anytime

SingleObjectMixin.get_context_object_name and i18n

2011-02-13 Thread Jjdelc
The SingleObjectMixin.get_context_object_name method currently obtains its value from the object's verbose name (when context_object_name is None) : smart_str(re.sub('[^a-zA-Z0-9]+', '_', obj._meta.verbose_name.lower())) When your object's verbose name is using ugettext, the template context

ListView should always return a page_obj

2010-12-23 Thread Jjdelc
Currently ListView.paginate_queryset discriminates whether the resulting queryset is paginated or not in order to return a page_obj into the context (http://code.djangoproject.com/browser/django/trunk/django/views/generic/list.py?rev=14864#L51). If there is only one page, 'page_obj' is set to