Kris Anderson
Kris Anderson

Reputation: 1037

What is the best practice naming convention for a Django project?

Should the project name be the same as the site name? Or should be be called something else like "django," "settings," "project-settings" or something else?

I know it doesn't really matter in the end, but I'm curious what the best practice is or what you prefer to name you Django projects.

Upvotes: 2

Views: 2809

Answers (3)

Diogo Eichert
Diogo Eichert

Reputation: 499

I call it __project__, so that I can easily distinguish its folder from the rest of the apps.

Upvotes: 0

jsan
jsan

Reputation: 2814

I have the same issue, my project name is confusing with apps name.

I choose this naming:

foo_project/
  manage.py
  main/ # project name, contains settings
  apps/ # contains all my apps `from apps.foos.models import ...`
    foos/
    other_stuff/

Upvotes: 1

Ezix
Ezix

Reputation: 126

The best thing to do is to name it according to the main goal of your app. For example, one that will deal with the users can be named registration (it's a real app name).

Naming the apps according to what they do, not only makes the project more scalable, but also avoid confusion between the project name and apps.

If there is only one or two apps, naming it like the project is OK, though. Same if it's the core of your project and the other apps will be only secondary (I still don't recommend it).

Upvotes: 0

Related Questions