Things I like to add to settings.py


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import os.path
  2.  
  3. MEDIA_ROOT = os.path.join(os.path.dirname(__file__), "public/static/")
  4.  
  5. TEMPLATE_DIRS = (
  6. os.path.join(os.path.dirname(__file__), "templates"),
  7. )
  8.  
  9. FORCE_LOWERCASE_TAGS = True
  10. SESSION_COOKIE_NAME = 'your_project'
  11.  
  12. try:
  13. from local_settings import *
  14. except ImportError:
  15. pass

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.