Search code examples
pythondjangopythonanywhere

why are there two manage.py in django project?


From what I understand,there are two different starting points where we can run server through python manage.py runserver command in Django:

First > "mysite" (as in many tutorials, and this folder is called "project" right? Second > "app"(as in many django blog tutorials "blog")

But as I entered the command "cd mysite"(notice it's not "cd app") and did git push to pythonanywhere,

my pythonanywhere just shows "mysite" which I didn't even type in "python manage.py migrate"! So I realized because of that, I couldn't even enter the admin website since I didn't create user on this "project" level but only in my "app" level

Is there anything I missed or did wrong with this? Is it normal for a user to set up admin password on "app" level right?

What did I do wrong on this and how can I fix it so that pythonanywhere shows my "app"?


Solution

  • It sounds like you have put your entire project at the "app" level of the Django project that was created by PythonAnywhere already. The top-level manage.py is the one that PythonAnywhere created for you and the one further down is the one that came from your git repo. There is help documentation on how to deploy an existing Django site on the PythonAnywhere help pages that would be a good place to start.