How to Add Locations to Python Path in Django

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

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"))


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.