premises-rental/app/admin.py

58 строки
944 B
Python
Исходник Обычный вид История

from django.contrib import admin
from django.contrib.admin import ModelAdmin
from .models import Room, RoomImage, RoomPanorama
@admin.register(Room)
class ModelNameAdmin(ModelAdmin):
list_display = [
'id',
'name',
'area',
'price',
'is_visible',
'is_available',
]
list_filter = [
'id',
'name',
'area',
'price',
'is_visible',
'is_available',
]
search_fields = [
'name',
]
@admin.register(RoomImage)
class ModelNameAdmin(ModelAdmin):
list_display = [
'id',
'name',
]
list_filter = [
'id',
'name',
]
search_fields = [
'name',
]
@admin.register(RoomPanorama)
class ModelNameAdmin(ModelAdmin):
list_display = [
'id',
'name',
]
list_filter = [
'id',
'name',
]
search_fields = [
'name',
]