Add Django backend, Next.js frontend, and deploy templates
This commit is contained in:
1 parent
fc0c991335
commit
e9cd22d36f
93 files changed
+7840
-1
No files matched your search
@@ -0,0 +1,42 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from .models import ContactMessage, Doctor, Document, Page, Service, SiteSettings
|
||||
|
||||
|
||||
@admin.register(SiteSettings)
|
||||
class SiteSettingsAdmin(admin.ModelAdmin):
|
||||
list_display = ("site_name", "phone", "city", "updated_at")
|
||||
|
||||
|
||||
@admin.register(Page)
|
||||
class PageAdmin(admin.ModelAdmin):
|
||||
list_display = ("title", "slug", "is_published", "nav_order", "updated_at")
|
||||
list_editable = ("is_published", "nav_order")
|
||||
prepopulated_fields = {"slug": ("title",)}
|
||||
|
||||
|
||||
@admin.register(Service)
|
||||
class ServiceAdmin(admin.ModelAdmin):
|
||||
list_display = ("title", "slug", "sort_order", "updated_at")
|
||||
list_editable = ("sort_order",)
|
||||
prepopulated_fields = {"slug": ("title",)}
|
||||
|
||||
|
||||
@admin.register(Doctor)
|
||||
class DoctorAdmin(admin.ModelAdmin):
|
||||
list_display = ("full_name", "position", "sort_order", "updated_at")
|
||||
list_editable = ("sort_order",)
|
||||
|
||||
|
||||
@admin.register(Document)
|
||||
class DocumentAdmin(admin.ModelAdmin):
|
||||
list_display = ("title", "category", "sort_order", "updated_at")
|
||||
list_editable = ("sort_order",)
|
||||
|
||||
|
||||
@admin.register(ContactMessage)
|
||||
class ContactMessageAdmin(admin.ModelAdmin):
|
||||
list_display = ("name", "phone", "email", "is_processed", "created_at")
|
||||
list_editable = ("is_processed",)
|
||||
readonly_fields = ("name", "phone", "email", "message", "created_at", "updated_at")
|
||||
|
||||
Reference in new issue
Block a user