How to create a new Django app for a cookiecutter-django based project #4339
-
Django 4.2.1 with django-cookiecutter 2023.05.09: makemigrations doesn't create migration file for new modelI'm using Here's what I've done thus far: I added the new model to my
I created an empty migration file for the app with the
I ran the
I've double-checked that the I've also tried running the
I've also tried running the I've also checked that the migration file has the correct name and is located in the correct directory. The migration file is named This is what my directory tree looks like:
What could be causing makemigrations to not create a migration file for my new model? Are there any additional steps I can take to diagnose the problem? Any help would be appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @CurtMRosenblad , this is the step by step of creating a new app in a project that was created using How to create a new django app for a cookiecutter-django based project:1 - create the 2 - move 3 - edit 4 - add |
Beta Was this translation helpful? Give feedback.
Hello @CurtMRosenblad , this is the step by step of creating a new app in a project that was created using
cookiecutter-django
.Try to use this way and let me know if the step-by-step solves the problem or not.
How to create a new django app for a cookiecutter-django based project:
1 - create the
<name-of-the-app>
app withpython manage.py startapp <name-of-the-app>
2 - move
<name-of-the-app>
directory to<project_slug>
directory3 - edit
<project_slug>/<name-of-the-app>/apps.py
andchange
name = "<name-of-the-app>"
toname = "<project_slug>.<name-of-the-app>"
4 - add
"<project_slug>.<name-of-the-app>,
on yourLOCAL_APPS
on config/settings/base.py