I have a python script within my Django project designed to run seperate from the Django app. I want to use the settings.py on my Django App how can I do that.
When I try to import
from django.conf import settings
i get
ImportError: No module named DjangoTastypie.settings
My project Structure
I am running using eclipse-> Run as python
So you basically will need to put this at the beginning of your script
import os
import django
from django.conf import settings
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
django.setup()