Mercurial > hg > bitsyblog
comparison bitsyblog/bitsyblog.py @ 16:2bd6b2b543dc
now have blog entry snippets
author | k0s <k0scist@gmail.com> |
---|---|
date | Sun, 25 Oct 2009 18:11:25 -0400 |
parents | 36698624435b |
children | e5cbc53cacf8 |
comparison
equal
deleted
inserted
replaced
15:36698624435b | 16:2bd6b2b543dc |
---|---|
228 """ | 228 """ |
229 | 229 |
230 # GENSHI: data dictionary | 230 # GENSHI: data dictionary |
231 request.environ['data'] = { 'site_name': self.site_name, | 231 request.environ['data'] = { 'site_name': self.site_name, |
232 'request': request, | 232 'request': request, |
233 'link': self.liin} | 233 'link': self.link, |
234 'escape': cgi.escape } | |
234 | 235 |
235 # front matter of the site | 236 # front matter of the site |
236 index = self.get_index() | 237 index = get_index() |
237 if index is not None: | 238 if index is not None: |
238 return index | 239 return index |
239 | 240 |
240 ### user space | 241 ### user space |
241 user, path = self.userpath(request) | 242 user, path = self.userpath(request) |
881 def get(self, request): | 882 def get(self, request): |
882 | 883 |
883 # GENSHI: global data dictionary | 884 # GENSHI: global data dictionary |
884 request.environ['data'] = { 'site_name': self.site_name, | 885 request.environ['data'] = { 'site_name': self.site_name, |
885 'request': request, | 886 'request': request, |
886 'link': self.link } | 887 'link': self.link, |
888 'escape': cgi.escape } | |
887 | 889 |
888 ### user space | 890 ### user space |
889 user, path = self.userpath(request) | 891 user, path = self.userpath(request) |
890 if user not in self.users: | 892 if user not in self.users: |
891 return exc.HTTPNotFound("Blog entry not found") | 893 return exc.HTTPNotFound("Blog entry not found") |