简体   繁体   中英

django - ImportError

I just successfully shipped my code to the production server. You can check out here http://qlimp.com

It shows

ImportError at /
No module named try.urls

Exception Type: ImportError
Exception Value:    No module named try.urls
Exception Location: /home/nirmal/project/local/lib/python2.7/site-packages/django/utils/importlib.py in import_module, line 35
Python Executable:  /home/nirmal/project/bin/python

Actually my django project name in the developement server is try . Then I exported the code to the project qlimp in the production server. I successfully performed every changes need to be done and I don't know why it shows that No module named try.urls

I'm using Ubuntu 12.04 LTS on my production server. Could anyone guide me?

Thanks!

In settings.py, change

ROOT_URLCONF = 'try.urls'

to

ROOT_URLCONF = 'qlimp.urls'

Not so much a straight answer as a few things to check - I'd suggest (if you haven't already) that you grep the new project for the string "try.urls". Looks to me like the sort of thing that might happen if you missed changing over a config file or something. If you have the patience for it, you might even try grepping "try". Also, make sure that you've done a make clean to clear out any references that may be in compiled code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM