Remove old models from admin

This commit is contained in:
Mark Veidemanis 2023-02-24 07:20:31 +00:00
parent c6dd0ff286
commit 0937f7299a
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 5 additions and 7 deletions

View File

@ -2,15 +2,13 @@ from django.contrib import admin
from django.contrib.auth.admin import UserAdmin from django.contrib.auth.admin import UserAdmin
from .forms import CustomUserCreationForm from .forms import CustomUserCreationForm
from .models import ( # AssetRestriction, from .models import ( # AssetRestriction,; Plan,; Session,
Account, Account,
AssetGroup, AssetGroup,
Callback, Callback,
Hook, Hook,
NotificationSettings, NotificationSettings,
Plan,
RiskModel, RiskModel,
Session,
Signal, Signal,
Strategy, Strategy,
Trade, Trade,
@ -27,7 +25,7 @@ from .models import ( # AssetRestriction,
# Register your models here. # Register your models here.
class CustomUserAdmin(UserAdmin): class CustomUserAdmin(UserAdmin):
list_filter = ["plans"] # list_filter = ["plans"]
model = User model = User
add_form = CustomUserCreationForm add_form = CustomUserCreationForm
fieldsets = ( fieldsets = (
@ -40,7 +38,7 @@ class CustomUserAdmin(UserAdmin):
"Payment information", "Payment information",
{ {
"fields": ( "fields": (
"plans", # "plans",
"last_payment", "last_payment",
) )
}, },
@ -101,8 +99,8 @@ class AssetGroupAdmin(admin.ModelAdmin):
admin.site.register(User, CustomUserAdmin) admin.site.register(User, CustomUserAdmin)
admin.site.register(Plan) # admin.site.register(Plan)
admin.site.register(Session) # admin.site.register(Session)
admin.site.register(Account, AccountAdmin) admin.site.register(Account, AccountAdmin)
admin.site.register(Hook, HookAdmin) admin.site.register(Hook, HookAdmin)