summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/builder/views.py7
-rw-r--r--app/gtd/admin.py9
-rw-r--r--app/notes/admin.py28
-rw-r--r--app/notes/forms.py15
-rw-r--r--app/notes/migrations/0001_initial.py30
-rw-r--r--app/notes/migrations/0002_luxnote_tags.py20
-rw-r--r--app/notes/migrations/__init__.py (renamed from app/budget/migrations/__init__.py)0
-rw-r--r--app/notes/models.py48
-rw-r--r--app/notes/templates/confirm_delete.html12
-rw-r--r--app/notes/templates/note_detail.html25
-rw-r--r--app/notes/templates/note_form.html37
-rw-r--r--app/notes/templates/note_list.html32
-rw-r--r--app/notes/templates/project_detail.html40
-rw-r--r--app/notes/templates/project_form.html35
-rw-r--r--app/notes/templates/project_list.html25
-rw-r--r--app/notes/urls.py39
-rw-r--r--app/notes/views.py72
-rw-r--r--app/posts/build.py12
-rw-r--r--app/posts/models.py2
-rw-r--r--app/posts/templates/photo_essay_detail.html6
-rw-r--r--app/posts/templates/photo_essay_list.html47
-rw-r--r--app/posts/urls/__init__old.py4
-rw-r--r--app/posts/urls/friends_urls.py25
-rw-r--r--app/posts/urls/guide_urls.py30
-rw-r--r--app/posts/urls/range_urls.py20
-rw-r--r--app/posts/urls/trip_urls.py25
-rw-r--r--app/posts/views/photo_essay_views.py10
-rw-r--r--app/trading/admin.py2
-rw-r--r--app/utils/util.py18
-rw-r--r--bak/unused_apps/budget/0007_luxpurchase_cat.py (renamed from app/budget/0007_luxpurchase_cat.py)0
-rw-r--r--bak/unused_apps/budget/admin.py (renamed from app/budget/admin.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0001_initial.py (renamed from app/budget/migrations/0001_initial.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0002_alter_luxpurchase_amount.py (renamed from app/budget/migrations/0002_alter_luxpurchase_amount.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py (renamed from app/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0004_alter_luxpurchase_source.py (renamed from app/budget/migrations/0004_alter_luxpurchase_source.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py (renamed from app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py (renamed from app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0007_luxpurchase_cat.py (renamed from app/budget/migrations/0007_luxpurchase_cat.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0008_remove_luxpurchase_category.py (renamed from app/budget/migrations/0008_remove_luxpurchase_category.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0009_rename_cat_luxpurchase_category.py (renamed from app/budget/migrations/0009_rename_cat_luxpurchase_category.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0010_luxfixedmonthly_amount.py (renamed from app/budget/migrations/0010_luxfixedmonthly_amount.py)0
-rw-r--r--bak/unused_apps/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py (renamed from app/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py)0
-rw-r--r--bak/unused_apps/budget/migrations/__init__.py (renamed from app/resume/migrations/__init__.py)0
-rw-r--r--bak/unused_apps/budget/models.py (renamed from app/budget/models.py)0
-rw-r--r--bak/unused_apps/budget/templates/budget/base.html (renamed from app/budget/templates/budget/base.html)0
-rw-r--r--bak/unused_apps/budget/templates/budget/create_cat_form.html (renamed from app/budget/templates/budget/create_cat_form.html)0
-rw-r--r--bak/unused_apps/budget/templates/budget/create_form.html (renamed from app/budget/templates/budget/create_form.html)0
-rw-r--r--bak/unused_apps/budget/templates/budget/luxpurchase_list.html (renamed from app/budget/templates/budget/luxpurchase_list.html)0
-rw-r--r--bak/unused_apps/budget/templates/budget/update_form.html (renamed from app/budget/templates/budget/update_form.html)0
-rw-r--r--bak/unused_apps/budget/urls.py (renamed from app/budget/urls.py)0
-rw-r--r--bak/unused_apps/budget/views.py (renamed from app/budget/views.py)0
-rw-r--r--bak/unused_apps/resume/admin.py (renamed from app/resume/admin.py)0
-rw-r--r--bak/unused_apps/resume/build.py (renamed from app/resume/build.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0001_initial.py (renamed from app/resume/migrations/0001_initial.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0002_auto_20151207_2105.py (renamed from app/resume/migrations/0002_auto_20151207_2105.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0003_auto_20151211_1925.py (renamed from app/resume/migrations/0003_auto_20151211_1925.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0004_job_resume.py (renamed from app/resume/migrations/0004_job_resume.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0005_job_slug.py (renamed from app/resume/migrations/0005_job_slug.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0006_auto_20190112_1257.py (renamed from app/resume/migrations/0006_auto_20190112_1257.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0007_auto_20190113_1128.py (renamed from app/resume/migrations/0007_auto_20190113_1128.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0008_auto_20190113_1139.py (renamed from app/resume/migrations/0008_auto_20190113_1139.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0009_job_body_html.py (renamed from app/resume/migrations/0009_job_body_html.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0010_auto_20190113_1147.py (renamed from app/resume/migrations/0010_auto_20190113_1147.py)0
-rw-r--r--bak/unused_apps/resume/migrations/0011_auto_20190114_0227.py (renamed from app/resume/migrations/0011_auto_20190114_0227.py)0
-rw-r--r--bak/unused_apps/resume/migrations/__init__.py0
-rw-r--r--bak/unused_apps/resume/models.py (renamed from app/resume/models.py)0
-rw-r--r--bak/unused_apps/resume/urls.py (renamed from app/resume/urls.py)0
-rw-r--r--bak/unused_apps/resume/views.py (renamed from app/resume/views.py)0
-rw-r--r--config/base_urls.py56
-rw-r--r--templates/base.html6
-rw-r--r--templates/base_notes.html43
-rw-r--r--templates/lib/img_cluster.html17
-rw-r--r--templates/lib/img_wideessay.html0
73 files changed, 628 insertions, 169 deletions
diff --git a/app/builder/views.py b/app/builder/views.py
index 211b585..c39297d 100644
--- a/app/builder/views.py
+++ b/app/builder/views.py
@@ -2,11 +2,11 @@ from django.shortcuts import render
from django.template import RequestContext
#from builder.base import BuildWriting, BuildWritingFeed, BuildMap, BuildPhotos, BuildProjects, BuildSitemap
#from jrnl.build import archive_builder, detail_builder, home_builder, rss_builder, map_builder
-from resume.build import pub_builder, resume_builder
+#from resume.build import pub_builder, resume_builder
from books.build import builder as book_builder
from sightings.build import builder as sightings_builder
from pages.build import BuildPages, BuildHome
-from posts.build import BuildJrnl, BuildFieldNotes, BuildSrc, BuildGuide, BuildEssays, BuildRange, BuildFriends, BuildFilms, BuildTrips, BuildSitemap
+from posts.build import BuildJrnl, BuildFieldNotes, BuildSrc, BuildGuide, BuildEssays, BuildRange, BuildFriends, BuildFilms, BuildTrips, BuildSitemap, BuildPhotoEssays
def do_build(request):
section = request.GET.get('id', '')
@@ -28,6 +28,9 @@ def do_build(request):
elif section == 'homepage':
context = {'message': 'Writing index to Disk'}
BuildHome("pages", "homepage").build()
+ elif section == 'photos':
+ context = {'message': 'Writing Photo Essasy to Disk'}
+ BuildPhotoEssays("posts", "post").build()
elif section == 'films':
context = {'message': 'Writing films to Disk'}
BuildFilms("posts", "post").build()
diff --git a/app/gtd/admin.py b/app/gtd/admin.py
index 7335727..49520f2 100644
--- a/app/gtd/admin.py
+++ b/app/gtd/admin.py
@@ -5,7 +5,9 @@ from utils.widgets import AdminImageWidget, LGEntryForm
from .models import (
WiredNote,
WiredPost,
- WiredUpdate
+ WiredUpdate,
+ GTDNote,
+ GTDProject
)
@admin.register(WiredPost)
class WiredPostAdmin(admin.ModelAdmin):
@@ -22,3 +24,8 @@ class WiredPostAdmin(admin.ModelAdmin):
class WiredUpdateAdmin(admin.ModelAdmin):
list_display = ('name', 'date')
+
+@admin.register(GTDNote)
+class GTDNoteAdmin(admin.ModelAdmin):
+ list_display = ('title', 'project','url', 'note_type' )
+ list_filter = ['project', 'note_type']
diff --git a/app/notes/admin.py b/app/notes/admin.py
new file mode 100644
index 0000000..931e2e0
--- /dev/null
+++ b/app/notes/admin.py
@@ -0,0 +1,28 @@
+from django.contrib import admin
+
+from utils.widgets import AdminImageWidget, LGEntryForm, TagListFilter
+
+from .models import (
+ LuxNote,
+)
+
+
+@admin.register(LuxNote)
+class LuxNoteAdmin(admin.ModelAdmin):
+ list_display = ('title', 'admin_link', 'date_created', 'admin_tags')
+ search_fields = ['title', 'description', 'url']
+ list_filter = [TagListFilter]
+ fieldsets = (
+ (None, {
+ 'fields': (
+ 'title',
+ 'url',
+ 'description',
+ 'body_markdown',
+ 'tags',
+ )
+ }),
+ )
+
+ class Media:
+ js = ('next-prev-links.js',)
diff --git a/app/notes/forms.py b/app/notes/forms.py
new file mode 100644
index 0000000..72395c6
--- /dev/null
+++ b/app/notes/forms.py
@@ -0,0 +1,15 @@
+from django.forms import ModelForm
+
+from .models import LuxNote
+
+
+class LuxNoteCreateForm(ModelForm):
+ class Meta:
+ model = LuxNote
+ fields = ['title', 'url', 'description', 'body_markdown', 'tags' ]
+
+
+class LuxNoteEditForm(ModelForm):
+ class Meta:
+ model = LuxNote
+ fields = ['title', 'url', 'description', 'body_markdown', 'tags' ]
diff --git a/app/notes/migrations/0001_initial.py b/app/notes/migrations/0001_initial.py
new file mode 100644
index 0000000..deb651d
--- /dev/null
+++ b/app/notes/migrations/0001_initial.py
@@ -0,0 +1,30 @@
+# Generated by Django 5.1.7 on 2025-04-07 16:21
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='LuxNote',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(max_length=200)),
+ ('url', models.CharField(blank=True, max_length=400, null=True)),
+ ('description', models.TextField(blank=True, null=True)),
+ ('body_markdown', models.TextField(blank=True, null=True)),
+ ('body_html', models.TextField(blank=True)),
+ ('date_created', models.DateTimeField(auto_now=True)),
+ ],
+ options={
+ 'ordering': ('-date_created',),
+ 'get_latest_by': 'date_created',
+ },
+ ),
+ ]
diff --git a/app/notes/migrations/0002_luxnote_tags.py b/app/notes/migrations/0002_luxnote_tags.py
new file mode 100644
index 0000000..6cb50be
--- /dev/null
+++ b/app/notes/migrations/0002_luxnote_tags.py
@@ -0,0 +1,20 @@
+# Generated by Django 5.1.7 on 2025-04-07 16:22
+
+import taggit.managers
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('notes', '0001_initial'),
+ ('taggit', '0006_rename_taggeditem_content_type_object_id_taggit_tagg_content_8fc721_idx'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='luxnote',
+ name='tags',
+ field=taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags'),
+ ),
+ ]
diff --git a/app/budget/migrations/__init__.py b/app/notes/migrations/__init__.py
index e69de29..e69de29 100644
--- a/app/budget/migrations/__init__.py
+++ b/app/notes/migrations/__init__.py
diff --git a/app/notes/models.py b/app/notes/models.py
new file mode 100644
index 0000000..76670f5
--- /dev/null
+++ b/app/notes/models.py
@@ -0,0 +1,48 @@
+import datetime
+
+from django.db import models
+from django.urls import reverse
+from django.utils import timezone
+from django.utils.html import format_html, format_html_join
+
+from taggit.managers import TaggableManager
+from utils.util import markdown_to_html
+
+
+#class LuxProject(models.Model):
+
+class LuxNote(models.Model):
+ title = models.CharField(max_length=200)
+ url = models.CharField(max_length=400, blank=True, null=True)
+ description = models.TextField(blank=True, null=True)
+ body_markdown = models.TextField(null=True, blank=True)
+ body_html = models.TextField(blank=True)
+ date_created = models.DateTimeField(auto_now=True)
+ #project = models.ForeignKey(LuxProject, on_delete=models.SET_NULL, null=True, blank=True)
+ tags = TaggableManager(blank=True)
+
+ class Meta:
+ ordering = ('-date_created',)
+ get_latest_by = 'date_created'
+
+ def __str__(self):
+ return self.title
+
+ def admin_link(self):
+ return format_html('<a href="%s">Visit Site</a>' % (self.url))
+ admin_link.short_description = 'Link'
+
+ def save(self, *args, **kwargs):
+ if self.body_markdown:
+ self.body_html = markdown_to_html(self.body_markdown)
+ super(LuxNote, self).save(*args, **kwargs)
+
+ def admin_tags(self):
+ return format_html_join(
+ '\n', "<a href='/admin/links/link?tag={}'>{}</a>,",
+ ((tag.slug, tag.name) for tag in self.tags.all())
+ )
+ admin_tags.short_description = 'Tags'
+
+ def get_absolute_url(self, *args, **kwargs):
+ return reverse('notes:note-edit', kwargs={"pk": self.pk})
diff --git a/app/notes/templates/confirm_delete.html b/app/notes/templates/confirm_delete.html
new file mode 100644
index 0000000..8e657b1
--- /dev/null
+++ b/app/notes/templates/confirm_delete.html
@@ -0,0 +1,12 @@
+<form method="post">{% csrf_token %}
+
+
+
+
+<p>Are you sure you want to delete "{{ object }}"?</p>
+
+
+
+
+ <input type="submit" value="Confirm">
+</form>
diff --git a/app/notes/templates/note_detail.html b/app/notes/templates/note_detail.html
new file mode 100644
index 0000000..5dc7ace
--- /dev/null
+++ b/app/notes/templates/note_detail.html
@@ -0,0 +1,25 @@
+{% extends 'base_notes.html' %}
+{% block primary %}
+<style>
+p {
+ margin-top: 1rem !important;
+ margin-bottom: 1rem;
+}
+</style>
+<main class="post-detail">
+ <div class="note-list">
+ <article>
+ <h2>{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'notes:note-edit' object.id %}">edit</a></span></h2>
+ <p>{{object.description}}</p>
+ --------------------
+ <p>{{object.body_html|safe}}</p>
+ <p class="small"><a href="{% url 'notes:note-delete' object.pk %}">delete</a></p>
+ </article>
+</div>
+</main>
+
+
+{% endblock %}
+{% block js %}
+<script type="text/javascript">var go_from_select = function(opt) { window.location = window.location.pathname + opt };</script>
+{% endblock%}
diff --git a/app/notes/templates/note_form.html b/app/notes/templates/note_form.html
new file mode 100644
index 0000000..3924d48
--- /dev/null
+++ b/app/notes/templates/note_form.html
@@ -0,0 +1,37 @@
+{% extends 'base_notes.html' %}
+{% block extrahead %}
+<style>
+form .selector label {
+ position: inherit;
+}
+</style>
+<script src="/media/js/nice-select2.js"></script>
+<link rel="stylesheet" href="/media/nice-select2.css">
+{% endblock %}
+{% block primary %}
+<main role="main" class="archive-wrapper">
+ <div class="post-body">
+ <form action="" method="post" class="comment-form">{% csrf_token %}
+ {% for field in form %}
+ <fieldset>
+ {%if field.name == "project" or field.name == "status" or field.name == 'note_type'%}<span class="selector">{{field.label_tag}}</span>{%else%}{{field.label_tag}}{%endif%}
+ {%if field.name == "body_markdown" or field.name == "description" %}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endif%}
+ </fieldset>
+ <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small>
+ {%endfor%}
+ <input class="btn" type="submit" name="add_new" value="Save and add another" />
+ <input type="submit" name="save" class="btn" value="Save" />
+ </form>
+ </div>
+</main>
+{% endblock %}
+ {% block js %}
+<script type="text/javascript">
+{% if is_update %}{%else%}
+let params = new URL(document.location).searchParams;
+document.getElementById('id_title').value = params.get("title");
+document.getElementById('id_url').value = params.get("url");
+document.getElementById('id_description').value = params.get("description");
+{% endif %}
+</script>
+ {% endblock%}
diff --git a/app/notes/templates/note_list.html b/app/notes/templates/note_list.html
new file mode 100644
index 0000000..e262558
--- /dev/null
+++ b/app/notes/templates/note_list.html
@@ -0,0 +1,32 @@
+{% extends 'base_notes.html' %}
+{% block primary %}
+<main class="post-detail">
+ <div class="post-header"><ul class="flex header-list">
+ <li><a class="btn" href="{% url 'notes:note-list' %}">All</a></li>
+ {% for object in note_types %}
+ <li><a class="btn" href="{% url 'gtd:note-list-status' object.label|lower%}">{{object.label}}</a></li>
+ {% endfor %}
+ <li class="right"><a href="{% url 'notes:note-create' %}" class="btn">New Note</a></li>
+ </ul>
+
+<select class="form-control" style="margin-top: 2%;" onchange="go_from_select(this.options[this.selectedIndex].value)">
+ <option value="">All Projects</option>{% for object in tags %}
+ <option {% if current == object.name %}selected="selected" {%endif%}value="?tag={{object}}">{{object}}</option>{%endfor%}
+</select>
+ </div>
+ <div class="note-list">{% for object in object_list %}<article>
+ <h2>{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'notes:note-edit' object.id %}">edit</a></span></h2>
+ <p>{{object.description}}</p>
+ {% if object.project %}<p class="small">For: <a href="{% url 'notes:project-detail' object.project.id %}">{{object.project}}</a></p>{%endif%}
+ <p class="note-edit">TAGS: {% for tag in object.tags.all %}<a href="/notes/?tag={{tag}}">{{tag}}</a>, {%endfor%}</p>
+ <p class="note-edit"><a href="{% url 'notes:note-detail' object.pk %}">View local</a></p>
+ <p class="small"><a href="{% url 'notes:note-delete' object.pk %}">delete</a></p>
+ </article>
+{% endfor%}</div>
+</main>
+
+
+{% endblock %}
+{% block js %}
+<script type="text/javascript">var go_from_select = function(opt) { window.location = window.location.pathname + opt };</script>
+{% endblock%}
diff --git a/app/notes/templates/project_detail.html b/app/notes/templates/project_detail.html
new file mode 100644
index 0000000..543b9f6
--- /dev/null
+++ b/app/notes/templates/project_detail.html
@@ -0,0 +1,40 @@
+{% extends 'base_gtd.html' %}
+{% load typogrify_tags %}
+{% load get_note_type %}
+{% block extrahead %}
+<style>
+.detail-header {
+ margin-top: 3rem;
+ margin-bottom: 1rem;
+ padding-bottom: 1rem;
+}
+</style>
+{% endblock %}
+{% block primary %}
+<main role="main" class="archive-wrapper">
+ <div class="post-header detail-header">
+ <h1>Project: {{object.title}}</h1>
+
+<select class="form-control" style="margin-top: 2%;" onchange="go_from_select(this.options[this.selectedIndex].value)">
+ <option value="">All Projects</option>{% for object in projects %}
+ <option {% if object.title == project %}selected="selected" {%endif%}value="{% url 'gtd:project-detail' object.id%}">{{object}}</option>{%endfor%}
+</select>
+ </div>
+ <div class="post-body">
+ {{object.body_html|smartypants|safe}}
+ {% regroup note_set by note_type as type_list %}
+ {% for type in type_list %}
+ <h4>{% get_note_type type.grouper %}</h4>
+ <div class="note-list">{% for object in type.list %}<article>
+ <h2>{% if object.get_status_display == 'Completed' %}<strike style="color: #918d8d">{%endif%}{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'gtd:note-edit' object.pk%}">edit</a></span>{% if object.get_status_display == 'Completed' %}</strike>{%endif%}</h2>
+ {{object.body_html|smartypants|safe}}
+ {% if object.get_status_display != 'None' %}<p class="small">{{object.get_status_display}}</p>{% endif %}
+ <p class="small"><a href="{% url 'gtd:note-delete' object.pk %}">delete</a></p></article>
+ {% endfor %}</div>
+{% endfor %}
+ </div>
+</main>
+{% endblock %}
+{% block js %}
+<script type="text/javascript">var go_from_select = function(opt) { console.log(opt); window.location = opt };</script>
+{% endblock%}
diff --git a/app/notes/templates/project_form.html b/app/notes/templates/project_form.html
new file mode 100644
index 0000000..ac7d13f
--- /dev/null
+++ b/app/notes/templates/project_form.html
@@ -0,0 +1,35 @@
+{% extends 'base_gtd.html' %}
+
+{% block extrahead %}
+<style>
+form .selector label {
+ position: inherit;
+}
+</style>
+{% endblock %}
+{% block primary %}
+<main role="main" class="archive-wrapper">
+ <div class="post-body">
+ <form action="" method="post" class="comment-form">{% csrf_token %}
+ {% for field in form %}
+ <fieldset>
+ {%if field.name == "project_type" or field.name == "outcome" or field.name == 'note_type'%}<span class="selector">{{field.label_tag}}</span>{%else%}{{field.label_tag}}{%endif%}
+ {%if field.name == "body_markdown"%}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endif%}
+ </fieldset>
+ <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small>
+ {%endfor%}
+ <input class="btn" type="submit" name="add_new" value="Save and add another" />
+ <input type="submit" name="save" class="btn" value="Save" />
+ </form>
+ </div>
+</main>
+{% endblock %}
+ {% block js %}
+ {% if is_update %}{%else%}
+<script type="text/javascript">
+let params = new URL(document.location).searchParams;
+document.getElementById('id_title').value = params.get("title");
+document.getElementById('id_body_markdown').value = params.get("description");
+</script>
+{% endif %}
+ {% endblock%}
diff --git a/app/notes/templates/project_list.html b/app/notes/templates/project_list.html
new file mode 100644
index 0000000..ba46b59
--- /dev/null
+++ b/app/notes/templates/project_list.html
@@ -0,0 +1,25 @@
+{% extends 'base_gtd.html' %}
+{% block primary %}
+<main class="post-detail">
+ <div class="post-header"><ul class="flex header-list">
+ <li><a class="btn" href="{% url 'gtd:project-list' %}">All</a></li>
+ {% for object in project_types %}
+ <li><a class="btn" href="{% url 'gtd:project-list-type' object.1|lower%}">{%if object.1 == 'Lbh'%}{{object.1|upper}}{%else%}{{object.1}}{%endif%}</a></li>
+ {% endfor %}
+ <li class="right"><a href="{% url 'gtd:project-create' %}" class="btn">New</a></li>
+ </ul>
+ </div>
+ <div class="note-list">{% for object in object_list %}<article>
+ <h2><a href="{{object.get_absolute_url}}">{{object.title}}</a><span class="note-edit"><a href="{% url 'gtd:project-edit' object.pk %}">edit</a></span></h2>
+ <p>{{object.body_markdown}}</p>
+ <p class="small">Date Goal: {{object.date_goal}}</p>
+ <p class="small">Type: {{object.get_project_type_display}}</p>
+ <p class="small"><a href="{% url 'gtd:project-delete' object.pk %}">delete</a></p>
+ </article>
+{% endfor%}</div>
+</main>
+
+
+{% endblock %}
+{% block js %}
+{% endblock%}
diff --git a/app/notes/urls.py b/app/notes/urls.py
new file mode 100644
index 0000000..cdab47c
--- /dev/null
+++ b/app/notes/urls.py
@@ -0,0 +1,39 @@
+from django.urls import path
+
+from . import views
+
+app_name = "notes"
+
+urlpatterns = [
+ path(
+ r'',
+ views.LuxNoteListView.as_view(),
+ {'note_type': None},
+ name="note-list"
+ ),
+ path(
+ r'create',
+ views.LuxNoteCreateView.as_view(),
+ name="note-create"
+ ),
+ path(
+ r'<pk>',
+ views.LuxNoteDetailView.as_view(),
+ name="note-detail"
+ ),
+ path(
+ r'<str:note_type>',
+ views.LuxNoteListView.as_view(),
+ name="note-list-status"
+ ),
+ path(
+ r'<pk>/edit',
+ views.LuxNoteUpdateView.as_view(),
+ name="note-edit"
+ ),
+ path(
+ r'<pk>/delete',
+ views.LuxNoteDeleteView.as_view(),
+ name="note-delete"
+ ),
+]
diff --git a/app/notes/views.py b/app/notes/views.py
new file mode 100644
index 0000000..53811d0
--- /dev/null
+++ b/app/notes/views.py
@@ -0,0 +1,72 @@
+from django.views.generic import UpdateView, DetailView, ListView, CreateView, DeleteView, RedirectView
+from django.views.generic.base import TemplateView
+from django.urls import reverse, reverse_lazy
+from django.db.models import Q
+from django.db.models import Count
+
+#from taxonomy.models import Category
+
+from .models import (
+ LuxNote,
+)
+
+from .forms import (
+ LuxNoteCreateForm,
+ LuxNoteEditForm,
+)
+
+
+class LuxNoteCreateView(CreateView):
+ model = LuxNote
+ form_class = LuxNoteCreateForm
+ template_name = "note_form.html"
+
+ def get_success_url(self):
+ if 'add_new' in self.request.POST:
+ return reverse('notes:note-create')
+ else:
+ return reverse('notes:note-create')
+
+
+class LuxNoteUpdateView(UpdateView):
+ model = LuxNote
+ form_class = LuxNoteEditForm
+ template_name = "note_form.html"
+
+ def get_context_data(self, **kwargs):
+ context = super(LuxNoteUpdateView, self).get_context_data(**kwargs)
+ context['is_update'] = True
+ return context
+
+ def get_success_url(self):
+ return reverse('notes:note-list')
+
+
+class LuxNoteListView(ListView):
+ model = LuxNote
+ template_name = "note_list.html"
+
+ def get_queryset(self):
+ tag = self.request.GET.get("tag", False)
+ if tag:
+ return LuxNote.objects.filter(tags__name__in=[tag])
+ return LuxNote.objects.all()
+
+ def get_context_data(self, **kwargs):
+ context = super(LuxNoteListView, self).get_context_data(**kwargs)
+ context['tags'] = LuxNote.tags.all().order_by('name')
+ context['current'] = self.request.GET.get("tag", False)
+ return context
+
+
+class LuxNoteDeleteView(DeleteView):
+ # specify the model you want to use
+ model = LuxNote
+ success_url = "/notes/"
+ template_name = "confirm_delete.html"
+
+
+class LuxNoteDetailView(DetailView):
+ model = LuxNote
+ template_name = "note_detail.html"
+
diff --git a/app/posts/build.py b/app/posts/build.py
index fdfcd1a..ba0fe27 100644
--- a/app/posts/build.py
+++ b/app/posts/build.py
@@ -175,6 +175,18 @@ class BuildFilms(BuildNew):
self.build_detail_view()
+class BuildPhotoEssays(BuildNew):
+
+ def get_model_queryset(self):
+ return self.model.objects.filter(post_type=PostType.PHOTO_ESSAY).filter(status__exact=1).order_by('-pub_date')
+
+ def build(self):
+ self.build_list_view(
+ base_path=reverse("photo_essay:list"),
+ paginate_by=30
+ )
+ self.build_detail_view()
+
class BuildTrips(BuildNew):
def get_model_queryset(self):
diff --git a/app/posts/models.py b/app/posts/models.py
index 6179fbe..ba578b8 100644
--- a/app/posts/models.py
+++ b/app/posts/models.py
@@ -135,6 +135,8 @@ class Post(models.Model):
return self.title
def get_absolute_url(self):
+ if self.post_type == PostType.PHOTO_ESSAY:
+ return reverse('photo_essay:detail', kwargs={"slug": self.slug})
if self.post_type == PostType.ESSAY:
return reverse('essays:detail', kwargs={"cat": self.get_post_topic_display(), "slug": self.slug})
if self.post_type == PostType.SRC:
diff --git a/app/posts/templates/photo_essay_detail.html b/app/posts/templates/photo_essay_detail.html
index 8195ae7..de735f2 100644
--- a/app/posts/templates/photo_essay_detail.html
+++ b/app/posts/templates/photo_essay_detail.html
@@ -9,7 +9,7 @@
{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
{% block primary %}
<main role="main">
- <figure class="large-top-image">{%with object=object_list%}
+ <figure class="large-top-image">
<a href="{{object.get_absolute_url}}" title="{{object.title}}">{%with image=object.featured_image%}
<img style="margin:0;" sizes="(max-width: 960px) 100vw"
srcset="{{image.get_srcset}}"
@@ -18,7 +18,7 @@
</a>
</figure>{%endwith%}
<div class="folio-wrapper">
- <article class="h-entry hentry content" itemscope itemType="http://schema.org/BlogPosting">
+ <article class="h-entry hentry" itemscope itemType="http://schema.org/BlogPosting">
<header id="header" class="post-header">
<h1 class="p-name post-title" itemprop="headline">{{object.title|smartypants|safe}}</h1>
<div class="post-dateline">
@@ -30,5 +30,5 @@
{{object.body_html|safe|smartypants}}
</div>
</div>
- </main>{%endwith%}
+ </main>
{% endblock%}
diff --git a/app/posts/templates/photo_essay_list.html b/app/posts/templates/photo_essay_list.html
new file mode 100644
index 0000000..e8bebfd
--- /dev/null
+++ b/app/posts/templates/photo_essay_list.html
@@ -0,0 +1,47 @@
+{% extends 'base.html' %}
+{%block htmlclass%}class="detail single"{% endblock %}
+{% load typogrify_tags %}
+{% load get_image_by_size %}
+{% load html5_datetime %}
+{% load pagination_tags %}
+{% block pagetitle %} Photos | luxagraf {% endblock %}
+{% block metadescription %} Recent Images {% endblock %}
+{%block bodyid%}class="photos" id="notes-archive"{%endblock%}
+{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
+{% block primary %}
+ <main class="archive-wrapper">
+ <div class="archive-intro">
+ <h1>Photos</h1>
+ <h3>I first picked up a camera in the late 1980s and started documenting trips into the mountains, inspired by <a href="https://en.wikipedia.org/wiki/Galen_Rowell">Galen Rowell</a>. These are ongoing projects, updated regularly.</h3>
+ <hr />
+ <h2>Join us. Subscribe to <em>Friends of a Long Year</em></h2>
+ <iframe target='_parent' style="border:none; background:white; width:100%;" title="embedded form for subscribing the the Friends of a Long Year newsletter" onload="resizeIframe(this)" src="{% url 'lttr:subscribe' slug='friends' %}"></iframe>
+ </div>
+ <ul class="photo-list">{% for object in object_list %}
+ <li class="h-entry hentry" itemscope itemType="http://schema.org/BlogPosting">{% get_image_by_size object.featured_image 'featured_photo_essay' as featured %}
+ <figure>
+ <a href="{{object.get_absolute_url}}">
+ <img src="{{featured}}" alt="{{object.featured_image.alt}} photographed by Scott Gilbertson">
+ </a>
+ <figcaption>
+ <h1 class="p-name" itemprop="headline">{{object.title|smartypants|safe}}</h1>
+ <time class="dt-published published dt-updated card-smcaps" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished"> &nbsp;&ndash; Last update: {{object.last_updated|date:"F Y"}}</time>
+ <span class="hide" itemprop="author" itemscope itemtype="http://schema.org/Person">by <span class="p-author h-card" ><span itemprop="name">Scott Gilbertson</span></span></span>
+ {%if object.location %}<span class="p-location h-adr adr card-smcaps" itemprop="contentLocation" itemscope itemtype="http://schema.org/Place">(
+ {% if object.location.country_name == "United States" %}<span class="p-locality locality">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/jrnl/united-states/" title="travel writing from the United States">{{object.location.state_name}}</a>, <span class="p-country-name">U.S.</span>{%else%}<span class="p-region">{{object.location.name|smartypants|safe}}</span>, <a class="p-country-name country-name" href="/jrnl/{{object.location.country_slug}}/" title="travel writing from {{object.location.country_name}}">{{object.location.country_name}}</a>{%endif%}
+ )</span>{%endif%}
+ </figcaption>
+ </figure>
+ </a>
+ </li>{%endfor%}
+ </ul>
+ </main>
+{% endblock%}
+{% block js %}
+
+<script>
+ function resizeIframe(obj) {
+ obj.style.height = (obj.contentWindow.document.body.scrollHeight - 75) + 'px';
+ }
+</script>
+{% endblock %}
diff --git a/app/posts/urls/__init__old.py b/app/posts/urls/__init__old.py
deleted file mode 100644
index 4993c34..0000000
--- a/app/posts/urls/__init__old.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from .guide_urls import urlpatterns as guide_urlpatterns
-from .reviews_urls import urlpatterns as review_urlpatterns
-
-urlpatterns = review_urlpatterns + guide_urlpatterns
diff --git a/app/posts/urls/friends_urls.py b/app/posts/urls/friends_urls.py
deleted file mode 100644
index ca68ca0..0000000
--- a/app/posts/urls/friends_urls.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import friends_views as views
-
-app_name = "range"
-
-urlpatterns = [
- # path(
- # r'feed.xml',
- # views.FriendsRSSFeedView(),
- # name="feed"
- # ),
- # path(
- # r'<int:issue>/<str:slug>',
- # views.FriendsDetailView.as_view(),
- # name="friends-detail"
- # ),
- path(
- r'',
- views.FriendsListView.as_view(),
- {'page':1},
- name="friends-list"
- ),
-]
diff --git a/app/posts/urls/guide_urls.py b/app/posts/urls/guide_urls.py
deleted file mode 100644
index 5e2b37e..0000000
--- a/app/posts/urls/guide_urls.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import guide_views as views
-
-app_name = "guides"
-
-urlpatterns = [
- path(
- r'',
- views.GuideListView.as_view(),
- {'page':1},
- name="guide-list"
- ),
- path(
- r'<int:page>/',
- views.GuideListView.as_view(),
- name="guide-list"
- ),
- path(
- r'<str:topic>/<str:slug>',
- views.GuidePostDetailView.as_view(),
- name="guide-post-detail"
- ),
- path(
- r'<str:slug>/',
- views.GuideDetailView.as_view(),
- name="guide-detail"
- ),
-]
diff --git a/app/posts/urls/range_urls.py b/app/posts/urls/range_urls.py
deleted file mode 100644
index 65638ce..0000000
--- a/app/posts/urls/range_urls.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import range_views as views
-
-app_name = "range"
-
-urlpatterns = [
- path(
- r'',
- views.RangeListView.as_view(),
- {'page':1},
- name="list"
- ),
- path(
- r'<int:page>',
- views.RangeListView.as_view(),
- name="list"
- ),
-]
diff --git a/app/posts/urls/trip_urls.py b/app/posts/urls/trip_urls.py
deleted file mode 100644
index 7e9c95f..0000000
--- a/app/posts/urls/trip_urls.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import trip_views as views
-
-app_name = "trips"
-
-urlpatterns = [
- path(
- r'<str:slug>',
- views.TripDetailView.as_view(),
- name="detail"
- ),
- path(
- r'<int:page>/',
- views.TripListView.as_view(),
- name="list"
- ),
- path(
- r'',
- views.TripListView.as_view(),
- {'page':1},
- name="list"
- ),
-]
diff --git a/app/posts/views/photo_essay_views.py b/app/posts/views/photo_essay_views.py
index 4f08910..8c35621 100644
--- a/app/posts/views/photo_essay_views.py
+++ b/app/posts/views/photo_essay_views.py
@@ -14,13 +14,11 @@ from taxonomy.models import Category
class PhotoEssayListView(PaginatedListView):
model = Post
# TODO: change this when I have an actual archive to show
- template_name = "photo_essay_detail.html"
+ template_name = "photo_essay_list.html"
def get_queryset(self):
queryset = super(PhotoEssayListView, self).get_queryset()
- return queryset.get(slug="dawn")
- # real queryset
- #return queryset.filter(site__domain='luxagraf.net').filter(post_type__in=[PostType.PHOTO_ESSAY]).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image')
+ return queryset.filter(site__domain='luxagraf.net').filter(post_type__in=[PostType.PHOTO_ESSAY]).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image')
def get_context_data(self, **kwargs):
'''
@@ -48,10 +46,10 @@ class PhotoEssayDetailView(LuxDetailView):
related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date))
context['related'] = related
context['breadcrumbs'] = ('Photos',)
- context['crumb_url'] = reverse('posts:photo-essay-list')
+ context['crumb_url'] = reverse('photo_essay:list')
return context
def get_template_names(self):
obj = self.get_object()
- return ["film_detail.html"]
+ return ["photo_essay_detail.html"]
diff --git a/app/trading/admin.py b/app/trading/admin.py
index 46982b0..5206c82 100644
--- a/app/trading/admin.py
+++ b/app/trading/admin.py
@@ -26,7 +26,7 @@ class LuxOptionsTradeAdmin(admin.ModelAdmin):
@admin.register(LuxTrade)
class LuxTradeAdmin(admin.ModelAdmin):
- list_display = ('symbol', 'status', 'open_date', 'entry_price', 'stop_price', 'close_price', 'shares', 'amount_invested')
+ list_display = ('symbol', 'status', 'open_date', 'close_date', 'entry_price', 'stop_price', 'close_price', 'shares', 'amount_invested')
list_filter = ['status', 'open_date']
class Media:
js = ('image-loader.js', 'next-prev-links.js')
diff --git a/app/utils/util.py b/app/utils/util.py
index 32a9838..5370d7a 100644
--- a/app/utils/util.py
+++ b/app/utils/util.py
@@ -78,43 +78,29 @@ def parse_image(s):
image_id = img['id'].split("image-")[1]
i = apps.get_model('media', 'LuxImage').objects.get(pk=image_id)
caption = False
- exif = False
cluster_class = None
is_cluster = False
- extra = None
if cl[0] == 'cluster':
- css_class = cl[0]
is_cluster = True
cluster_class = cl[1]
+ css_class = cl[0]
try:
if cl[2] == 'caption':
caption = True
- elif cl[2] == 'exif':
- exif = True
- else:
- extra = cl[2]
-
- if len(cl) > 3:
- if cl[3] == 'exif':
- exif = True
except:
pass
elif cl[0] != 'cluster' and len(cl) > 1:
css_class = cl[0]
if cl[1] == 'caption':
caption = True
- if cl[1] == 'exif':
- exif = True
elif cl[0] != 'cluster' and len(cl) > 2:
css_class = cl[0]
if cl[1] == 'caption':
caption = True
- if cl[2] == 'exif':
- exif = True
print('caption'+str(caption))
else:
css_class = cl[0]
- return render_to_string("lib/img_%s.html" % css_class, {'image': i, 'caption': caption, 'exif': exif, 'is_cluster': is_cluster, 'cluster_class': cluster_class, 'extra': extra})
+ return render_to_string("lib/img_%s.html" % css_class, {'image': i, 'caption': caption, 'is_cluster': is_cluster, 'cluster_class': cluster_class})
except KeyError:
''' regular inline image, not a luximage '''
return str(img)
diff --git a/app/budget/0007_luxpurchase_cat.py b/bak/unused_apps/budget/0007_luxpurchase_cat.py
index b7bb553..b7bb553 100644
--- a/app/budget/0007_luxpurchase_cat.py
+++ b/bak/unused_apps/budget/0007_luxpurchase_cat.py
diff --git a/app/budget/admin.py b/bak/unused_apps/budget/admin.py
index 0f578fb..0f578fb 100644
--- a/app/budget/admin.py
+++ b/bak/unused_apps/budget/admin.py
diff --git a/app/budget/migrations/0001_initial.py b/bak/unused_apps/budget/migrations/0001_initial.py
index 30bd5a1..30bd5a1 100644
--- a/app/budget/migrations/0001_initial.py
+++ b/bak/unused_apps/budget/migrations/0001_initial.py
diff --git a/app/budget/migrations/0002_alter_luxpurchase_amount.py b/bak/unused_apps/budget/migrations/0002_alter_luxpurchase_amount.py
index 06400dd..06400dd 100644
--- a/app/budget/migrations/0002_alter_luxpurchase_amount.py
+++ b/bak/unused_apps/budget/migrations/0002_alter_luxpurchase_amount.py
diff --git a/app/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py b/bak/unused_apps/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py
index a880acf..a880acf 100644
--- a/app/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py
+++ b/bak/unused_apps/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py
diff --git a/app/budget/migrations/0004_alter_luxpurchase_source.py b/bak/unused_apps/budget/migrations/0004_alter_luxpurchase_source.py
index 0eab270..0eab270 100644
--- a/app/budget/migrations/0004_alter_luxpurchase_source.py
+++ b/bak/unused_apps/budget/migrations/0004_alter_luxpurchase_source.py
diff --git a/app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py b/bak/unused_apps/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py
index 66af470..66af470 100644
--- a/app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py
+++ b/bak/unused_apps/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py
diff --git a/app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py b/bak/unused_apps/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py
index 3631cc3..3631cc3 100644
--- a/app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py
+++ b/bak/unused_apps/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py
diff --git a/app/budget/migrations/0007_luxpurchase_cat.py b/bak/unused_apps/budget/migrations/0007_luxpurchase_cat.py
index 7a8e548..7a8e548 100644
--- a/app/budget/migrations/0007_luxpurchase_cat.py
+++ b/bak/unused_apps/budget/migrations/0007_luxpurchase_cat.py
diff --git a/app/budget/migrations/0008_remove_luxpurchase_category.py b/bak/unused_apps/budget/migrations/0008_remove_luxpurchase_category.py
index 7e2a0b9..7e2a0b9 100644
--- a/app/budget/migrations/0008_remove_luxpurchase_category.py
+++ b/bak/unused_apps/budget/migrations/0008_remove_luxpurchase_category.py
diff --git a/app/budget/migrations/0009_rename_cat_luxpurchase_category.py b/bak/unused_apps/budget/migrations/0009_rename_cat_luxpurchase_category.py
index c0efeff..c0efeff 100644
--- a/app/budget/migrations/0009_rename_cat_luxpurchase_category.py
+++ b/bak/unused_apps/budget/migrations/0009_rename_cat_luxpurchase_category.py
diff --git a/app/budget/migrations/0010_luxfixedmonthly_amount.py b/bak/unused_apps/budget/migrations/0010_luxfixedmonthly_amount.py
index 15461d4..15461d4 100644
--- a/app/budget/migrations/0010_luxfixedmonthly_amount.py
+++ b/bak/unused_apps/budget/migrations/0010_luxfixedmonthly_amount.py
diff --git a/app/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py b/bak/unused_apps/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py
index 4186c52..4186c52 100644
--- a/app/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py
+++ b/bak/unused_apps/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py
diff --git a/app/resume/migrations/__init__.py b/bak/unused_apps/budget/migrations/__init__.py
index e69de29..e69de29 100644
--- a/app/resume/migrations/__init__.py
+++ b/bak/unused_apps/budget/migrations/__init__.py
diff --git a/app/budget/models.py b/bak/unused_apps/budget/models.py
index 512b019..512b019 100644
--- a/app/budget/models.py
+++ b/bak/unused_apps/budget/models.py
diff --git a/app/budget/templates/budget/base.html b/bak/unused_apps/budget/templates/budget/base.html
index 9d6bfd0..9d6bfd0 100644
--- a/app/budget/templates/budget/base.html
+++ b/bak/unused_apps/budget/templates/budget/base.html
diff --git a/app/budget/templates/budget/create_cat_form.html b/bak/unused_apps/budget/templates/budget/create_cat_form.html
index 03e996a..03e996a 100644
--- a/app/budget/templates/budget/create_cat_form.html
+++ b/bak/unused_apps/budget/templates/budget/create_cat_form.html
diff --git a/app/budget/templates/budget/create_form.html b/bak/unused_apps/budget/templates/budget/create_form.html
index 2d38acf..2d38acf 100644
--- a/app/budget/templates/budget/create_form.html
+++ b/bak/unused_apps/budget/templates/budget/create_form.html
diff --git a/app/budget/templates/budget/luxpurchase_list.html b/bak/unused_apps/budget/templates/budget/luxpurchase_list.html
index c03f14d..c03f14d 100644
--- a/app/budget/templates/budget/luxpurchase_list.html
+++ b/bak/unused_apps/budget/templates/budget/luxpurchase_list.html
diff --git a/app/budget/templates/budget/update_form.html b/bak/unused_apps/budget/templates/budget/update_form.html
index b19efaa..b19efaa 100644
--- a/app/budget/templates/budget/update_form.html
+++ b/bak/unused_apps/budget/templates/budget/update_form.html
diff --git a/app/budget/urls.py b/bak/unused_apps/budget/urls.py
index ef7852f..ef7852f 100644
--- a/app/budget/urls.py
+++ b/bak/unused_apps/budget/urls.py
diff --git a/app/budget/views.py b/bak/unused_apps/budget/views.py
index 6a34b1e..6a34b1e 100644
--- a/app/budget/views.py
+++ b/bak/unused_apps/budget/views.py
diff --git a/app/resume/admin.py b/bak/unused_apps/resume/admin.py
index 8646cca..8646cca 100644
--- a/app/resume/admin.py
+++ b/bak/unused_apps/resume/admin.py
diff --git a/app/resume/build.py b/bak/unused_apps/resume/build.py
index 4f051d5..4f051d5 100644
--- a/app/resume/build.py
+++ b/bak/unused_apps/resume/build.py
diff --git a/app/resume/migrations/0001_initial.py b/bak/unused_apps/resume/migrations/0001_initial.py
index 14c9348..14c9348 100644
--- a/app/resume/migrations/0001_initial.py
+++ b/bak/unused_apps/resume/migrations/0001_initial.py
diff --git a/app/resume/migrations/0002_auto_20151207_2105.py b/bak/unused_apps/resume/migrations/0002_auto_20151207_2105.py
index 7ac653f..7ac653f 100644
--- a/app/resume/migrations/0002_auto_20151207_2105.py
+++ b/bak/unused_apps/resume/migrations/0002_auto_20151207_2105.py
diff --git a/app/resume/migrations/0003_auto_20151211_1925.py b/bak/unused_apps/resume/migrations/0003_auto_20151211_1925.py
index 77e3049..77e3049 100644
--- a/app/resume/migrations/0003_auto_20151211_1925.py
+++ b/bak/unused_apps/resume/migrations/0003_auto_20151211_1925.py
diff --git a/app/resume/migrations/0004_job_resume.py b/bak/unused_apps/resume/migrations/0004_job_resume.py
index e056fec..e056fec 100644
--- a/app/resume/migrations/0004_job_resume.py
+++ b/bak/unused_apps/resume/migrations/0004_job_resume.py
diff --git a/app/resume/migrations/0005_job_slug.py b/bak/unused_apps/resume/migrations/0005_job_slug.py
index d18baeb..d18baeb 100644
--- a/app/resume/migrations/0005_job_slug.py
+++ b/bak/unused_apps/resume/migrations/0005_job_slug.py
diff --git a/app/resume/migrations/0006_auto_20190112_1257.py b/bak/unused_apps/resume/migrations/0006_auto_20190112_1257.py
index 9ee8f1b..9ee8f1b 100644
--- a/app/resume/migrations/0006_auto_20190112_1257.py
+++ b/bak/unused_apps/resume/migrations/0006_auto_20190112_1257.py
diff --git a/app/resume/migrations/0007_auto_20190113_1128.py b/bak/unused_apps/resume/migrations/0007_auto_20190113_1128.py
index a635258..a635258 100644
--- a/app/resume/migrations/0007_auto_20190113_1128.py
+++ b/bak/unused_apps/resume/migrations/0007_auto_20190113_1128.py
diff --git a/app/resume/migrations/0008_auto_20190113_1139.py b/bak/unused_apps/resume/migrations/0008_auto_20190113_1139.py
index 29d975d..29d975d 100644
--- a/app/resume/migrations/0008_auto_20190113_1139.py
+++ b/bak/unused_apps/resume/migrations/0008_auto_20190113_1139.py
diff --git a/app/resume/migrations/0009_job_body_html.py b/bak/unused_apps/resume/migrations/0009_job_body_html.py
index fdeea15..fdeea15 100644
--- a/app/resume/migrations/0009_job_body_html.py
+++ b/bak/unused_apps/resume/migrations/0009_job_body_html.py
diff --git a/app/resume/migrations/0010_auto_20190113_1147.py b/bak/unused_apps/resume/migrations/0010_auto_20190113_1147.py
index 879bd55..879bd55 100644
--- a/app/resume/migrations/0010_auto_20190113_1147.py
+++ b/bak/unused_apps/resume/migrations/0010_auto_20190113_1147.py
diff --git a/app/resume/migrations/0011_auto_20190114_0227.py b/bak/unused_apps/resume/migrations/0011_auto_20190114_0227.py
index 7656c6e..7656c6e 100644
--- a/app/resume/migrations/0011_auto_20190114_0227.py
+++ b/bak/unused_apps/resume/migrations/0011_auto_20190114_0227.py
diff --git a/bak/unused_apps/resume/migrations/__init__.py b/bak/unused_apps/resume/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/bak/unused_apps/resume/migrations/__init__.py
diff --git a/app/resume/models.py b/bak/unused_apps/resume/models.py
index bac3115..bac3115 100644
--- a/app/resume/models.py
+++ b/bak/unused_apps/resume/models.py
diff --git a/app/resume/urls.py b/bak/unused_apps/resume/urls.py
index de95866..de95866 100644
--- a/app/resume/urls.py
+++ b/bak/unused_apps/resume/urls.py
diff --git a/app/resume/views.py b/bak/unused_apps/resume/views.py
index 3d0cd8d..3d0cd8d 100644
--- a/app/resume/views.py
+++ b/bak/unused_apps/resume/views.py
diff --git a/config/base_urls.py b/config/base_urls.py
index 0677a15..ad79987 100644
--- a/config/base_urls.py
+++ b/config/base_urls.py
@@ -27,61 +27,63 @@ sitemaps = {
}
urlpatterns = [
- re_path(r'^admin/build/.*', builder.views.do_build),
- path(r'admin/data/', include('utils.urls')),
+ # old unused urls
#path(r'admin/income/invoice/monthlyview/<str:slug>/invoice/', DownloadMonthlyInvoiceView.as_view(), name="download-invoice"),
#path(r'admin/income/invoice/monthlyview/<str:slug>/', MonthlyInvoiceView.as_view(), name="monthly-invoice"),
+ #path(r'spending/', include('budget.urls')),
+ #path(r'projects/', include('projects.urls')),
+ #path(r'expenses/', include('expenses.urls', namespace='expenses')),
+ #path(r'film/', include('posts.urls.film_urls')),
+ #re_path(r'^film/$', RedirectView.as_view(url='/films/')),
+ #path(r'films/', include('posts.urls.film_urls', namespace='films')),
+ #path(r'review/', include('posts.urls.review_urls')),
+ #re_path(r'^review/$', RedirectView.as_view(url='/reviews/')),
+ #path(r'reviews/', include('posts.urls.review_urls', namespace='review-list')),
+ #path(r'how-to/', include('posts.urls.craft_urls')),
+ #re_path(r'^how-to/$', RedirectView.as_view(url='/how-to/')),
+ #path(r'how-tos/', include('posts.urls.craft_urls', namespace='craft')),
+ #path(r'people/', include('people.urls')),
+ #path(r'work/', include('resume.urls', namespace='resume')),
+ #path(r'<path>/<slug>/', PageDetailView.as_view()),
+ #re_path(r'^trip/$', RedirectView.as_view(url='/trips/')),
+ #path(r'trip/', include('posts.urls.trip_urls')),
+ #path(r'trips/', include('posts.urls.trip_urls', namespace='trips')),
+ #re_path(r'^guide/$', RedirectView.as_view(url='/guides/')),
+ #path(r'guides/', include('posts.urls.guide_urls', namespace='guides')),
+ #path(r'guide/', include('posts.urls.guide_urls')),
+ re_path(r'^admin/build/.*', builder.views.do_build),
+ path(r'admin/data/', include('utils.urls')),
path(r'admin/', admin.site.urls),
path(r'trading/', include('trading.urls')),
path(r'gtd/', include('gtd.urls')),
- path(r'spending/', include('budget.urls')),
+ path(r'notes/', include('notes.urls')),
path(r'planner/', include('planner.urls')),
path(r'luximages/insert/', utils.views.insert_image),
path(r'feed.xml', JrnlRSSFeedView(),name="feed"),
path(r'sitemap.xml', sitemap, {'sitemaps': sitemaps}),
path(r'links/', include('links.urls')),
path(r'jrnl/', include('posts.urls.jrnl_urls', namespace='jrnl')),
- #path(r'projects/', include('projects.urls')),
path(r'walk/', include('locations.walk_urls')),
path(r'walks/', include('locations.walk_urls')),
path(r'locations/', include('locations.urls')),
- #path(r'expenses/', include('expenses.urls', namespace='expenses')),
path(r'newsletter/', include('lttr.urls')),
- path(r'photos/', include('media.urls')),
- path(r'images/', include('posts.urls.photo_essay_urls', namespace='photo-essay-list')),
- #path(r'film/', include('posts.urls.film_urls')),
- #re_path(r'^film/$', RedirectView.as_view(url='/films/')),
- #path(r'films/', include('posts.urls.film_urls', namespace='films')),
- re_path(r'^trip/$', RedirectView.as_view(url='/trips/')),
- path(r'trip/', include('posts.urls.trip_urls')),
- path(r'trips/', include('posts.urls.trip_urls', namespace='trips')),
- #path(r'review/', include('posts.urls.review_urls')),
- #re_path(r'^review/$', RedirectView.as_view(url='/reviews/')),
- #path(r'reviews/', include('posts.urls.review_urls', namespace='review-list')),
- re_path(r'^guide/$', RedirectView.as_view(url='/guides/')),
- path(r'guides/', include('posts.urls.guide_urls', namespace='guides')),
- path(r'guide/', include('posts.urls.guide_urls')),
+ #path(r'photos/', include('media.urls')),
+ path(r'photos/', include('posts.urls.photo_essay_urls', namespace='photo-essay-list')),
re_path(r'^essay/$', RedirectView.as_view(url='/essays/')),
path(r'essay/', include('posts.urls.essay_urls')),
path(r'essays/', include('posts.urls.essay_urls', namespace='essay-list')),
- path(r'range/', include('posts.urls.range_urls', namespace='range')),
- path(r'friends/', include('posts.urls.friends_urls', namespace='friends')),
- #path(r'how-to/', include('posts.urls.craft_urls')),
- #re_path(r'^how-to/$', RedirectView.as_view(url='/how-to/')),
- #path(r'how-tos/', include('posts.urls.craft_urls', namespace='craft')),
+ #path(r'range/', include('posts.urls.range_urls', namespace='range')),
+ #path(r'friends/', include('posts.urls.friends_urls', namespace='friends')),
path(r'book-notes/', include('books.urls')),
- #path(r'people/', include('people.urls')),
path(r'dialogues/', include('sightings.urls', namespace='sightings')),
path(r'field-notes/', include('posts.urls.field_note_urls', namespace='fieldnote')),
path(r'src/', include('posts.urls.src_urls', namespace='src')),
- path(r'work/', include('resume.urls', namespace='resume')),
path(r'map', include('locations.urls', namespace='map')),
path(r'map/', include('locations.urls', namespace='map')),
path(r'', HomePageList.as_view(), {'pk':1,}, name="homepage"),
path(r'comments/', include('django_comments.urls')),
path(r'<slug>.txt', PageDetailTXTView.as_view()),
path(r'<slug>', include('pages.urls', namespace='pages')),
- #path(r'<path>/<slug>/', PageDetailView.as_view()),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
diff --git a/templates/base.html b/templates/base.html
index 0bce354..2e4eb8b 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -16,7 +16,7 @@
title="Luxagraf RSS feed"
href="https://luxagraf.net/rss/">
{%block stylesheet%}<link rel="stylesheet"
- href="/media/screenv11.min.css?{% now "u" %}"
+ href="/media/screenv11.css?{% now "u" %}"
media="screen">{%endblock%}
{%block extrahead%}{%endblock%}
</head>
@@ -29,10 +29,8 @@
<nav>
<a class="nav-item smcaps" href="{% url "jrnl:list" %}" title="Stories of life on the road.">Jrnl</a>
<a class="nav-item smcaps" href="/essays/" title="Life and how to live it">Essays</a>
- <!--<a class="nav-item smcaps" href="{% url "guides:guide-list" %}" title="Guides">Guides</a> -->
+ <a class="nav-item smcaps" href="{% url "photo_essay:list" %}" title="Photo essays">Photos</a>
<a class="nav-item smcaps" href="/about" title="About Scott">About</a>
- <!--
- <a class="nav-item smcaps" href="/guides/" title="Useful Stuff">Guides</a> -->
</nav>
</header>
{% block breadcrumbs %}{% endblock %}
diff --git a/templates/base_notes.html b/templates/base_notes.html
new file mode 100644
index 0000000..f406446
--- /dev/null
+++ b/templates/base_notes.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html {%block htmlclass%}{%endblock%} dir="ltr" lang="en-US">
+ {% block sitename %}
+<head>
+ <title>{% block pagetitle %}{% endblock %}</title>{%endblock%}
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description"
+ content="{% block metadescription %}{% endblock %}">
+ <meta name="author" content="luxagraf">
+ {%block stylesheet%}<link rel="stylesheet"
+ href="/media/gtdscreenv1.css{%comment%}?{% now "u" %}{%endcomment%}"
+ media="screen">{%endblock%}
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+ {%block extrahead%}{%endblock%}
+</head>
+<body {%block bodyid%}{%endblock%}{%block bodyevents%}{%endblock%}>
+ <header class="header-wrapper">
+ <div id="logo">
+ <a class="logo-link" href="/" title="Home">L</span></a>
+ </div>
+ <nav>
+ <a class="nav-item" href="{% url 'notes:note-list' %}" title="View Notes">Notes</a>
+ <a class="nav-item" href="{% url 'notes:note-list' %}" title="View things that need to be done">todo</a>
+ </nav>
+ </header>
+ {% block breadcrumbs %}{% endblock %}
+ {% block primary %}{% endblock %}
+ {% block extrabody %}{% endblock %}
+ <footer class="page-footer">
+ <nav>
+ <a class="nav-item" href="/notes/todo" title="See what needs to be called in">Todo</a>
+ <a class="nav-item" href="/notes" title="View Guides">Notes</a>
+ <a class="nav-item" href="/posts" title="View Guides">Guides</a>
+ </nav>
+ <p id="license">
+ &copy; 2020-{% now "Y" %}
+ <span class="h-card"><a class="p-name u-url" href="https://luxagraf.net/">luxagraf</a><data class="p-locality" value="Everywhere"></data><data class="p-country-name" value="United States"></data></span>.
+ </p>
+ </footer>
+ {% block js %}{% endblock%}
+</body>
+</html>
diff --git a/templates/lib/img_cluster.html b/templates/lib/img_cluster.html
index 317bf8b..8117298 100644
--- a/templates/lib/img_cluster.html
+++ b/templates/lib/img_cluster.html
@@ -1,6 +1,13 @@
-{% load get_image_by_size %}{% if caption or exif %}<figure {%if cluster_class != "picwide"%}class="{{cluster_class}}"{%endif%}>{%endif%}
- <a href="{%get_image_by_size image "original"%}" title="view larger image {% if image.photo_credit_source%}(photo by {{image.photo_credit_source}}){%endif%}">
- <img class="{% if caption or exif %}{%else%}{%if cluster_class != "picwide"%}{{cluster_class}}{%endif%}{%endif%} {%if extra%}{{extra}}{%endif%}" {%if cluster_class == "picwide"%} sizes="(max-width: 1439px) 100vw, (min-width: 1440px) 1440px" srcset="{% for size in image.sizes.all%}{% get_image_by_size image size.slug %} {{size.width}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%}{% for size in image.sizes.all%}{%if not forloop.first and not forloop.last%} src="{% get_image_by_size image size.slug%}"{%endif%}{%endfor%}{%else%} src="{% get_image_by_size image cluster_class %}"{%endif%} alt="{%if image.alt %}{{image.alt}}{%else%}{{image.title}}{%endif%} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}Scott Gilbertson{%endif%}"></a>
-{% if caption or exif %}<figcaption>{% endif %}{% if caption %}{{image.caption|safe}}{% endif %}{% if exif %} | <small>Camera: {{image.exif_make}} {{image.exif_model}} with {{image.exif_lens}}</small>{% endif %}{% if caption or exif %}</figcaption>
-</figure>
+{% load get_image_by_size %}{%if cluster_class != "picwide"%}<span class="{{cluster_class}}">{%endif%}
+{% if caption %}<figure {%if cluster_class != "picwide"%}class="{{cluster_class}}"{%endif%}>{%endif%}
+ <a href="{%get_image_by_size image "original"%}" title="view larger image">
+ <img {%if cluster_class == "picwide"%} class="picwide"
+ sizes="(max-width: 1439px) 100vw, (min-width: 1440px) 1440px" srcset="{% for size in image.sizes.all%}{% get_image_by_size image size.slug %} {{size.width}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%}
+ {% for size in image.sizes.all%}{%if not forloop.first and not forloop.last%} src="{% get_image_by_size image size.slug%}"{%endif%}{%endfor%}
+ {%else%}
+ src="{% get_image_by_size image cluster_class %}"
+ {%endif%}
+ alt="{%if image.alt %}{{image.alt}}{%else%}{{image.title}}{%endif%} by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}Scott Gilbertson{%endif%}"></a>
+ {% if caption %}<figcaption>{{image.caption|safe}}</figcaption></figure>
{% endif %}
+ {%if cluster_class != "picwide"%}</span>{%endif%}
diff --git a/templates/lib/img_wideessay.html b/templates/lib/img_wideessay.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/templates/lib/img_wideessay.html