lostplaces-backend/lostplaces/lostplaces_app/admin.py

19 lines
536 B
Python
Raw Normal View History

2020-07-19 00:13:49 +02:00
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
2020-07-19 00:13:49 +02:00
from .models import *
from .forms import ExplorerCreationForm, ExplorerChangeForm
from .models import Explorer
2020-07-19 00:13:49 +02:00
# Register your models here.
class ExplorerAdmin(UserAdmin):
add_form = ExplorerCreationForm
form = ExplorerChangeForm
model = Explorer
list_display = ['email', 'username',]
admin.site.register(Explorer, ExplorerAdmin)
2020-07-19 00:13:49 +02:00
admin.site.register(Place)
admin.site.register(PlaceImage)