Show tip of the day cards on your site.
Project description
Show tip of the day cards on your site.
Quickstart
Install django-tips:
pip install django-tips
Then use it in a project:
import tips
Requirements
django > 1.8
react
djangorestframework
markdown
Recommanded packages
django-sekizai
Building frontend
From tips_frontend directory run:
npm run_script watch
or:
npm run_script build
Usage
place where you want to show tips:
{% include "tips/tips.html" %}
include in your base template on appropriate places:
{% render_block "css" %} <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react-dom.min.js" type="text/javascript"></script> {% render_block "js" %}
include csrf-token ajax setup script if you have csrf protection enabled (you can find the script in the example):
<script src="{% static "js/csrf_token.js" %}"></script>
Development
pip install -e . pip install -r requirements_dev.txt cd example ./manage.py migrate ./manage.py runserver
Credits
Tools used in rendering this package:
History
0.1.0 (2016-06-10)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-tips-0.6.0.tar.gz
(10.0 kB
view hashes)