2

I just finished doing the tutorial django app. I now want to build my own app. Should I just create a new app within the tutorial project folder or should I create a new project folder with a new app?

I am unsure in which cases it makes sense to re-use a project and create multiple apps under that project vs. making new projects for each new app

2 Answers 2

2

You don't need to create a project for each app. When you create a project, you can define new apps inside a project if you want, in fact the manage.py inside the project folder is the same as the django-admin.py outside. So you can startapp directly using django-admin.py:

$ django-admin.py startproject foo
$ django-admin.py startapp bar
$ ls foo bar/
bar/:
__init__.py  models.py  tests.py  views.py

foo:
__init__.py  manage.py  settings.py  urls.py
Sign up to request clarification or add additional context in comments.

Comments

1

A website is usually a project. In that website, you may have multiple features (a blog, a wiki, etc.). Each of those features should be an application in the project.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.