frontend
This commit is contained in:
0
about/__init__.py
Normal file
0
about/__init__.py
Normal file
BIN
about/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
about/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
about/__pycache__/admin.cpython-310.pyc
Normal file
BIN
about/__pycache__/admin.cpython-310.pyc
Normal file
Binary file not shown.
BIN
about/__pycache__/apps.cpython-310.pyc
Normal file
BIN
about/__pycache__/apps.cpython-310.pyc
Normal file
Binary file not shown.
BIN
about/__pycache__/models.cpython-310.pyc
Normal file
BIN
about/__pycache__/models.cpython-310.pyc
Normal file
Binary file not shown.
3
about/admin.py
Normal file
3
about/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
about/apps.py
Normal file
6
about/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AboutConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'about'
|
||||
29
about/migrations/0001_initial.py
Normal file
29
about/migrations/0001_initial.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# Generated by Django 5.0.8 on 2024-09-07 14:49
|
||||
|
||||
import django.db.models.deletion
|
||||
import wagtail.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('wagtailcore', '0094_alter_page_locale'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='AboutPage',
|
||||
fields=[
|
||||
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
|
||||
('about', wagtail.fields.RichTextField(blank=True)),
|
||||
('origin', wagtail.fields.RichTextField(blank=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=('wagtailcore.page',),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,44 @@
|
||||
# Generated by Django 5.0.8 on 2024-09-08 18:02
|
||||
|
||||
import wagtail.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('about', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='aboutpage',
|
||||
old_name='about',
|
||||
new_name='af1img',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='aboutpage',
|
||||
old_name='origin',
|
||||
new_name='af1text',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='aboutpage',
|
||||
name='af1title',
|
||||
field=wagtail.fields.RichTextField(blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='aboutpage',
|
||||
name='af2img',
|
||||
field=wagtail.fields.RichTextField(blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='aboutpage',
|
||||
name='af2text',
|
||||
field=wagtail.fields.RichTextField(blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='aboutpage',
|
||||
name='af2title',
|
||||
field=wagtail.fields.RichTextField(blank=True),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,43 @@
|
||||
# Generated by Django 5.0.8 on 2024-09-10 16:07
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('about', '0002_rename_about_aboutpage_af1img_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='aboutpage',
|
||||
old_name='af1img',
|
||||
new_name='section_one_img',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='aboutpage',
|
||||
old_name='af1text',
|
||||
new_name='section_one_text',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='aboutpage',
|
||||
old_name='af1title',
|
||||
new_name='section_one_title',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='aboutpage',
|
||||
old_name='af2img',
|
||||
new_name='section_two_img',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='aboutpage',
|
||||
old_name='af2text',
|
||||
new_name='section_two_text',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='aboutpage',
|
||||
old_name='af2title',
|
||||
new_name='section_two_title',
|
||||
),
|
||||
]
|
||||
0
about/migrations/__init__.py
Normal file
0
about/migrations/__init__.py
Normal file
BIN
about/migrations/__pycache__/0001_initial.cpython-310.pyc
Normal file
BIN
about/migrations/__pycache__/0001_initial.cpython-310.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
about/migrations/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
about/migrations/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
32
about/models.py
Normal file
32
about/models.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
|
||||
from wagtail.models import Page
|
||||
from wagtail.fields import RichTextField
|
||||
from wagtail.admin.panels import FieldPanel, MultiFieldPanel
|
||||
|
||||
class AboutPage(Page):
|
||||
|
||||
section_one_title = RichTextField(blank=True)
|
||||
section_one_text = RichTextField(blank=True)
|
||||
section_one_img = RichTextField(blank=True)
|
||||
|
||||
section_two_title = RichTextField(blank=True)
|
||||
section_two_text = RichTextField(blank=True)
|
||||
section_two_img = RichTextField(blank=True)
|
||||
|
||||
content_panels = Page.content_panels + [
|
||||
MultiFieldPanel([
|
||||
FieldPanel('section_one_title', classname="full"),
|
||||
FieldPanel('section_one_text', classname="full"),
|
||||
FieldPanel('section_one_img', classname="full"),
|
||||
], heading="Section One"),
|
||||
|
||||
MultiFieldPanel([
|
||||
FieldPanel('section_two_title', classname="full"),
|
||||
FieldPanel('section_two_text', classname="full"),
|
||||
FieldPanel('section_two_img', classname="full"),
|
||||
], heading="Section Two"),
|
||||
]
|
||||
|
||||
3
about/tests.py
Normal file
3
about/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
3
about/views.py
Normal file
3
about/views.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user