Skip to content

Commit

Permalink
Auto-create demo-user
Browse files Browse the repository at this point in the history
  • Loading branch information
kaleissin committed Jan 6, 2015
1 parent d97e205 commit ab0f8fe
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -50,7 +50,7 @@ runserver: virtual_env_set
$(PYTHON_BIN)/django-admin.py runserver $(DJANGO_POSTFIX)

syncdb: virtual_env_set
$(PYTHON_BIN)/django-admin.py syncdb $(DJANGO_POSTFIX)
$(PYTHON_BIN)/django-admin.py syncdb --noinput $(DJANGO_POSTFIX)

cmd: virtual_env_set
$(PYTHON_BIN)/django-admin.py $(CMD) $(DJANGO_POSTFIX)
Expand Down Expand Up @@ -105,7 +105,7 @@ virtualenv:
echo $(VIRTUAL_ENV)

load_demo_fixtures:
$(PYTHON_BIN)/django-admin.py loaddata src/${PROJECT}/fixtures/example.json $(DJANGO_POSTFIX)
$(PYTHON_BIN)/django-admin.py loaddata src/mailer/fixtures/adminuser.json $(DJANGO_POSTFIX)

demo: virtual_env_set pip syncdb load_demo_fixtures runserver

Expand Down
20 changes: 20 additions & 0 deletions src/mailer/fixtures/adminuser.json
@@ -0,0 +1,20 @@
[
{
"fields": {
"username": "demo",
"first_name": "",
"last_name": "",
"is_active": true,
"is_superuser": true,
"is_staff": true,
"last_login": "2015-01-06T11:19:09.016Z",
"groups": [],
"user_permissions": [],
"password": "pbkdf2_sha256$12000$z4N5pycURAhB$Dyi0KuHCdF48sism7fefIvLgpXlWnHehTcb49sKLY7o=",
"email": "demo@example.com",
"date_joined": "2015-01-06T11:19:09.016Z"
},
"model": "auth.user",
"pk": 1
}
]

0 comments on commit ab0f8fe

Please sign in to comment.