2024-09-22 17:10:43 +03:00
|
|
|
from django.contrib import admin
|
|
|
|
from django.contrib.admin import ModelAdmin
|
|
|
|
|
|
|
|
from .models import Room, RoomImage, RoomPanorama
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Room)
|
|
|
|
class ModelNameAdmin(ModelAdmin):
|
2024-09-22 18:01:28 +03:00
|
|
|
list_display = [
|
|
|
|
'id',
|
|
|
|
'name',
|
|
|
|
'area',
|
|
|
|
'price',
|
|
|
|
'is_visible',
|
|
|
|
'is_available',
|
|
|
|
]
|
|
|
|
list_filter = [
|
|
|
|
'id',
|
|
|
|
'name',
|
|
|
|
'area',
|
|
|
|
'price',
|
|
|
|
'is_visible',
|
|
|
|
'is_available',
|
|
|
|
]
|
|
|
|
search_fields = [
|
|
|
|
'name',
|
|
|
|
]
|
2024-09-22 17:10:43 +03:00
|
|
|
|
|
|
|
|
|
|
|
@admin.register(RoomImage)
|
|
|
|
class ModelNameAdmin(ModelAdmin):
|
2024-09-22 18:01:28 +03:00
|
|
|
list_display = [
|
|
|
|
'id',
|
|
|
|
'name',
|
|
|
|
]
|
|
|
|
list_filter = [
|
|
|
|
'id',
|
|
|
|
'name',
|
|
|
|
]
|
|
|
|
search_fields = [
|
|
|
|
'name',
|
|
|
|
]
|
2024-09-22 17:10:43 +03:00
|
|
|
|
|
|
|
|
|
|
|
@admin.register(RoomPanorama)
|
|
|
|
class ModelNameAdmin(ModelAdmin):
|
2024-09-22 18:01:28 +03:00
|
|
|
list_display = [
|
|
|
|
'id',
|
|
|
|
'name',
|
|
|
|
]
|
|
|
|
list_filter = [
|
|
|
|
'id',
|
|
|
|
'name',
|
|
|
|
]
|
|
|
|
search_fields = [
|
|
|
|
'name',
|
|
|
|
]
|