feat: rebuild site content management

Replace legacy FAQ, downloads, and release flows with project and blog publishing. Add configurable branding and theme fields plus clean-start Compose seeding support.
This commit is contained in:
mohamad
2026-09-24 02:32:27 +03:30
parent 4fc4282f0f
commit 588d95f889
43 changed files with 703 additions and 1193 deletions
+43
View File
@@ -1,3 +1,4 @@
from django import forms
from django.contrib import admin
from django.http import HttpResponseRedirect
from django.urls import reverse
@@ -5,9 +6,36 @@ from django.urls import reverse
from .models import SiteBranding, SiteContact
class SiteBrandingForm(forms.ModelForm):
class Meta:
model = SiteBranding
fields = "__all__"
widgets = {
field: forms.TextInput(attrs={"type": "color"})
for field in (
"border_color",
"background_color",
"surface_color",
"primary_color",
"secondary_color",
"accent_color",
"text_color",
"muted_text_color",
)
}
@admin.register(SiteBranding)
class SiteBrandingAdmin(admin.ModelAdmin):
form = SiteBrandingForm
fieldsets = (
(
"Site identity",
{
"fields": ("site_name", "short_name", "tagline", "meta_description"),
"description": "Names and text used throughout the public website.",
},
),
(
"Brand assets",
{
@@ -44,6 +72,21 @@ class SiteBrandingAdmin(admin.ModelAdmin):
),
},
),
(
"Site colours",
{
"fields": (
"background_color",
"surface_color",
"primary_color",
"secondary_color",
"accent_color",
"text_color",
"muted_text_color",
),
"description": "Use six-digit hex colours. Changes apply across the public site.",
},
),
)
def has_add_permission(self, request):