How to Add Locations to Python Path in Django


/ Published in: Python



Copy this code and paste it in your HTML
  1. import os
  2. import sys
  3. PROJECT_ROOT = os.path.dirname(__file__)
  4. sys.path.insert(0, os.path.join(PROJECT_ROOT, "apps"))

URL: http://codespatter.com/2009/04/10/how-to-add-locations-to-python-path-for-reusable-django-apps/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.