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 game-core-purchase
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.3.tar.gz
(16.3 kB
view hashes)
Built Distribution
Close
Hashes for django-purchase-core-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3929c80e7d136f5b3b6d7bd0fb9b44bc40bc4446dc1f6b65b872d03adf985ad7 |
|
MD5 | 7eec28041f200a3d000f6bd0389f4336 |
|
BLAKE2b-256 | f2d916ff391c8e7efd0255693b9f117371a24f8b7fde526a4007824f843576c6 |
Close
Hashes for django_purchase_core-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48b5b8be9f31a6e863aaa5d4ed2d8641b3214dfac0dd9ab1238d32c443b6d83d |
|
MD5 | a63c738abefbd5134898c70c667107ed |
|
BLAKE2b-256 | bd821d2b648f64c94fc0ce9e3b1a57d3413ff7e26cd04d7350922af5b8dc3e5b |