summaryrefslogtreecommitdiff
path: root/app/pages
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-02-07 09:54:16 -0600
committerluxagraf <sng@luxagraf.net>2019-02-07 09:54:16 -0600
commit27aaf92d26eb75157dcfa923a5d63ea63feeb98c (patch)
tree8f6213bc0ecd7738ad050dc4454732c4fd210ab1 /app/pages
parent3a54cdb85027e4a59ca6d78f5b91dbf7be77afd0 (diff)
updated stylesheets and added essays
Diffstat (limited to 'app/pages')
-rw-r--r--app/pages/admin.py4
-rw-r--r--app/pages/migrations/0005_auto_20190203_1434.py36
-rw-r--r--app/pages/models.py7
3 files changed, 43 insertions, 4 deletions
diff --git a/app/pages/admin.py b/app/pages/admin.py
index abe903d..809c2a6 100644
--- a/app/pages/admin.py
+++ b/app/pages/admin.py
@@ -6,6 +6,7 @@ from django.db import models
from pages.models import Page
+
class PageEntryForm(forms.ModelForm):
class Meta:
model = Page
@@ -14,6 +15,7 @@ class PageEntryForm(forms.ModelForm):
'body_markdown': forms.Textarea(attrs={'rows': 50, 'cols': 100}),
}
+
class PageAdmin(admin.ModelAdmin):
form = PageEntryForm
list_display = ('title', 'slug', 'path', 'app', 'build')
@@ -21,7 +23,7 @@ class PageAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ('title',)}
fieldsets = (
('Page', {
- 'fields': ('title', 'body_markdown', 'build', ('slug', 'path', 'app')),
+ 'fields': ('title', 'sub_title', 'body_markdown', 'build', ('slug', 'path', 'app')),
'classes': ('show', 'extrapretty', 'wide')
}),
('Metadata', {
diff --git a/app/pages/migrations/0005_auto_20190203_1434.py b/app/pages/migrations/0005_auto_20190203_1434.py
new file mode 100644
index 0000000..d1f0062
--- /dev/null
+++ b/app/pages/migrations/0005_auto_20190203_1434.py
@@ -0,0 +1,36 @@
+# Generated by Django 2.1.5 on 2019-02-03 14:34
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('pages', '0004_page_build'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='page',
+ name='sub_title',
+ field=models.CharField(blank=True, max_length=300),
+ ),
+ migrations.AlterField(
+ model_name='page',
+ name='app',
+ field=models.CharField(blank=True, default='', max_length=50),
+ preserve_default=False,
+ ),
+ migrations.AlterField(
+ model_name='page',
+ name='meta_description',
+ field=models.CharField(blank=True, default='', max_length=256),
+ preserve_default=False,
+ ),
+ migrations.AlterField(
+ model_name='page',
+ name='path',
+ field=models.CharField(blank=True, default='', max_length=200),
+ preserve_default=False,
+ ),
+ ]
diff --git a/app/pages/models.py b/app/pages/models.py
index 73c33dd..fa2bbc3 100644
--- a/app/pages/models.py
+++ b/app/pages/models.py
@@ -7,12 +7,13 @@ from utils.util import markdown_to_html, render_images
class Page(models.Model):
title = models.CharField(max_length=200)
+ sub_title = models.CharField(max_length=300, blank=True)
slug = models.SlugField()
body_html = models.TextField(blank=True)
body_markdown = models.TextField()
- meta_description = models.CharField(max_length=256, null=True, blank=True)
- path = models.CharField(max_length=200, null=True, blank=True)
- app = models.CharField(max_length=50, null=True, blank=True)
+ meta_description = models.CharField(max_length=256, blank=True)
+ path = models.CharField(max_length=200, blank=True)
+ app = models.CharField(max_length=50, blank=True)
build = models.BooleanField(default=True)
def __str__(self):