- Create an empty django migration
python manage.py makemigrations --empty yourappname
- Show applied migrations
python manage.py showmigrations <app_name>
- Rollback migration to a specific state
| # Shortcuts for doing stuff in gametraka_project_v3 | |
| .PHONY : clean help build redisq gui devdeps dev clean run requirements test | |
| help: | |
| @echo "lint - check style with flake8 and isort" | |
| @echo "devdeps - runs rqworker and gui front-end" | |
| @echo "dev - runs gametraka on localhost" | |
| @echo "test - runs test suite" | |
| @echo "clean - deletes temporary files" |
python manage.py makemigrations --empty yourappname
python manage.py showmigrations <app_name>
$ createdb -O <owner> -T database_to_copy new_database
$ createdb -O <owner> database_name
class One(models.Model):
pass
class Many(models.Model):
| // sleep using promise | |
| function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } |
$ git clean -fd
$ git tag
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>title</title> | |
| </head> | |
| <body> | |
| <div id="target"> | |
| <div id="inner"> |
| function asyncFunc(e) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => resolve(e), e * 1000); | |
| }); | |
| } | |
| const arr = [1, 2, 3]; | |
| let final = []; | |
| function workMyCollection(arr) { |
s command to step into the function.python -m http.server 8000