Skip to main content

Django app to handle promotion and marketing events.

Project description

===== Promotion Counters

Django app to handle promotion and marketing events based on it's counting and process such counters as achievements.

Quick start

  1. Add "promotion_counters" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [ ..., "promotion_counters", ]

  2. Run python manage.py migrate to create the promotion program and promotion counter models.

  3. Define your promotion action like this::

    registration = Action( alias='registration', verbose_name='Регистрация по ссылке', )

  4. Define your achievement handler like this::

    @on_achievement(action='Issue promo code') def registration_handler(counter: Counter): PromoCode.objects.create( user=counter.user, code=generate_promo_code(), type=PromoCode.DISCOUNT, value=10, )

  5. Create promotion program using promotion action and achievement handler in admin panel.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_promotion_counters-0.1.5.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_promotion_counters-0.1.5-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file django_promotion_counters-0.1.5.tar.gz.

File metadata

  • Download URL: django_promotion_counters-0.1.5.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/23.0.0

File hashes

Hashes for django_promotion_counters-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6c55c75f518d078ebc239bc5d2ce9940e9c113125f6caeca44faadee5d6eadc1
MD5 0d7a1e5d25cc25ba2d3bc813ec15365e
BLAKE2b-256 d5806dc48d49b83544be71f5922cafcdce33ddcbe684454524518a5e10d84a31

See more details on using hashes here.

File details

Details for the file django_promotion_counters-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for django_promotion_counters-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4f8feb28f8ed7d913c9c92b94b9532f0c571dfeeba9d1e5c18e0657cf3fa3cc1
MD5 ea3c6a27f3e9acc47d53cc451e5ba7a8
BLAKE2b-256 6aa15167fbd925e5472332d48560820caa0dfc3701cf03f5af510cb722c018f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page