Reputation: 47
I created a django project(prjct1) and has an app in it(app1) I also created another django project(prjct2) which also has an app(app2) How can I move app2 in prjct1
Upvotes: 2
Views: 2026
Reputation: 840
Step 1: copy the app2 from project2 and paste it into project1.
Step 2 :In the settings of project2 include the app2 inside the installed apps.
Step 3: Go to urls.py in the project1 and configure the URL for app2.
Step 4: Run migration commands in the terminal
python manage.py makemigrations
python manage.py migrate
miscellaneous: If it shows errors delete the migration file and do the migration again.
Upvotes: 3
Reputation: 1323
As long as that app doesn't reference any other app then you just need to copy it over, delete the migrations (just in case it references the other projects migrations) add the app to your INSTALLED_APPS, run migrations and you should be good to go.
Upvotes: 0