create sitemanagement project and dynamic faqs

This commit is contained in:
2025-05-15 19:34:32 +03:00
parent 8e3dfd89b1
commit fd5caada23
18 changed files with 317 additions and 51 deletions

View File

View File

@@ -0,0 +1,4 @@
from django.contrib import admin
from .models import FAQ
admin.site.register(FAQ)

View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class SitemanagementConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'sitemanagement'

View File

@@ -0,0 +1,27 @@
# Generated by Django 5.2.1 on 2025-05-15 16:24
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='FAQ',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=250)),
('content', models.CharField(max_length=800)),
],
options={
'verbose_name': 'FAQ',
'verbose_name_plural': 'FAQs',
'ordering': ['id'],
},
),
]

View File

@@ -0,0 +1,14 @@
from django.db import models
class FAQ (models.Model):
title = models.CharField(max_length=250)
content = models.CharField(max_length=800)
class Meta:
verbose_name = 'FAQ'
verbose_name_plural = 'FAQs'
ordering = ['id']
def __str__(self):
return self.title

View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.