diff options
-rw-r--r-- | app/builder/base.py | 6 | ||||
-rw-r--r-- | app/notes/build.py | 8 | ||||
-rw-r--r-- | config/base_urls.py | 2 | ||||
-rw-r--r-- | config/settings.py | 2 | ||||
-rw-r--r-- | design/templates/archives/homepage.html | 4 | ||||
-rw-r--r-- | design/templates/archives/writing.html | 10 | ||||
-rw-r--r-- | design/templates/base.html | 2 |
7 files changed, 17 insertions, 17 deletions
diff --git a/app/builder/base.py b/app/builder/base.py index 34ecb4c..2845225 100644 --- a/app/builder/base.py +++ b/app/builder/base.py @@ -83,7 +83,7 @@ class BuildWriting(Build): for entry in qs: c = Context({'object': entry, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL}) t = render_to_string('details/entry.html', c).encode('utf-8') - path = '/%s/' %(entry.pub_date.strftime("%Y/%m").lower()) + path = '/jrnl/%s/' %(entry.pub_date.strftime("%Y/%m").lower()) slug = '%s' %(entry.slug) self.write_file(path, t, 'html', slug) s = render_to_string('details/entry.txt',c).encode('utf-8') @@ -119,7 +119,7 @@ class BuildWriting(Build): qs = entry.objects.filter(status__exact=1, pub_date__year=year).order_by('-pub_date') c = Context({'type': 'year', 'date': year, 'object_list': qs}) t = render_to_string('archives/writing_date.html', c).encode('utf-8') - fpath = '%s/' % (year) + fpath = 'jrnl/%s/' % (year) self.write_file(fpath, t) def writing_month_archives(self): @@ -135,7 +135,7 @@ class BuildWriting(Build): c = Context({'type': 'monthly', 'date': '%s %s' % ( month_full_name, year), 'object_list': qs, }) t = render_to_string('archives/writing_date.html', c).encode('utf-8') - fpath = '%s/%s/' % (year, month) + fpath = 'jrnl/%s/%s/' % (year, month) self.write_file(fpath, t) def build_homepage(self): diff --git a/app/notes/build.py b/app/notes/build.py index 884c114..4923baf 100644 --- a/app/notes/build.py +++ b/app/notes/build.py @@ -21,13 +21,13 @@ class BuildNotes(Build): for entry in self.queryset(): c = Context({'object': entry, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL, 'SITE_URL':settings.SITE_URL}) t = render_to_string('details/note.html', c).encode('utf-8') - path = 'notes/%s/' % (entry.date_created.strftime("%Y/%m").lower()) + path = 'field-notes/%s/' % (entry.date_created.strftime("%Y/%m").lower()) self.write_file(path, t, 'html', entry.slug) s = render_to_string('details/note.txt', c).encode('utf-8') self.write_file(path, s, 'txt', entry.slug) def build_archive(self): - path = 'notes/' + path = 'field-notes/' c = Context({ 'object_list': self.queryset(), 'MEDIA_URL': settings.BAKED_MEDIA_URL, @@ -47,7 +47,7 @@ class BuildNotes(Build): 'object_list': qs }) t = render_to_string('archives/notes_date.html', c).encode('utf-8') - fpath = 'notes/%s/' % (year) + fpath = 'field-notes/%s/' % (year) self.write_file(fpath, t) def build_archive_month(self): @@ -63,5 +63,5 @@ class BuildNotes(Build): 'object_list': qs, }) t = render_to_string('archives/notes_date.html', c).encode('utf-8') - fpath = 'notes/%s/%s/' % (year, month) + fpath = 'field-notes/%s/%s/' % (year, month) self.write_file(fpath, t) diff --git a/config/base_urls.py b/config/base_urls.py index 45cb168..65c68c2 100644 --- a/config/base_urls.py +++ b/config/base_urls.py @@ -46,7 +46,7 @@ urlpatterns += patterns('', (r'^googleb11655cd59dacf3c.html$', TemplateView.as_view(template_name='static/gverify.html')), #(r'^contact/', TemplateView.as_view(template_name='details/contact.html')), (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), - (r'^writing/', include('blog.urls')), + (r'^jrnl/', include('blog.urls')), (r'^projects/', include('projects.urls')), #Entry detail i.e. /year/month/day/my-title/ #old: (r'(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[-\w]+)/$', 'blog.views.entry_detail'), diff --git a/config/settings.py b/config/settings.py index 7f204b8..b01561c 100644 --- a/config/settings.py +++ b/config/settings.py @@ -3,7 +3,7 @@ from os.path import dirname, abspath PROJ_ROOT = abspath(dirname(dirname(__file__))) + '/' -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( diff --git a/design/templates/archives/homepage.html b/design/templates/archives/homepage.html index d312592..3e39e82 100644 --- a/design/templates/archives/homepage.html +++ b/design/templates/archives/homepage.html @@ -13,7 +13,7 @@ <p class="p-author author hide">Scott Gilbertson</p> <time class="dt-published published dt-updated post--date" datetime="{{object.pub_date|date:'c'}}">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> <p class="p-location h-adr adr post--location main--location"> - {% if object.country.name == "United States" %}<span class="p-locality locality" itemprop="geo" itemscope itemtype="http://data-vocabulary.org/Geo">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/writing/united-states/" title="travel writing from the United States">{{object.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="/writing/{{object.country.slug}}/" title="travel writing from {{object.country.name}}">{{object.country.name}}</a>{%endif%} + {% if object.country.name == "United States" %}<span class="p-locality locality" itemprop="geo" itemscope itemtype="http://data-vocabulary.org/Geo">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/jrnl/united-states/" title="travel writing from the United States">{{object.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.country.slug}}/" title="travel writing from {{object.country.name}}">{{object.country.name}}</a>{%endif%} <data itemprop="latitude" class="p-latitude" value="{{object.latitude}}"></data> <data itemprop="longitude" class="p-longitude" value="{{object.longitude}}"></data> </p> @@ -44,7 +44,7 @@ <p class="p-author author hide">Scott Gilbertson</p> <time class="dt-published published dt-updated post--date" datetime="{{object.pub_date|date:'c'}}">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> <p class="p-location h-adr adr post--location"> - {% if object.country.name == "United States" %}<span class="p-locality locality" itemprop="geo" itemscope itemtype="http://data-vocabulary.org/Geo">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/writing/united-states/" title="travel writing from the United States">{{object.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="/writing/{{object.country.slug}}/" title="travel writing from {{object.country.name}}">{{object.country.name}}</a>{%endif%} + {% if object.country.name == "United States" %}<span class="p-locality locality" itemprop="geo" itemscope itemtype="http://data-vocabulary.org/Geo">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/jrnl/united-states/" title="travel writing from the United States">{{object.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.country.slug}}/" title="travel writing from {{object.country.name}}">{{object.country.name}}</a>{%endif%} <data itemprop="latitude" class="p-latitude" value="{{object.latitude}}"></data> <data itemprop="longitude" class="p-longitude" value="{{object.longitude}}"></data> </p> diff --git a/design/templates/archives/writing.html b/design/templates/archives/writing.html index b752160..1716f95 100644 --- a/design/templates/archives/writing.html +++ b/design/templates/archives/writing.html @@ -9,12 +9,12 @@ {% block primary %}<ul class="bl" id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <li><a href="/" title="luxagraf homepage" itemprop="url"><span itemprop="title">Home</span></a> → </li> - {% if region %}{%if region.name == 'United States'%} <li><a href="/writing/" title="See all Writing" itemprop="url"><span itemprop="title">Writing</span></a> →</li> - <li itemprop="title">the United States</li>{%else%}<li><a href="/writing/" title="See all Writing" itemprop="url"><span>Writing</span></a> →</li> - <li>{{region.name|title|smartypants|safe}}</li>{%endif%}{%else%}<li>Writing </li>{%endif%} + {% if region %}{%if region.name == 'United States'%} <li><a href="/jrnl/" title="See all Journal Entries from" itemprop="url"><span itemprop="title">Journal</span></a> →</li> + <li itemprop="title">the United States</li>{%else%}<li><a href="/jrnl/" title="See all Journal Entries" itemprop="url"><span>Journal</span></a> →</li> + <li>{{region.name|title|smartypants|safe}}</li>{%endif%}{%else%}<li>Journal</li>{%endif%} </ul> <main role="main" id="writing-archive" class="archive"> - <h1 class="hide">{% if region %}Writing from {%if region.name == 'United States'%}the United States{%else%}{{region.name|title|smartypants|safe}}{%endif%}{%else%}Writing Archive {%endif%}</h1>{% autopaginate object_list 24 %} {% for object in object_list %} + <h1 class="hide">{% if region %}Journal entries from {%if region.name == 'United States'%}the United States{%else%}{{region.name|title|smartypants|safe}}{%endif%}{%else%}Journal {%endif%}</h1>{% autopaginate object_list 24 %} {% for object in object_list %} <article class="h-entry hentry {% cycle 'odd' 'even' %} {% cycle 'first' 'second' 'third' %}"> <div class="post--image"> <a href="{{object.get_absolute_url}}" title="{{object.title}}"><img src="{{object.get_image_url}}" alt="{{ object.title }}" class="u-photo post-image" /></a> @@ -24,7 +24,7 @@ <time class="dt-published published dt-updated post--date" datetime="{{object.pub_date|date:'c'}}">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> <p> <span class="p-location h-adr adr post--location"> - {% if object.country.name == "United States" %}<span class="p-locality locality" itemprop="geo" itemscope itemtype="http://data-vocabulary.org/Geo">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/writing/united-states/" title="travel writing from the United States">{{object.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="/writing/{{object.country.slug}}/" title="travel writing from {{object.country.name}}">{{object.country.name}}</a>{%endif%} + {% if object.country.name == "United States" %}<span class="p-locality locality" itemprop="geo" itemscope itemtype="http://data-vocabulary.org/Geo">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/jrnl/united-states/" title="travel writing from the United States">{{object.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.country.slug}}/" title="travel writing from {{object.country.name}}">{{object.country.name}}</a>{%endif%} <data itemprop="latitude" class="p-latitude" value="{{object.latitude}}"></data> <data itemprop="longitude" class="p-longitude" value="{{object.longitude}}"></data> </span> – diff --git a/design/templates/base.html b/design/templates/base.html index 3ca9ff6..2283c59 100644 --- a/design/templates/base.html +++ b/design/templates/base.html @@ -36,7 +36,7 @@ <li id="stories"><a href="/jrnl/" title="An archive of writings from around the world">Journal</a></li> <li id="photos"><a href="/photos/" title="Photos from travels around the world">Photos</a></li> <!--<li id="guides"><a href="/travel-guide/1/" title="Travel Guides, Tips, Tricks and Recommendations">Guides</a>,</li>--> - <li id="field-notes"><a href="/field-notes/" title="Shorter thoughts, sometimes syndicated to twitter">Notes</a></li> + <li id="field-notes"><a href="/field-notes/" title="Shorter thoughts, sometimes syndicated to twitter">Field Notes</a></li> <li id="maps"><a href="/map" title="Maps and miscellanea">Map</a></li> <li id="projects" ><a href="/projects/" title="Luxagraf: Projects">Projects</a></li> <li id="etc" class="last"><a href="/about" title="About Luxagraf">Etc</a></li> |