Changeset 73 for bitstructures
- Timestamp:
- 04/06/08 21:51:53 (9 months ago)
- Location:
- bitstructures/trunk
- Files:
-
- 1 added
- 2 modified
-
substructure/urls.py (modified) (1 diff)
-
substructure/views.py (modified) (3 diffs)
-
templates/substructure/robots.txt (added)
Legend:
- Unmodified
- Added
- Removed
-
bitstructures/trunk/substructure/urls.py
r72 r73 9 9 (r'^drafts/(?P<slug>[a-z0-9-]+)/(?P<num>\d+)/(?P<filename>[a-zA-Z0-9-_\.]+)$', 'draft_codeblock'), 10 10 (r'^fb-atom.xml$', 'atom_feed'), 11 (r'^all$', 'all') 11 (r'^all$', 'all'), 12 (r'^robots.txt$', 'robots_txt') 12 13 ) 13 14 -
bitstructures/trunk/substructure/views.py
r72 r73 2 2 from django.shortcuts import get_object_or_404, render_to_response 3 3 from django.template import Context, loader 4 from django.template.loader import render_to_string 4 5 from django.contrib.sites.models import Site 5 6 from django.conf import settings … … 13 14 if ('page' in request.GET) and (int(request.GET['page']) > 0): 14 15 page = int(request.GET['page']) 15 if settings.SUBSTRUCTURE_NUM_ENTRIES_PER_PAGE:16 if hasattr(settings, 'SUBSTRUCTURE_NUM_ENTRIES_PER_PAGE'): 16 17 num_entries_per_page = settings.SUBSTRUCTURE_NUM_ENTRIES_PER_PAGE 17 18 else: … … 93 94 return render_to_response('substructure/all.html', data) 94 95 96 def robots_txt(request): 97 return HttpResponse(render_to_string('substructure/robots.txt'), 98 mimetype='text/plain') 99 95 100 def get_published_entries(): 96 101 return Entry.objects.filter(date_published__isnull=False)
