Changeset 24
- Timestamp:
- 12/02/07 15:33:29 (9 months ago)
- Files:
-
- bitstructures/trunk/css/bitstructures.css (modified) (1 diff)
- bitstructures/trunk/substructure/urls.py (modified) (1 diff)
- bitstructures/trunk/substructure/views.py (modified) (2 diffs)
- bitstructures/trunk/templates/substructure/base.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
bitstructures/trunk/css/bitstructures.css
r15 r24 84 84 } 85 85 86 a.subscribe {87 color: #da5800;88 }89 90 86 a:hover { 91 87 text-decoration: underline; bitstructures/trunk/substructure/urls.py
r15 r24 1 1 from django.conf.urls.defaults import * 2 from django.conf import settings 2 3 3 urlpatterns = patterns('', 4 (r'^$', 'bitstructures.substructure.views.blog'), 5 (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[a-z0-9-]+)$', 6 'bitstructures.substructure.views.entry_page'), 7 (r'^drafts/(?P<slug>[a-z0-9-]+)$', 'bitstructures.substructure.views.draft_page'), 8 (r'^atom.xml$', 'bitstructures.substructure.views.atom_feed') 4 urlpatterns = patterns('bitstructures.substructure.views', 5 (r'^$', 'blog'), 6 (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[a-z0-9-]+)$', 'entry_page'), 7 (r'^drafts/(?P<slug>[a-z0-9-]+)$', 'draft_page'), 8 (r'^fb-atom.xml$', 'atom_feed') 9 9 ) 10 11 if hasattr(settings, 'SUBSTRUCTURE_FEEDBURNER_REDIRECT_URL'): 12 urlpatterns += patterns('', 13 (r'^atom.xml$', 'bitstructures.substructure.views.redirect_to_feedburner')) 14 else: 15 urlpatterns += patterns('', 16 (r'^atom.xml$', 'bitstructures.substructure.views.atom_feed')) bitstructures/trunk/substructure/views.py
r15 r24 1 from django.http import Http404, HttpResponse 1 from django.http import Http404, HttpResponse, HttpResponseRedirect 2 2 from django.shortcuts import get_object_or_404, render_to_response 3 3 from django.template import Context, loader 4 4 from django.contrib.sites.models import Site 5 from django.conf import settings 5 6 from bitstructures.substructure.models import Entry 6 import bitstructures.settings7 7 8 8 def blog(request): … … 46 46 return HttpResponse(t.render(c), mimetype='application/atom+xml') 47 47 48 def redirect_to_feedburner(request): 49 return HttpResponseRedirect(settings.SUBSTRUCTURE_FEEDBURNER_REDIRECT_URL) 50 48 51 def get_context_data(request): 49 data = { 'MEDIA_URL': bitstructures.settings.MEDIA_URL }52 data = { 'MEDIA_URL': settings.MEDIA_URL } 50 53 if user_can_change_entry(request): 51 54 data['user_can_change_entry'] = True bitstructures/trunk/templates/substructure/base.html
r17 r24 28 28 <div class="info-entry"> 29 29 <h2>About me</h2> 30 <p>Simon Bates is an accessibility architect at the30 <p>Simon Bates is an accessibility software architect at the 31 31 <a href="http://atrc.utoronto.ca/">Adaptive Technology Resource Centre</a> 32 32 at the University of Toronto … … 35 35 the <a href="http://dojotoolkit.org/">Dojo</a> JavaScript toolkit.</p> 36 36 <p><a href="http://del.icio.us/simonbates">del.icio.us/simonbates</a></p> 37 <p><a class="subscribe" href="/atom.xml"><img src="{{ MEDIA_URL }}images/feed-icon-14x14.png" alt="Subscribe"> Subscribe</a></p>37 <p><a href="/atom.xml"><img src="{{ MEDIA_URL }}images/feed-icon-14x14.png" alt="Site feed"> Site feed</a></p> 38 38 </div> 39 39
