Forums

Uploading Code to PythonAnywhere

Hello, I have an existing Django application in my desktop and would like to move it to PythonAnywhere. Was going through the How to get your code in and out of PythonAnywhere document and can't seem to find a recommendation regarding what to upload.

My question is should I be uploading everything (all subfolders of each application (e.g. pycache, migrations) and all files (e.g. init.py for each application)?

OR can I exclude the subfolders pycache and migrations and the file init.py?

You should include __init__.py, as that is part of your code (even if you just left the files empty) and the migrations (because they are the details of how to construct a working database for your site), but you can ignore the __pycache__ directories -- they're just temporary files used by Python.