Simple terms and condition notify app
$ pip install -e git+https://github.com/rouxcode/[email protected]#egg=django-tac
add tac to your installed apps:
INSTALLED_APPS = (
'tac',
'...'
)
add the middleware:
django >= 1.10:
MIDDLEWARE = [
'...',
'django.contrib.sessions.middleware.SessionMiddleware',
'tac.middleware.TACMiddleware',
'...'
]
django <= 1.9.x
MIDDLEWARE_CLASSES = [
'...',
'django.contrib.sessions.middleware.SessionMiddleware',
'tac.middleware.TACMiddlewareLegacy',
'...'
]
if desired load initial data
$ ./manage.py tac_load_inital
or create at least one popupcontent entry
use the template tag:
{% load tac_tags %}
{% tac_popup %}
or if rouxcode/django-text-ckeditor is not installed
{% tac_popup_no_ckeditor %}
jquery needs to be loaded before:
<script src="{{ STATIC_URL }}tac/js/tac.accept.js"></script>
project urls.py
urlpatterns = [
url(
r'^tac/',
include('tac.urls')
)
'...'
]