Skip to content

Commit 0744662

Browse files
added admin panel configs
1 parent afa6274 commit 0744662

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ PAYME_KEY = "your-payme-key"
7575
PAYME_ACCOUNT_FIELD = "id"
7676
PAYME_ACCOUNT_MODEL = "clients.models.Client"
7777
PAYME_ONE_TIME_PAYMENT = False
78+
79+
PAYME_DISABLE_ADMIN = False (optionally configuration if you want to disable change to True)
7880
```
7981

8082
Create a new View that about handling call backs

payme/admin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from django.conf import settings
12
from django.contrib import admin
23

34
from payme.models import PaymeTransactions
@@ -13,4 +14,5 @@ class PaymeTransactionsUI(admin.ModelAdmin):
1314
ordering = ('-created_at',)
1415

1516

16-
admin.site.register(PaymeTransactions, PaymeTransactionsUI)
17+
if not getattr(settings, 'PAYME_DISABLE_ADMIN', False):
18+
admin.site.register(PaymeTransactions, PaymeTransactionsUI)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='payme-pkg',
11-
version='3.0.23',
11+
version='3.0.24',
1212
license='MIT',
1313
author="Muhammadali Akbarov",
1414
author_email='muhammadali17abc@gmail.com',

0 commit comments

Comments
 (0)