Wednesday 6 March 2024

Create a Django Project On Mac or Linux

1. install python3 - download from python website 
2. install vertual env : 
sudo pip install virtualenv 
3. create a project directory : 
mkdir djproject 
4. create a virtual environment cd djproject virtualenv myvirtenv -p python3 
5. activate the virtual environment : source myvirtenv/bin/activate
 
6. install Django inside the virtual environment
 pip install Django (installs the latest version) 
7. start the project, creates the project files 
django-admin startproject djproject
8. start the webserver 
python manage.py runserver
 
9. Launch the webpage on thedefault port 
http://127.0.0.1:8000 
you should see django up an running!

No comments:

Post a Comment

Word Press Multisite on AWS instance cannot login with default password

  Word Press Multisite on AWS instance cannot login with default password after setting a static IP ? Try this Login to the shell from AWS i...