Skip to content

sender707/django-tac

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-tac

Simple terms and condition notify app

Install

$ pip install -e git+https://github.com/rouxcode/[email protected]#egg=django-tac  

Usage

basics

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 %}

javascript

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')
    )
    '...'
]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 82.7%
  • JavaScript 11.7%
  • HTML 5.2%
  • CSS 0.4%