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.4.tar.gz
(16.3 kB
view hashes)
Built Distribution
Close
Hashes for django-purchase-core-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e717c7fe98418db6e21ccf755d187a8db5523b84a8b381b6c6e17130a2dc2aaf |
|
MD5 | f0573f11f3f45eefda23c3a8c2a2b064 |
|
BLAKE2b-256 | 305a0934af063d6c62b54a172ccb71133c06cd7fe65b82519f392a6942746617 |
Close
Hashes for django_purchase_core-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fec0a1ad62371dd95d5e33d3dc984f0e410544992a71d8c7712ce95a973632f |
|
MD5 | a31b5149787c54eee563f2e6d6cb4e20 |
|
BLAKE2b-256 | c3646585607b86cef8e9655a6460ce15d47aa519e8e65315f2b96f4d849e934c |