when trying to run script, that use django's models, script says that error importing module from django's settings;
for example, it says: ImportError: No module named rssDj.rssDjApp; or "pymorphy"
but they are, and pymorphy installed, and works with django
there's script:
1 import os
2 import sys
3
4 sys.path.append('/home/kerniexvid/rssDj')
5 sys.path.append('/home/kerniexvid/rssDjApp')
6
7 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
8
9 import logging
10
11 from django.conf import settings
12
13 from datetime import datetime, timedelta
14 from rssReader.DatabaseTransactions import DatabaseTransactions
15 import datetime
16
17 if __name__ == '__main__':
18
19 fromDate = datetime.datetime.now()
20 toDate = datetime.datetime.now()
21 ey = DatabaseTransactions().loadTable_PrimaryData(fromDate, toDate)
22 print ey