Last active
May 1, 2024 07:22
-
-
Save hezhao/d48ddc37579c25f46408 to your computer and use it in GitHub Desktop.
Revisions
-
hezhao revised this gist
May 24, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ $ ./manage.py sqlmigrate myapp 0001 $ ./manage.py migrate $ ./manage.py squashmigrations myapp 0004 # django database backup & restore $ ./manage.py dumpdata --indent 2 --exclude auth.permission --exclude contenttypes > db.json $ ./manage.py loaddata db.json -
hezhao revised this gist
Mar 5, 2016 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,10 @@ $ ./manage.py sqlmigrate myapp 0001 $ ./manage.py migrate $ ./manage.py squashmigrations myapp 0004 # django db data $ ./manage.py dumpdata --indent 2 --exclude auth.permission --exclude contenttypes > db.json $ ./manage.py loaddata db.json # sqlite3 $ sqlite3 db.sqlite3 sqlite> .tables -
hezhao revised this gist
Feb 29, 2016 . No changes.There are no files selected for viewing
-
hezhao revised this gist
Feb 29, 2016 . 1 changed file with 10 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,18 +6,19 @@ $ deactivate # Start new django project and app $ django-admin.py startproject mysite $ ./manage.py migrate $ ./manage.py createsuperuser $ ./manage.py startapp myapp # Run jango $ ./manage.py shell $ ./manage.py runserver # django migration $ ./manage.py makemigrations myapp $ ./manage.py sqlmigrate myapp 0001 $ ./manage.py migrate $ ./manage.py squashmigrations myapp 0004 # sqlite3 $ sqlite3 db.sqlite3 -
hezhao revised this gist
Jan 24, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,7 @@ $ python manage.py runserver # django db $ python manage.py makemigrations myapp $ python manage.py sqlmigrate myapp 0001 $ python manage.py migrate # sqlite3 -
hezhao revised this gist
Jan 12, 2016 . 1 changed file with 19 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,28 +1,32 @@ # Use Python 3 for easy unicode $ virtualenv -p python3 .env $ source .env/bin/activate $ pip install django $ deactivate # Start new django project and app $ django-admin.py startproject mysite $ python manage.py migrate $ python manage.py createsuperuser $ python manage.py startapp myapp # Run jango $ python manage.py shell $ python manage.py runserver # django db $ python manage.py makemigrations myapp $ python manage.py migrate # sqlite3 $ sqlite3 db.sqlite3 sqlite> .tables # test from django.test.utils import setup_test_environment setup_test_environment() $ python manage.py test myapp # Distribution $ python setup.py sdist $ pip install django-package-0.1.tar.gz -
hezhao revised this gist
Nov 18, 2015 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,17 +4,25 @@ source .env/bin/activate pip install django deactivate # Start new django project and app django-admin.py startproject mysite python manage.py migrate python manage.py createsuperuser python manage.py startapp myapp # Run jango python manage.py shell python manage.py runserver # django db python manage.py makemigrations myapp python manage.py migrate # test from django.test.utils import setup_test_environment setup_test_environment() python manage.py test myapp # Distribution python setup.py sdist pip install django-package-0.1.tar.gz -
hezhao renamed this gist
Nov 13, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
hezhao revised this gist
Nov 13, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ # Use Python 3 for easy unicode virtualenv -p python3 .env source .env/bin/activate pip install django deactivate -
hezhao created this gist
Nov 13, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ virtualenv .env source .env/bin/activate pip install django deactivate django-admin.py startproject mysite python manage.py migrate python manage.py createsuperuser python manage.py startapp myapp python manage.py shell python manage.py runserver python manage.py makemigrations myapp python manage.py migrate from django.test.utils import setup_test_environment setup_test_environment() python manage.py test myapp