Skip to content

Latest commit

 

History

History
175 lines (111 loc) · 4.78 KB

README.rst

File metadata and controls

175 lines (111 loc) · 4.78 KB

Django-Advertising

docs Django 3.0 Documentation Django Forum
tests
Python 3.7.5 version Odoo 13 version Travis-CI Build Status Coveralls Checkout Status
license Github License
release django-advertising Release on PyPi
contribute Github Issues Github Forks Github Contributors
share Share at Twitter Github Favorites

Django application for show advertising configurable. This application allows you to display advertising in a box (one or many images) and set (Time, url, etc.).

Requirements

  • Python 3.7 or higher.
  • Django 3.0.8 or higher.

Installing

Install the package using pip:

pip install django-advertising

Quick start

  1. Add 'advertising.apps.AdvertisingsConfig' to INSTALLED_APPS:
    INSTALLED_APPS = (
    ...
    'advertising.apps.AdvertisingsConfig',
)
  1. Apply migrations:
python manage.py makemigrations advertising
python manage.py migrate advertising
  1. Add this script in your file .html to use:
<script src="{% static 'advertising/js/events.js' %}"></script>
  1. Add this line in your file .html to use:
{% load image %}
{% get_images_advertising height=300 campaign='CMP1' %}

Parameters

  1. Height: Min height element size.
  2. Campaign: Id unique Advertising Model. (String)

Responsive

If you wish to play with media queries, use the img-advertising class.

Example

It lets do something like that, where a campaign you can add different images and automatically change based on the set time.

https://github.com/mapeveri/django-advertising/blob/master/images/example.gif

Contribute

  1. Fork this repo and install it
  2. Follow PEP8, Style Guide for Python Code
  3. Write code
  4. Write unit test
  5. Send pull request

Contribute

License

  • The project is licensed under the BSD License.