Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

Python Calendar wrapper template tag

This tag gives you an iterable Python Calendar object in your template namespace. It is used in the django-calendar project.

Use it as follows in your template:

{% get_calendar for <month_number_or_variable> <year_or_variable> as calendar %}
<table>
    <tr>
        <th>Mon</th>
        <th>Tue</th>
        <th>Wed</th>
        <th>Thu</th>
        <th>Fri</th ...

Don't be the product, buy the product!

Schweinderl