0

I'm from php, Laravel. I just start learn python and Django

I use pip installed Django but I can't find any files from this folder

C:/desktop/test/

It's very different from Laravel framework. Laravel has content all framework files inside of folder. If I want to move to different machine, I just need to copy all files.

My questions are

  1. Where is Django installed?

  2. what if move to different machine (ex: move to server)

  3. If I start another new project, do I have to install Django again?

Benjamin W
  • 2,658
  • 7
  • 26
  • 48
  • check this https://stackoverflow.com/a/7037502/9581027 for django path – ravishankar chavare Nov 22 '19 at 09:32
  • It's in Python's site-packages folder. Ideally that would be in a virtual environment folder, not the global one. In PHP speak, that's akin to a PECL installation folder. Your project should have a `requirements.txt` file (in PHP that would be a Composer file), which lists all dependencies of your project (like Django). When moving to a new machine, you run `pip -r requirements.txt` to install all necessary dependencies (that's akin to running `composer`). You don't need to move the dependencies themselves, only your project files. – deceze Nov 22 '19 at 09:34
  • if I start another new project, do I have to install Django into that folder again? I didn't see any requirements.txt I only see .idea folder in my project folder – Benjamin W Nov 22 '19 at 09:40
  • Read https://stackoverflow.com/a/43828909/476. – deceze Nov 22 '19 at 09:51

0 Answers0