diff options
author | luxagraf <sng@luxagraf.net> | 2014-06-24 12:05:46 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2014-06-24 12:05:46 -0400 |
commit | cc70aa809252899dfd062feb241aaecede66bd02 (patch) | |
tree | ed0468f58a240d1c46d7532eddb3c40e455ee4ff /app | |
parent | 78d265997ac26aecfb350ccf497ec2de3f3fad4b (diff) |
Rewrote all sass and reconfigured HTML to use more microformats and
clearer class names
Diffstat (limited to 'app')
-rw-r--r-- | app/blog/models.py | 2 | ||||
-rw-r--r-- | app/blog/urls.py | 13 | ||||
-rw-r--r-- | app/blog/views.py | 2 | ||||
-rw-r--r-- | app/lib/pagination/templates/pagination/pagination.html | 9 | ||||
-rw-r--r-- | app/notes/models.py | 2 |
5 files changed, 19 insertions, 9 deletions
diff --git a/app/blog/models.py b/app/blog/models.py index f01eeae..12b5b28 100644 --- a/app/blog/models.py +++ b/app/blog/models.py @@ -79,7 +79,7 @@ class Entry(models.Model): return self.title def get_absolute_url(self): - return "/%s/%s/" % (self.pub_date.strftime("%Y/%b/%d").lower(), self.slug) + return "/%s/%s" % (self.pub_date.strftime("%Y/%m").lower(), self.slug) def comment_period_open(self): return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date diff --git a/app/blog/urls.py b/app/blog/urls.py index d0a5224..0ac8870 100644 --- a/app/blog/urls.py +++ b/app/blog/urls.py @@ -1,10 +1,21 @@ from django.conf.urls import * from django.views.generic.base import RedirectView - +""" urlpatterns = patterns('', (r'(?P<slug>[-\w]+)/(?P<page>\d+)/$', 'blog.views.entry_list_by_area'), (r'(?P<page>\d+)/$', 'blog.views.entry_list'), (r'(?P<slug>[-\w]+)/$', RedirectView.as_view(url="/writing/%(slug)s/1/")), (r'', RedirectView.as_view(url="/writing/1/")), ) +""" + +urlpatterns = patterns('', + url(r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+)$', 'blog.views.entry_detail'), + #url(r'(?P<year>\d{4})/(?P<month>\d{2})/$', 'blog.views.date_list', name="blog_by_month"), + #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/")), +) diff --git a/app/blog/views.py b/app/blog/views.py index 1d552eb..b82a2ab 100644 --- a/app/blog/views.py +++ b/app/blog/views.py @@ -16,7 +16,7 @@ def home(request): return render_to_response('archives/homepage.html', context, context_instance=RequestContext(request)) -def entry_detail(request, year, month, day, slug): +def entry_detail(request, year, month, slug): obj = get_object_or_404(Entry, slug__exact=slug) photos = {} # if obj.photo_gallery: diff --git a/app/lib/pagination/templates/pagination/pagination.html b/app/lib/pagination/templates/pagination/pagination.html index 1afb3d7..0b99346 100644 --- a/app/lib/pagination/templates/pagination/pagination.html +++ b/app/lib/pagination/templates/pagination/pagination.html @@ -1,10 +1,9 @@ {% load pagination_tags %}{% if is_paginated %} <ul class="pages">{% if page_obj.has_previous %} - <li><a href="{% page_path prev_page %}" class="prev">‹‹ previous</a></li>{% else %} - <li class="disabled prev"></li>{% endif %}{% for page in pages %}{% if page %}{% if page == page_obj.number %} + <li><a href="{% page_path prev_page %}" class="prev"> Newer</a></li>{% endif %}{% for page in pages %}{% if page %}{% if page == page_obj.number %} <li class="current page">{{ page }}</li>{% else %} <li><a href="{% page_path page %}" class="page">{{ page }}</a></li>{% endif %}{% else %} <li>...</li>{% endif %}{% endfor %}{% if page_obj.has_next %} - <li><a href="{% if use_page_path %}{% page_path next_page %}{% else %}?page={{ page_obj.next_page_number }}{{ getvars }}{% endif %}" class="next">next ››</a></li>{% else %} - <li class="disabled next">next ››</li>{% endif %} - </ul>{% endif %}
\ No newline at end of file + <li><a href="{% if use_page_path %}{% page_path next_page %}{% else %}?page={{ page_obj.next_page_number }}{{ getvars }}{% endif %}" class="next">Older</a></li> + {% endif %} + </ul>{% endif %} diff --git a/app/notes/models.py b/app/notes/models.py index dc158d2..6d139f0 100644 --- a/app/notes/models.py +++ b/app/notes/models.py @@ -42,7 +42,7 @@ class Note(models.Model): twitter_id = models.CharField('twitter_id', max_length=450) twitter_send = models.BooleanField("send to twitter?", default=False) twitter_sent = models.BooleanField(default=False, blank=True) - in_reply_to = models.CharField('in reply to url', max_length=450) + #in_reply_to = models.CharField('in reply to url', max_length=450) def __str__(self): return self.slug |