Skip to main content

A reusable Django app for creating, logging and verifying purchases.

Project description

A reusable Django app for creating, logging and verifying purchases.

Quick start

  1. Install Django Purchase Core & Dependancies:

    >>> pip install django-purchase-core
    
  2. Add “purchase”, “rest_framework’, and “rangefilter” to your INSTALLED_APPS setting like this:

INSTALLED_APPS = [
    ...,
    'rest_framework',
    'purchase',
    'rangefilter',
    ...,
]
  1. Add the following to app_config.urls:

from django.conf.urls import url, include

urlpatterns = [
    ...,
    path("api/", include("purchase.urls")),
    ...,
]
  1. Run Django Commands:

    >>> python manage.py makemigrations
    >>> python manage.py migrate
    
  2. Configure configuration and credentials for your game in the admin panel.

Add progress level update processing

  1. To handle completed purchase setup receiver to update progress, which will receive “instance”

from django.dispatch import receiver

from purchase.signals import purchase_completed

@receiver(purchase_completed)
def purchase_completed(sender, **kwargs):
    purchase = kwargs["instance"]
    ...

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-purchase-core-0.2.0.tar.gz (17.7 kB view hashes)

Uploaded Source

Built Distribution

django_purchase_core-0.2.0-py3-none-any.whl (29.2 kB view hashes)

Uploaded Python 3

Supported by

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