Skip to content

Instantly share code, notes, and snippets.

@BruceZu
Created May 16, 2017 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BruceZu/d286ae81918116dba2618b75050e2ff9 to your computer and use it in GitHub Desktop.
Save BruceZu/d286ae81918116dba2618b75050e2ff9 to your computer and use it in GitHub Desktop.
django
@BruceZu
Copy link
Author

BruceZu commented May 16, 2017

https://www.python.org/
https://www.djangoproject.com/start/
https://docs.djangoproject.com/en/1.11/intro/tutorial01/

def index(request):
return HttpResponse("Hello, world. You're at the polls index.")

(enviroment) ~/python/needthisproject$ export PYTHONPATH=$PYTHONPATH:$PWD
(enviroment) ~/python/needthisproject$ export DJANGO_SETTINGS_MODULE=mysite.settings
(enviroment) ~/python/needthisproject$ django-admin check
System check identified no issues (0 silenced).

(enviroment) ~/python/needthisproject$ tree
.
├── db.sqlite3
├── manage.py
└── mysite
├── init.py
├── pycache
│   ├── init.cpython-35.pyc
│   ├── settings.cpython-35.pyc
│   ├── urls.cpython-35.pyc
│   └── wsgi.cpython-35.pyc
├── settings.py
├── urls.py
└── wsgi.py
(enviroment) ~/python/needthisproject$ tree
.
├── db.sqlite3
├── downloaded_sqlite3
│   ├── sqldiff
│   ├── sqlite3
│   └── sqlite3_analyzer
├── manage.py
└── mysite
├── init.py
├── pycache
│   ├── init.cpython-35.pyc
│   ├── settings.cpython-35.pyc
│   ├── urls.cpython-35.pyc
│   └── wsgi.cpython-35.pyc
├── settings.py
├── urls.py
└── wsgi.py

3 directories, 13 files
(enviroment) ~/python/needthisproject$ git s
On branch master
Changes to be committed:
(use "git reset HEAD ..." to unstage)

new file:   downloaded_sqlite3/sqldiff
new file:   downloaded_sqlite3/sqlite3
new file:   downloaded_sqlite3/sqlite3_analyzer

(enviroment) ~/python/needthisproject$ sqlite3
SQLite version 3.18.0 2017-03-28 18:48:43
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment