Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/georgewhewell/django-sheets
Use Google Sheets as context variables in Django templates
https://github.com/georgewhewell/django-sheets
Last synced: about 1 month ago
JSON representation
Use Google Sheets as context variables in Django templates
- Host: GitHub
- URL: https://github.com/georgewhewell/django-sheets
- Owner: georgewhewell
- License: bsd-3-clause
- Created: 2015-01-18T16:30:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-10-14T15:36:40.000Z (almost 4 years ago)
- Last Synced: 2024-06-04T20:29:46.460Z (4 months ago)
- Language: Python
- Size: 66.4 KB
- Stars: 99
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
=============================
django-sheets
=============================Use Google Sheets as context variables in Django templates
.. image:: https://badge.fury.io/py/django-sheets.svg
:target: https://badge.fury.io/py/django-sheets.. image:: https://travis-ci.org/georgewhewell/django-sheets.svg?branch=master
:target: https://travis-ci.org/georgewhewell/django-sheets.. image:: https://coveralls.io/repos/georgewhewell/django-sheets/badge.svg?branch=master
:target: https://coveralls.io/r/georgewhewell/django-sheets?branch=master
.. image:: https://requires.io/github/georgewhewell/django-sheets/requirements.svg?branch=master
:target: https://requires.io/github/georgewhewell/django-sheets/requirements/?branch=master
:alt: Requirements StatusUsage
_____________In your template::
{% load sheets %}
{% csv "1uPsdcGUnUsf3d2xGHRGUUb7_k5IQPtBvfQY61u8Z8wE" as data %}
{% for header in data.headers %}
{{ header }}
{% endfor %}
{% for row in data.rows %}
{% for cell in row %}
{{ cell }}
{% endfor %}
{% 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.