Remove old models from admin
This commit is contained in:
parent
c6dd0ff286
commit
0937f7299a
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue