diff options
author | luxagraf <sng@luxagraf.net> | 2019-08-22 12:53:09 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2019-08-22 12:53:09 -0500 |
commit | e4a380fd1543345c83fb4eb95786e7c9c8e2474d (patch) | |
tree | 3f5b2048ce7e87842482c1369f0df964546acdfd /app/pages | |
parent | 83496f9d64763a81e96e25b4a486c2397c306b6c (diff) |
added comments option to pages
Diffstat (limited to 'app/pages')
-rw-r--r-- | app/pages/admin.py | 2 | ||||
-rw-r--r-- | app/pages/migrations/0006_page_enable_comments.py | 18 | ||||
-rw-r--r-- | app/pages/models.py | 1 |
3 files changed, 20 insertions, 1 deletions
diff --git a/app/pages/admin.py b/app/pages/admin.py index 809c2a6..5cd2b23 100644 --- a/app/pages/admin.py +++ b/app/pages/admin.py @@ -23,7 +23,7 @@ class PageAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ('title',)} fieldsets = ( ('Page', { - 'fields': ('title', 'sub_title', 'body_markdown', 'build', ('slug', 'path', 'app')), + 'fields': ('title', 'sub_title', 'body_markdown', ('build', 'enable_comments'), ('slug', 'path', 'app')), 'classes': ('show', 'extrapretty', 'wide') }), ('Metadata', { diff --git a/app/pages/migrations/0006_page_enable_comments.py b/app/pages/migrations/0006_page_enable_comments.py new file mode 100644 index 0000000..25f1c7b --- /dev/null +++ b/app/pages/migrations/0006_page_enable_comments.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.7 on 2019-08-22 13:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pages', '0005_auto_20190203_1434'), + ] + + operations = [ + migrations.AddField( + model_name='page', + name='enable_comments', + field=models.BooleanField(default=False), + ), + ] diff --git a/app/pages/models.py b/app/pages/models.py index fa2bbc3..76f7d1d 100644 --- a/app/pages/models.py +++ b/app/pages/models.py @@ -15,6 +15,7 @@ class Page(models.Model): path = models.CharField(max_length=200, blank=True) app = models.CharField(max_length=50, blank=True) build = models.BooleanField(default=True) + enable_comments = models.BooleanField(default=False) def __str__(self): return self.title |