Hi, I am a novice with Django
I have created a nice project (Dajngo App) that I have to improve but I need to start a new one. I also got a new macbook and I to reconfigure my first project and be ready to create the new one.
I am used to have a folder /Dev/ which contain the framework/language
/Dev/Python
/Dev/ReactNative
/Dev/Arduino
/Dev/Django
Then, I would like to have
/Dev/Django/project1
/Dev/Django/project2
I read my notes about how I installed Django on my previous Mac and I think I have to do a bit different to host to project (two different Dajngo web application)
My idea would be the following. Could you validate?
cd /Documents/Dev/Django
python3 -m venv .env # Create an environement named .env source .env/bin/activate # Activate your environment
(.env) pip3 install mysqlclient
(.env) pip3 install django==4.1.4 (.env) python3 -m django --version
(.env) pip3 install -r requirements.txt # Install packages listed in the requirements file (.env) pip3 freeze > requirements.txt
the requirement.txt contain
asgiref==3.6.0
sqlparse==0.4.3
django==4.1.4
djangorestframework==3.14.0
djangorestframework-gis==1
django-filter==22.1.0
djangorestframework-simplejwt==5.2.2
I am confuse from this point
My two different Django web app and named ‘map’ and ‘ged’.
If I continue reading my note, I did the following. I created a project console and an app map
(.env) django-admin startproject console
(.env) cd console
(.env) ./manage.py startapp map
How should I do for my two Django/web app?
Form /Documents/Dev/Django, should I run
(.env) django-admin startproject map
(.env) cd map
(.env) ./manage.py startapp map
and
(.env) django-admin startproject ged
(.env) cd ged
(.env) ./manage.py startapp ged
or should I run from /Documents/Dev/Django/
(.env) django-admin startproject applications
(.env) cd applications
(.env) ./manage.py startapp map
(.env) ./manage.py startapp ged
I am confuse about the best pratice, because the two web app are two different projects. Both have no common points.
I have an additional quetsion?
Which local server/Database for Django, are you using on a Macbook Pro?
- MAMP?
- XMAP?
- Something else?
Many thanks for your help and clarification, and happy Christmas and new year!!!