summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/lttr/templates/lttr/friends_list.html2
-rw-r--r--app/pages/admin.py10
-rw-r--r--app/pages/migrations/0010_page_featured_image.py20
-rw-r--r--app/pages/models.py1
4 files changed, 31 insertions, 2 deletions
diff --git a/app/lttr/templates/lttr/friends_list.html b/app/lttr/templates/lttr/friends_list.html
index 095bb6a..def730e 100644
--- a/app/lttr/templates/lttr/friends_list.html
+++ b/app/lttr/templates/lttr/friends_list.html
@@ -13,7 +13,7 @@
<h1 class="list-hed">Join the <em>Friends of a Long Year</em>.</h1>
<iframe target='_parent' style="border:none; background:white; width:100%;" title="embedded form for subscribing the the Friends of a Long Year newsletter" src="{% url 'lttr:subscribe' slug='friends' %}"></iframe>
<h2 class="subhead">Say what? </h2>
- <p><em>Friends of a Long Year</em> is a monthly letter about living outdoors, travel, literature, music, vintage vehicles, and other ephemera. Unsubscribing is easy. It's all self-hosted, secure, and&nbsp;<a href="/privacy" title="My privacy policy">private</a>.</p>
+ <p><em>Friends of a Long Year</em> is a monthly letter about living outdoors, travel, literature, music, vintage vehicles, and other ephemera. Unsubscribing is easy. It's all <a href="/src/building-your-own-mailing-list-software">self-hosted</a>, secure, and&nbsp;<a href="/privacy" title="My privacy policy">private</a>.</p>
<p>The name <em>Friends of a Long Year</em> comes from the early 20th century explorer and desert rat, Mary Hunter Austin, whose collected essays, <a href="https://archive.org/details/lostbordersillu00brotgoog/page/n8"><cite>Lost Borders</cite></a> is dedicated to the "Friends of a Long Year".</p>
<p>While I came up with this name last year, it seems particularly fitting in 2020, which is shaping up to be a long year. If you like to travel with friends, mentally for now, please, join us.</p>
</div>
diff --git a/app/pages/admin.py b/app/pages/admin.py
index b7c8962..bd37223 100644
--- a/app/pages/admin.py
+++ b/app/pages/admin.py
@@ -25,7 +25,7 @@ class PageAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ('title',)}
fieldsets = (
('Page', {
- 'fields': ('title', 'sub_title', 'body_markdown', ('build', 'enable_comments'), ('site','slug', 'path', 'app')),
+ 'fields': ('title', 'sub_title', 'body_markdown', ('build', 'enable_comments'), ('site','slug', 'path', 'app'), 'featured_image'),
'classes': ('show', 'extrapretty', 'wide')
}),
('Metadata', {
@@ -34,6 +34,14 @@ class PageAdmin(admin.ModelAdmin):
})
)
+ class Media:
+ js = ('image-loader.js', 'product-loader.js', 'next-prev-links.js')
+ css = {
+ "all": ("my_styles.css",)
+ }
+
+
+
@admin.register(HomePage)
class HomePageAdmin(admin.ModelAdmin):
diff --git a/app/pages/migrations/0010_page_featured_image.py b/app/pages/migrations/0010_page_featured_image.py
new file mode 100644
index 0000000..931403f
--- /dev/null
+++ b/app/pages/migrations/0010_page_featured_image.py
@@ -0,0 +1,20 @@
+# Generated by Django 3.1 on 2020-11-25 15:02
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('photos', '0019_auto_20190704_0903'),
+ ('pages', '0009_page_site'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='page',
+ name='featured_image',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='photos.luximage'),
+ ),
+ ]
diff --git a/app/pages/models.py b/app/pages/models.py
index fac815c..d3473a6 100644
--- a/app/pages/models.py
+++ b/app/pages/models.py
@@ -20,6 +20,7 @@ class Page(models.Model):
build = models.BooleanField(default=True)
enable_comments = models.BooleanField(default=False)
site = models.ForeignKey(Site, on_delete=models.CASCADE)
+ featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True)
def __str__(self):
return self.title