English 中文(简体)
是否宜在你的Django项目中提及你的项目名称?
原标题:Is it proper to reference your project name inside your Django project?

我用Django和I m想知道,使用我的应用程序是否合适,而不是我的项目。 如果要利用“未来”项目,那么我的申请,或者在“INSTALLED_APPS”中。 我是否赞成或是否有权公正使用我对它的说法? 我很想知道,如果我用后一种方法改变项目名称,那会打断我的看法,但我并不相信,仅仅因为前一种方法是正确的。 请允许我谈谈这一点。

谢谢!

问题回答

I would say that it is not encouraged to reference your apps using your project name. I say this because as of Django 1.4 this will not work with a default Django project. You can read more about this here: https://docs.djangoproject.com/en/dev/releases/1.4/#updated-default-project-layout-and-manage-py

引自:

“如果项目名称预设点(如我的项目设计、ROOT_URLCONF = “米项目.urls”等)进口或参考,则新管理。 粉碎需要移出一个目录,因此它不属于项目包,而不是与环境相邻。 py and urls.py

我建议予以反对,因为这意味着要了解违约项目结构,而不是庞大,而是增加不必要的工作。

我也对此提出建议,因为你对你的项目表示同情,而这个想法与Django的理念背道而驰,Django的哲学主张是可再利用的,被指责。





相关问题
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 ]="...

热门标签