Skip to content

Commit

Permalink
add usage example to README
Browse files Browse the repository at this point in the history
  • Loading branch information
georgewhewell committed Jan 19, 2015
1 parent 976c0ba commit dc249c8
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,37 @@ Use Google Sheets as context variables in Django templates
:target: https://requires.io/github/georgewhewell/django-sheets/requirements/?branch=master
:alt: Requirements Status

Usage
_____________

In your template::

{% load sheets %}
{% csv "1uPsdcGUnUsf3d2xGHRGUUb7_k5IQPtBvfQY61u8Z8wE" as csv_data %}
<table>
{% for row in csv_data %}
<tr>
{% for cell in row %}
<td>{{ cell }}</td>
{% endfor %}
</td>
</table>
{% endfor %}

View the output, you should see

================================= ======================= =============== =======================
Origin (English) Name (English) Origin (Native) Name (Native)
Australia Nicole Kidman Australia Nicole Kidman
Austria Johann Strauss Österreich Johann Strauß
Belgium (Flemish) Rene Magritte België René Magritte
Belgium (French) Rene Magritte Belgique René Magritte
Belgium (German) Rene Magritte Belgien René Magritte
================================= ======================= =============== =======================



Documentation
-------------

Documentation is available at https://django-sheets.readthedocs.org.
Documentation is available at https://django-sheets.readthedocs.org.

0 comments on commit dc249c8

Please sign in to comment.