Skip to content

rouxcode/django-tac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-tac

Simple terms and condition notify app

Install

$ pip install -e git+https://github.com/rouxcode/django-tac@master#egg=django-tac  

Usage

basics

add tac to your installed apps:

INSTALLED_APPS = (
    'tac',
    '...'
)

add the middleware:

MIDDLEWARE = [
    '...',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'tac.middleware.TACMiddleware',
    '...'
]

if desired load initial data  
```shell
$ ./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 %}

javascript

jquery needs to be loaded before:

{% load static %}
<script src="{% static 'tac/tac.js' %}"></script>

project urls.py

urlpatterns = [
    path(
        'tac/',
        include('tac.urls')
    )
    '...'
]