Best file structure to accomodate using Python?

by: amonteath, 7 years ago


When I installed Python it was installed in "C:UsersAlanAppDataLocalProgramsPythonPython36-32" . I.e., this is where the these files reside: python.exe and python.exe. Further, when I installed Django, it was loaded into the Scripts folder under Python36-32. So, all my commands are deep in the file structure and are really a PITA. First question:  how should I remedy this to make it easier to use python and Django? Second question: since I'm new at this and my file structure is so weird, I don't know where to actually run the commands. I mean, on the command line what folder do I have to be in to run "manage.py runserver"?
I just need to understand how to set up the file structure better and how to more easily make my commands run.  Thanks.



You must be logged in to post. Please login or register an account.



windows is bad for web development, but you can get virtualbox, install ubuntu 16 x32 bit in it and have an emulated real server within windows, similar to a live web site.  Id recommend that, running apache2+modwsgi, mysql+ mysqlclient (a django mysql package) stack.  use python3.5 (default on ubuntu) pyvenv command to create a virtual environment, then source venv/bin/activate to turn it on, install your packages like django etc there.  run python manage.py commands with venv active.

see   https://dpaste.de/OSFH

-kingfitz 7 years ago
Last edited 7 years ago

You must be logged in to post. Please login or register an account.