2020-07-31 14:55:26 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
''' Classes and modules for the administrative backend. '''
|
|
|
|
|
2020-07-19 00:13:49 +02:00
|
|
|
from django.contrib import admin
|
2020-07-28 20:15:34 +02:00
|
|
|
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 *
|
|
|
|
|
2020-07-28 20:15:34 +02:00
|
|
|
from .forms import ExplorerCreationForm, ExplorerChangeForm
|
|
|
|
from .models import Explorer
|
|
|
|
|
2020-07-19 00:13:49 +02:00
|
|
|
# Register your models here.
|
|
|
|
|
2020-07-28 20:15:34 +02:00
|
|
|
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)
|
2020-07-31 14:55:26 +02:00
|
|
|
admin.site.register(PlaceImage)
|