summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-10-10 08:03:52 -0400
committerluxagraf <sng@luxagraf.net>2016-10-10 08:03:52 -0400
commit4f139b09fd16cd0dd59788d1d37beae4cf184fb6 (patch)
tree5221620658537523089b6c05fa825c5fd768fba2 /app
parent3982aeb761dabbf7ec84e51813bf9b07531d332a (diff)
started work on light version of homepage and made it possble for me to
put links in comments
Diffstat (limited to 'app')
-rw-r--r--app/jrnl/admin.py2
-rw-r--r--app/jrnl/migrations/0008_auto_20160906_0845.py33
-rw-r--r--app/jrnl/migrations/0009_homepagecurrator_image_offset_vertical.py21
-rw-r--r--app/jrnl/models.py7
4 files changed, 58 insertions, 5 deletions
diff --git a/app/jrnl/admin.py b/app/jrnl/admin.py
index 54a1046..b49837a 100644
--- a/app/jrnl/admin.py
+++ b/app/jrnl/admin.py
@@ -80,7 +80,7 @@ class EntryAdmin(OSMGeoAdmin):
class HomepageCurratorAdmin(admin.ModelAdmin):
form = GalleryForm
- filter_horizontal = ('entry_list',)
+ filter_horizontal = ('popular',)
pass
diff --git a/app/jrnl/migrations/0008_auto_20160906_0845.py b/app/jrnl/migrations/0008_auto_20160906_0845.py
new file mode 100644
index 0000000..4ac5ebf
--- /dev/null
+++ b/app/jrnl/migrations/0008_auto_20160906_0845.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9 on 2016-09-06 08:45
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('jrnl', '0007_delete_postimage'),
+ ]
+
+ operations = [
+ migrations.RenameField(
+ model_name='homepagecurrator',
+ old_name='banner',
+ new_name='featured',
+ ),
+ migrations.RenameField(
+ model_name='homepagecurrator',
+ old_name='entry_list',
+ new_name='popular',
+ ),
+ migrations.RemoveField(
+ model_name='homepagecurrator',
+ name='alt_text',
+ ),
+ migrations.RemoveField(
+ model_name='homepagecurrator',
+ name='image_base_url',
+ ),
+ ]
diff --git a/app/jrnl/migrations/0009_homepagecurrator_image_offset_vertical.py b/app/jrnl/migrations/0009_homepagecurrator_image_offset_vertical.py
new file mode 100644
index 0000000..5dfbbad
--- /dev/null
+++ b/app/jrnl/migrations/0009_homepagecurrator_image_offset_vertical.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9 on 2016-09-06 09:01
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('jrnl', '0008_auto_20160906_0845'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='homepagecurrator',
+ name='image_offset_vertical',
+ field=models.CharField(default='160px', help_text='add negative top margin to shift image (include css unit)', max_length=20),
+ preserve_default=False,
+ ),
+ ]
diff --git a/app/jrnl/models.py b/app/jrnl/models.py
index 844db12..ceaefa6 100644
--- a/app/jrnl/models.py
+++ b/app/jrnl/models.py
@@ -228,12 +228,11 @@ class EntryAside(models.Model):
class HomepageCurrator(models.Model):
- alt_text = models.CharField(max_length=200)
- image_base_url = models.CharField(max_length=200)
+ image_offset_vertical = models.CharField(max_length=20, help_text="add negative top margin to shift image (include css unit)")
images = models.ManyToManyField(LuxImage)
tag_line = models.CharField(max_length=200)
- banner = models.ForeignKey(Entry, related_name="banner")
- entry_list = models.ManyToManyField(Entry)
+ featured = models.ForeignKey(Entry, related_name="banner")
+ popular = models.ManyToManyField(Entry)
template_name = models.CharField(max_length=200, help_text="full path")