0

I'm reading through Two Scoops of Django and the authors note that best practices involve having a config folder and an apps folder. I've been building a Django project for the last few months here & there and want to get in the habit of complying with these practices, but when I change the name of my <project_name> folder (with the wsgi, settings, etc.), Django can't seem to find the contents of the folder anymore.

How do I change this folder name and put the project apps into an app folder without breaking the connections they have?

iducam
  • 67
  • 1
  • 11
  • This has already been answered here: https://stackoverflow.com/questions/8408046/how-to-change-the-name-of-a-django-app – ViLuWi Oct 08 '20 at 19:21

1 Answers1

0

Restoring connection can be a painful process and even if you restore the connections, there is no guarantee it will always work (eg, some 3rd party app may fail because of dependency issues which you forgot to change).

I do like to separate my created apps and project folder to be visibly different too. For this, I create parent folder which would be my entire django installation and then inside the created folder I create the project while telling that this is the directory I'd like to use. Lets say I want to create blog project:

$ mkdir blog
$ cd blog
$ django-admin startproject blog_project .

This will give you a blog folder and inside it you will get blog_project folder and beloved manage.py.

Ravi
  • 94
  • 4