lostplaces-backend/django_lostplaces/lostplaces/admin.py

24 lines
666 B
Python
Raw Normal View History

#!/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
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from lostplaces.models import *
2020-07-19 00:13:49 +02:00
from lostplaces.forms import ExplorerCreationForm, ExplorerChangeForm
2020-07-19 00:13:49 +02:00
# Register your models here.
class VoucherAdmin(admin.ModelAdmin):
fields = ['code', 'expires_when', 'created_when']
readonly_fields = ['created_when']
admin.site.register(Explorer)
admin.site.register(Voucher, VoucherAdmin)
2020-07-19 00:13:49 +02:00
admin.site.register(Place)
admin.site.register(PlaceImage)
2020-08-26 21:36:10 +02:00
admin.site.register(PhotoAlbum)