Skip to content

Commit

Permalink
minor admin panel change
Browse files Browse the repository at this point in the history
  • Loading branch information
singhchanmeet committed Feb 7, 2024
1 parent bec7a5f commit d2fb4cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions backend/fees/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def has_add_permission(self, request):
def has_delete_permission(self, request, obj=None):
return False

# This will disable change functionality
def has_change_permission(self, request, obj=None):
return False

class BilldeskTransactionsAdmin(admin.ModelAdmin):
list_display = ['order_id', 'transaction_id', 'transaction_status', 'payment_method', 'transaction_time', 'transaction_response']

Expand All @@ -26,6 +30,10 @@ def has_add_permission(self, request):
# This will disable delete functionality
def has_delete_permission(self, request, obj=None):
return False

# This will disable change functionality
def has_change_permission(self, request, obj=None):
return False

admin.site.register(Fees, FeesAdmin)
admin.site.register(BilldeskOrders, BilldeskOrdersAdmin)
Expand Down
2 changes: 1 addition & 1 deletion backend/fees/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def billdesk_order_callback(request):
response = {
"Transaction ID " : decoded_response.get('transactionid', ''),
"Order ID" : decoded_response.get('orderid', ''),
"Transaction Status" : decoded_response.get('transaction_error_type', '').toupper(),
"Transaction Status" : decoded_response.get('transaction_error_type', '').upper(),
"Transaction Time" : decoded_response.get('transaction_date', '')
}

Expand Down

0 comments on commit d2fb4cf

Please sign in to comment.