# list comprehension
names = ['Apple', 'Banana', 'wtf']
names_length = [len(v) for v in a]
name_to_length = {v:len(v) for v in a if len(v) < 4}
- pip
- requirements.txt
- Primer on Python Virtual Environments
- PyCharm: File -> Settings -> Project -> Python Interpreter -> Wheel
# create venv
virtualenv -p python2.7 munimap
# create SQL scripts for table creation / migration
python manage.py makemigrations <app>
# show SQL migration script 0001
python manage.py sqlmigrate <app> 0001
# apply SQL migration scripts
python manage.py migrate
# invoke shell
python manage.py shell
# create user for admin site
python manage.py createsuperuser