PageRenderTime 84ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/README.md

https://github.com/nuance/roaring-tofu
Markdown | 33 lines | 24 code | 9 blank | 0 comment | 0 complexity | 2f65004f219c756ead20e8650b54a49c MD5 | raw file
  1. MHJones
  2. ===========
  3. Source code for mhjones.org. It's a pretty simple blog + some social stuff. Written with tornado + sqlite (via sqlalchemy orm... not happy about that choice, but it's not worth replacing).
  4. Layout
  5. ------
  6. * app/ - various ways of running the site. I normally run standalone.py for development and deploy via wsgi
  7. * batch/ - add posts, import social stuff. Includes some very basic scrapers for grabbing content for a single user.
  8. * batch/importers/ - the aforementioned scrapers
  9. * handlers/ - controllers
  10. * model/ - the orm classes
  11. * static/(css|js|images) - static assets
  12. * templates/ - templates, all inheriting from base.thtml
  13. * ui/ - ui modules. All my css / js / rss includes happen via ui modules. Seems to work pretty well.
  14. * util/ - some utility code. linkification, relative timestamps etc.
  15. Interesting bits
  16. ----------------
  17. handlers/base.py - a base class & metaclass that lets you define handlers with their urls. For example:
  18. class Home(BaseHandler):
  19. _path = '/(\d*)'
  20. def get(self, offset):
  21. self.write('You requested /%s' % offset)
  22. What doesn't quite work right
  23. -----------------------------
  24. * ui module https handling for external assets. The tornado ui module code explicitly checks for http (and not https) when including 3rd party js. So using https google analytics doesn't work quite right. This would be really easy to fix, but I'm not actually serving https for anything, so this doesn't really matter.