diff options
author | luxagraf <sng@luxagraf.net> | 2014-07-08 11:17:12 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2014-07-08 11:17:12 -0400 |
commit | 9c0e098213a3fd0dab5bb8778fb730aca088f9e2 (patch) | |
tree | 43f9dec99a6cebfbddfae208b79a5d8cac3bd1f8 | |
parent | afbbfec0afb212524361de6e103893fbae01888a (diff) |
fixed some url related bugs
-rw-r--r-- | app/blog/urls.py | 4 | ||||
-rw-r--r-- | app/blog/views.py | 4 | ||||
-rw-r--r-- | config/base_urls.py | 1 | ||||
-rw-r--r-- | design/templates/archives/notes.html | 6 | ||||
-rw-r--r-- | design/templates/archives/notes_date.html | 8 | ||||
-rw-r--r-- | design/templates/archives/writing.html | 2 |
6 files changed, 12 insertions, 13 deletions
diff --git a/app/blog/urls.py b/app/blog/urls.py index 0ac8870..f792527 100644 --- a/app/blog/urls.py +++ b/app/blog/urls.py @@ -16,6 +16,6 @@ urlpatterns = patterns('', #url(r'(?P<year>\d{4})/$', 'blog.views.date_list', name="blog_by_year"), (r'(?P<slug>[-\w]+)/(?P<page>\d+)/$', 'blog.views.entry_list_by_area'), (r'(?P<page>\d+)/$', 'blog.views.entry_list'), - url(r'(?P<slug>[-\w]+)/$', RedirectView.as_view(url="/writing/%(slug)s/1/")), - #url(r'', RedirectView.as_view(url="/writing/1/")), + url(r'(?P<slug>[-\w]+)/$', RedirectView.as_view(url="/jrnl/%(slug)s/1/")), + url(r'', RedirectView.as_view(url="/jrnl/1/")), ) diff --git a/app/blog/views.py b/app/blog/views.py index b82a2ab..34402b0 100644 --- a/app/blog/views.py +++ b/app/blog/views.py @@ -42,7 +42,7 @@ class BlogEntryListView(ListView): def entry_list(request, page): - request.page_url = '/writing/%d/' + request.page_url = '/jrnl/%d/' request.page = int(page) try: is_build = request.POST['builder'] @@ -61,7 +61,7 @@ def entry_list(request, page): def entry_list_by_area(request, slug, page): """ Grabs entries by region or country""" - request.page_url = '/writing/' + slug + '/%d/' + request.page_url = '/jrnl/' + slug + '/%d/' request.page = int(page) try: region = Region.objects.get(slug__exact=slug) diff --git a/config/base_urls.py b/config/base_urls.py index 65c68c2..d01eddc 100644 --- a/config/base_urls.py +++ b/config/base_urls.py @@ -50,7 +50,6 @@ urlpatterns += patterns('', (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'), - (r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+)$', 'blog.views.entry_detail'), # locations (r'^locations/', include('locations.urls')), (r'^photos/', include('photos.urls')), diff --git a/design/templates/archives/notes.html b/design/templates/archives/notes.html index b73e722..c6c6e34 100644 --- a/design/templates/archives/notes.html +++ b/design/templates/archives/notes.html @@ -1,17 +1,17 @@ {% extends 'base.html' %} {% load typogrify_tags %} {% load html5_datetime %} -{% block pagetitle %} Notes | luxagraf {% endblock %} +{% block pagetitle %} Field Notes | luxagraf {% endblock %} {% block metadescription %} The LongHandPixels Blog Archive, covering HTML, CSS and other web nerdery.{% endblock %} {%block bodyid%}class="notes" id="notes-archive"{%endblock%} {% 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> - <li>Notes</li> + <li>Field Notes</li> </ul> <main role="main"> - <h1>Notes</h1> + <h1>Field Notes</h1> {% for object in object_list %} <article class="h-entry"> <h2 class="p-name note--title hide">{{object.title|safe|amp|smartypants}}</h2> diff --git a/design/templates/archives/notes_date.html b/design/templates/archives/notes_date.html index 8794da3..676a465 100644 --- a/design/templates/archives/notes_date.html +++ b/design/templates/archives/notes_date.html @@ -2,16 +2,16 @@ {% load typogrify_tags %} {% load html5_datetime %} {% load month_number_to_name %} -{% block pagetitle %} Notes Published in {% if month %}{{month|month_number_to_name}}{%endif%} {{year}} | luxagraf{% endblock %} +{% block pagetitle %} Field Notes Published in {% if month %}{{month|month_number_to_name}}{%endif%} {{year}} | luxagraf{% endblock %} {% block bodyid %}class="notes" id="archive-{% if month %}{{month|month_number_to_name}}{%endif%}{{year}}"{%endblock%} {% block primary %}<ul class="bl crumbs" id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <li><a href="/" title="luxagraf homepage" itemprop="url"><span itemprop="title">Home</span></a> → </li> - <li><a href="/notes/" itemprop="url"><span itemprop="title">Notes</span></a> →</li> - <li>{% if month %}<a href="/notes/{{year}}/" title="Notes published in {{year}}" itemprop="url">{%endif%}<span itemprop="title">{{year}}</span>{% if month %}</a> →{%endif%}</li> + <li><a href="/field-notes/" itemprop="url"><span itemprop="title">Field Notes</span></a> →</li> + <li>{% if month %}<a href="/field-notes/{{year}}/" title="Field Notes published in {{year}}" itemprop="url">{%endif%}<span itemprop="title">{{year}}</span>{% if month %}</a> →{%endif%}</li> {% if month %}<li itemprop="title">{{month|month_number_to_name}}</li>{%endif%} </ul> <main role="main"> - <h1>Notes Published in {% if month %}{{month|month_number_to_name}}{%endif%} {{year}}</h1>{% if month %}{% for object in object_list %} + <h1>Field Notes Published in {% if month %}{{month|month_number_to_name}}{%endif%} {{year}}</h1>{% if month %}{% for object in object_list %} <article class="h-entry"> <h2 class="p-name note--title hide">{{object.title|safe|amp|smartypants}}</h2> <div class="e-content"> diff --git a/design/templates/archives/writing.html b/design/templates/archives/writing.html index 1716f95..a8c4634 100644 --- a/design/templates/archives/writing.html +++ b/design/templates/archives/writing.html @@ -9,7 +9,7 @@ {% 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="/jrnl/" title="See all Journal Entries from" itemprop="url"><span itemprop="title">Journal</span></a> →</li> + {% if region %}{%if region.name == 'United States'%} <li><a href="/jrnl/" title="See all Journal Entries" 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> |