A reusable Django app for creating, logging and verifying purchases.
Project description
A reusable Django app for creating, logging and verifying purchases.
Quick start
Install Django Purchase Core & Dependancies:
>>> pip install django-purchase-core
Add “purchase”, “rest_framework’, and “rangefilter” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...,
'rest_framework',
'purchase',
'rangefilter',
...,
]
Add the following to app_config.urls:
from django.conf.urls import url, include
urlpatterns = [
...,
path("api/", include("purchase.urls")),
...,
]
Run Django Commands:
>>> python manage.py makemigrations >>> python manage.py migrate
Configure configuration and credentials for your game in the admin panel.
Add progress level update processing
Set update_player_progress_class in ProcessPurchaseView
from purchase.view import ProcessPurchaseView
from my_app import UpdateClass
class ProcessPurchaseViewWithUpdate(ProcessPurchaseView):
update_player_progress_class = UpdateClass
Describe the player’s update logic in the update_player_progress method
from purchase.view import ProcessPurchaseView
from my_app import UpdateClass
class ProcessPurchaseViewWithUpdate(ProcessPurchaseView):
update_player_progress_class = UpdateClass
def update_player_progress(self):
handler = self.update_player_progress_class()
handler.update_player_progress()
Project details
Release history Release notifications | RSS feed
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.1.5.tar.gz
(16.3 kB
view hashes)
Built Distribution
Close
Hashes for django-purchase-core-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91625da37933b900a301d509f26c2e6b86aee7a546fad36edd55248f1486ef1e |
|
MD5 | 85498646fcf1e22c96dd23cb8e043082 |
|
BLAKE2b-256 | db975fe8bb4720d52b69c3696fcfa994653898088959a8c7b0a3190f10a6ac8e |
Close
Hashes for django_purchase_core-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e629739ca6e208a8a40b37680284898b025d912754706e7dcc4e22d28e866968 |
|
MD5 | 4fc9666c00cc6f8414a2941a0bc79696 |
|
BLAKE2b-256 | 8310497b5cc896053cf121e57e019a337bb10b306c84ed52fd047f8e44141f58 |