mindcurrent / djanky-django

Daniel's Janky Attempt at a Django RESTful API Server
0 stars 1 forks source link

Create Django Project: "djankysite" #7

Open dpcunningham opened 4 years ago

dpcunningham commented 4 years ago

We will follow the Django Tutorial: Writing your first Django app, part 1:

$ python -m django --version
1.11.24
$ django-admin --version
Command 'django-admin' not found, but can be installed with:
sudo apt install python-django-common

$ sudo apt install python-django-common
$ sudo apt update

$ django-admin --version
Cannot find installed version of python-django or python3-django.
n$ django-admin 
Cannot find installed version of python-django or python3-django.

Really? Really?

$ sudo apt install python-django
$ sudo apt install python3-django
$ sudo apt update

$ django-admin --version
2.2.6
$ django3-admin --version
Command 'django3-admin' not found, did you mean:
  command 'django-admin' from deb python-django-common

Because why would we want to be consistent? That would be boring, eh?

$ django-admin startproject djankysite
$ ls -R djankysite/

Woooohhhh... Shiny!

OK -- *moment of truth...

$ python manage.py runserver
  File "manage.py", line 16
    ) from exc
         ^
SyntaxError: invalid syntax

Heavy sigh. It would have been nice.

$ vi manage.py

Blind squirrel time. I'm gonna take a guess we're missing this exc lib?

dpc@LT3-Insp17-2017:~/dpc.data/local.FS/lfs.03-Projects.Active/project.MindCurrent/dev/python/djankysite$ python manage.py runserver
  File "manage.py", line 17
    ) from exc
         ^
SyntaxError: invalid syntax
dpc@LT3-Insp17-2017:~/dpc.data/local.FS/lfs.03-Projects.Active/project.MindCurrent/dev/python/djankysite$ vi manage.py

BUZZZZZZZZ

Nope. Sigh. Ok, we'll revert that quick hack.

Second guess: version incompatibility?

DING! DING! DING!

$ python3 manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 17 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.

October 01, 2019 - 21:57:44
Django version 2.2.6, using settings 'djankysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[01/Oct/2019 21:58:03] "GET / HTTP/1.1" 200 16348
[01/Oct/2019 21:58:03] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423
Not Found: /favicon.ico
[01/Oct/2019 21:58:03] "GET /favicon.ico HTTP/1.1" 404 1976
[01/Oct/2019 21:58:03] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 200 85876
[01/Oct/2019 21:58:03] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 200 86184
[01/Oct/2019 21:58:03] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 200 85692

Cyborg pleasure button pushed.

Look, ma -- no hands!...

Screenshot from 2019-10-01 15-04-28