Django: Difference between revisions

From Utopia
Jump to navigation Jump to search
(Created page with " Udemy Course: Python and Django Full Stack Web Developer Bootcamp Gutes Intro: <nowiki>https://tecadmin.net/install-django-on-debian/</nowiki> == Installation == sudo apt-get install python3 python3-pip python3 -V Python 3.7.3 pip3 -V pip 12.0.1 from /usr/lib/python3/dist-packages (python 3.7) pip3 install Django django-admin --version 2.1.2 cd /var/www django-admin startproject django_app cd django_app python3 manage.py migrate python3 manage...")
 
No edit summary
Line 1: Line 1:


Ein mini Tutorial fuer nen Apache2/Debian Django...




Line 7: Line 9:
Gutes Intro: <nowiki>https://tecadmin.net/install-django-on-debian/</nowiki>
Gutes Intro: <nowiki>https://tecadmin.net/install-django-on-debian/</nowiki>


== Python Config ==
=== Virtual Environment ===
pip3 install virtualenv
mkdir /path/to/myapp/venv
cd /path/to/myapp/venv/
virtualenv <mark>myprojectenv</mark>
source ~/<mark>myproject</mark>/<mark>myprojectenv</mark>/bin/activate


== Installation ==
 
== Django Installation ==
sudo apt-get install python3 python3-pip
sudo apt-get install python3 python3-pip


Line 58: Line 73:


http://192.168.1.239:8000/admin
http://192.168.1.239:8000/admin
== Apache2 Config ==

Revision as of 13:06, 7 May 2023


Ein mini Tutorial fuer nen Apache2/Debian Django...


Udemy Course: Python and Django Full Stack Web Developer Bootcamp

Gutes Intro: https://tecadmin.net/install-django-on-debian/

Python Config

Virtual Environment

pip3 install virtualenv

mkdir /path/to/myapp/venv

cd /path/to/myapp/venv/

virtualenv myprojectenv

source ~/myproject/myprojectenv/bin/activate


Django Installation

sudo apt-get install python3 python3-pip


python3 -V

Python 3.7.3


pip3 -V

pip 12.0.1 from /usr/lib/python3/dist-packages (python 3.7)


pip3 install Django


django-admin --version

2.1.2


cd /var/www

django-admin startproject django_app


cd django_app

python3 manage.py migrate


python3 manage.py createsuperuser


vi django_app/settings.py


ALLOWED_HOSTS = ['192.168.1.239']


python3 manage.py runserver 0.0.0.0:8000


http://192.168.1.239:8000


http://192.168.1.239:8000/admin


Apache2 Config