Skip to content

Can be used to simplify the creation of forms inside the standard Django templating system

Notifications You must be signed in to change notification settings

foomip/Django-Template-pager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Simple template tag for Django. This can be used to simplify the creation of forms inside templates.

Copy the templatetags folder into the required app in your Django project (location is irrelevant, 
the modules will be automatically imported on project startup).

Sample template usage (replace number 2 in "tablerow_start:2" and "tablerow_end:2" wit number of desired columns:

{% load pagerchecker %}
<form method="post" target="_self">
<table>
{% for field in form %}
{{ forloop.counter|tablerow_start:2 }}
<td align='right'>{{ field.label_tag }}</td>
<td align='left'>{{ field }}</td>
{{ forloop.counter|tablerow_end:2 }}
{% endfor %}
</table>
<input type="submit" value="submit"/>
</form>
</div>

About

Can be used to simplify the creation of forms inside the standard Django templating system

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages