anon
anon

Reputation:

Django correct applications distribution

After reading through How do you divide your project into applications in Django? and Django documentation about applications I am still not sure whether I should make or not a new application for certain stuff.

Let's imagine I have a Website with the following sections: <Home> <Login> <Register> <My account>.
Should all them be different applications? or should they be just one?

Also, imagine I include a section <Wiki> but it is not very linked with the page (I mean, not the design but the content makes relation to it).
Would this be a new project or application?

Upvotes: 0

Views: 64

Answers (2)

DaneoShiga
DaneoShiga

Reputation: 1027

If it's part of the same site or webapp you're building, than don't make another project, one project shares the same settings.py, for example, so you can imagine that everything that relates to it belongs to the same project.

About the apps, you can create an entire project with just one app, but that's not advisable, you can separate your models in apps in a way that you fell confortable with it, for your own organization.

About login/register, take a look on User authentication documentation, that can clarify a little how one part of the site, in this case, authentication, can work with it's own app.

You should also do the Tutorial which could help you to understant how django basically works.

Upvotes: 0

George Cummins
George Cummins

Reputation: 28936

The individual sets of functionality (such as the ones you listed) should be applications.

When you group several applications together, you form a project.

However, the individual applications are usually self-contained enough that they could be picked up and dropped into another application. In this manner, you can re-use your 'login' application in several projects.

Upvotes: 1

Related Questions