English 中文(简体)
django - 导入错误
原标题:django - ImportError

我刚成功地将我的代码发运到生产服务器。 您可以在这里查看 http://qlimp.com

它显示

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

事实上,我在开发服务器上的对接项目名称是 < 坚固> > / 坚固 > 。 然后我将代码导出到生产服务器中的项目 < 坚固 > qlimp < / 坚固 > 。 我成功完成了所有需要完成的更改, 我不知道为什么它显示 < code> 没有名为 try.urls 的模块 。

我在生产服务器上用Ubuntu 12.04 LTS,谁能指引我?

谢谢!

最佳回答

在设置. pi 中, 更改

ROOT_URLCONF =  try.urls 

ROOT_URLCONF =  qlimp.urls 
问题回答

不是直接的答案,而是要检查的几件事情——我建议(如果你还没有)你为字符串“try.urls” 输入新的项目。在我看来,这大概是您错过了修改配置文件或其它东西可能发生的事情。如果你有耐心,你甚至可以尝试拼写“ try” 。此外,请确保您做了一个清理工作,以清除编译代码中可能出现的任何引用。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签