Answer the question
In order to leave comments, you need to log in
How to find out installed modules in Django and publish project?
Finished my test project and want to publish it. Articles on installing Django from scratch on the server do not suit me. I already have a whole project with a base and I just would like to transfer it (for now to a shared hosting like Beget, then I will try platforms like heroku or vds). In this connection, several questions arose:
1) How to find out and what to do with the modules that I installed during development, such as: pillow, django itself, mysqldb, etc.? What should I do to transfer my virtual environment?
2) How is the process of transferring a project from a local server to an external one?
3) How is the database transferred? Or a simple import through the same hosting interface (phpmyadmin) will suffice.
I know that you need to use a non-built-in django server, and install something like Gunicorn + connect nginx, but this is of less interest so far.
Answer the question
In order to leave comments, you need to log in
1.
pip freeze - from under the virtual machine will show all packages.
pip freeze > requirements.txt - saves the list of packages to a file, then you can install everything on the combat server pip install -r requirements.txt
2.
I think there are many transfer options, but in general, if this is a vps, then you must first configure the server itself, install the required packages, transfer the project itself, fix at least settings.py in it, set up statics - just copying the project as it is to a folder on the server will not work.
3.
if it is mysql, then you can transfer it through phpmyadmin, but there may be a problem when transferring a large database, because there are restrictions in php on the size of the uploaded file.
busy-brain.ru/post/9 - here everything is step by step in Russian)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question