Django

Revision as of 16:49, 14 April 2018 by Bpopp (talk | contribs) (Created page with "Easiest to install with pip: <pre>sudo aptitude install python3 pip3</pre> Once it's installed, go to a project directory (not where you want the project): <pre>django-admi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Easiest to install with pip:

sudo aptitude install python3 pip3

Once it's installed, go to a project directory (not where you want the project):

django-admin startproject hello

CD into that directory and then run:

python3 manage.py runserver 0.0.0.0:8000

The 0.0.0.0 is optional, but required in order to access remotely. If you are accessing it remotely, you'll also need to modify settings.py and add the hostname to "ALLOWED_HOSTS":

vi ./hello/settings.py

And then:

ALLOWED_HOSTS = ['sam','sam.bpopp.net']