Merge pull request #17 from pamelafox/vscode-fixes
Browse files- .env.sample +1 -1
- .vscode/launch.json +19 -0
- .vscode/settings.json +0 -4
- .vscode/tasks.json +58 -0
- src/quizzes/fixtures/seed_data.json +60 -0
.env.sample
CHANGED
|
@@ -2,4 +2,4 @@ DBHOST=localhost
|
|
| 2 |
DBNAME=app
|
| 3 |
DBUSER=app_user
|
| 4 |
DBPASS=app_password
|
| 5 |
-
SECRET_KEY=
|
|
|
|
| 2 |
DBNAME=app
|
| 3 |
DBUSER=app_user
|
| 4 |
DBPASS=app_password
|
| 5 |
+
SECRET_KEY=InsecureKeyNotForProduction
|
.vscode/launch.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
// Use IntelliSense to learn about possible attributes.
|
| 3 |
+
// Hover to view descriptions of existing attributes.
|
| 4 |
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
| 5 |
+
"version": "0.2.0",
|
| 6 |
+
"configurations": [
|
| 7 |
+
{
|
| 8 |
+
"name": "Python: Django",
|
| 9 |
+
"type": "python",
|
| 10 |
+
"request": "launch",
|
| 11 |
+
"program": "${workspaceFolder}/src/manage.py",
|
| 12 |
+
"args": [
|
| 13 |
+
"runserver"
|
| 14 |
+
],
|
| 15 |
+
"django": true,
|
| 16 |
+
"justMyCode": true
|
| 17 |
+
}
|
| 18 |
+
]
|
| 19 |
+
}
|
.vscode/settings.json
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"appService.defaultWebAppToDeploy": "/subscriptions/74feb6f3-f646-478d-a99b-37fafee75e29/microsoft.web/sites/subscriptions/74feb6f3-f646-478d-a99b-37fafee75e29/resourceGroups/django-example-quizsite/providers/Microsoft.Web/sites/django-example-quizsite",
|
| 3 |
-
"appService.deploySubpath": "."
|
| 4 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.vscode/tasks.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "2.0.0",
|
| 3 |
+
"tasks": [{
|
| 4 |
+
"label": "Open Django shell",
|
| 5 |
+
"type": "shell",
|
| 6 |
+
"command": "./src/manage.py shell",
|
| 7 |
+
"problemMatcher": [],
|
| 8 |
+
"presentation": {
|
| 9 |
+
"reveal": "always",
|
| 10 |
+
"panel": "new"
|
| 11 |
+
}
|
| 12 |
+
}, {
|
| 13 |
+
"label": "Create super user",
|
| 14 |
+
"type": "shell",
|
| 15 |
+
"command": "./src/manage.py createsuperuser",
|
| 16 |
+
"problemMatcher": [],
|
| 17 |
+
"presentation": {
|
| 18 |
+
"reveal": "always",
|
| 19 |
+
"panel": "new"
|
| 20 |
+
}
|
| 21 |
+
}, {
|
| 22 |
+
"label": "Run Django tests",
|
| 23 |
+
"type": "shell",
|
| 24 |
+
"command": "./src/manage.py test",
|
| 25 |
+
"group": "test",
|
| 26 |
+
"presentation": {
|
| 27 |
+
"reveal": "always",
|
| 28 |
+
"panel": "dedicated"
|
| 29 |
+
}
|
| 30 |
+
}, {
|
| 31 |
+
"label": "Make migrations",
|
| 32 |
+
"type": "shell",
|
| 33 |
+
"command": "./src/manage.py makemigrations",
|
| 34 |
+
"problemMatcher": [],
|
| 35 |
+
"presentation": {
|
| 36 |
+
"reveal": "always",
|
| 37 |
+
"panel": "dedicated"
|
| 38 |
+
}
|
| 39 |
+
}, {
|
| 40 |
+
"label": "Run migrations",
|
| 41 |
+
"type": "shell",
|
| 42 |
+
"command": "./src/manage.py migrate",
|
| 43 |
+
"problemMatcher": [],
|
| 44 |
+
"presentation": {
|
| 45 |
+
"reveal": "always",
|
| 46 |
+
"panel": "dedicated"
|
| 47 |
+
}
|
| 48 |
+
}, {
|
| 49 |
+
"label": "Load seed data",
|
| 50 |
+
"type": "shell",
|
| 51 |
+
"command": "./src/manage.py loaddata seed_data.json",
|
| 52 |
+
"problemMatcher": [],
|
| 53 |
+
"presentation": {
|
| 54 |
+
"reveal": "always",
|
| 55 |
+
"panel": "dedicated"
|
| 56 |
+
}
|
| 57 |
+
}]
|
| 58 |
+
}
|
src/quizzes/fixtures/seed_data.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"model": "quizzes.quiz",
|
| 4 |
+
"pk": 1,
|
| 5 |
+
"fields": {
|
| 6 |
+
"name": "Python Trivia"
|
| 7 |
+
}
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"model": "quizzes.question",
|
| 11 |
+
"pk": 1,
|
| 12 |
+
"fields": {
|
| 13 |
+
"quiz": 1,
|
| 14 |
+
"prompt": "Who invented Python?"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"model": "quizzes.question",
|
| 19 |
+
"pk": 2,
|
| 20 |
+
"fields": {
|
| 21 |
+
"quiz": 1,
|
| 22 |
+
"prompt": "When was the first version of Python released?"
|
| 23 |
+
}
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"model": "quizzes.question",
|
| 27 |
+
"pk": 3,
|
| 28 |
+
"fields": {
|
| 29 |
+
"quiz": 1,
|
| 30 |
+
"prompt": "What's the latest version of Python released?"
|
| 31 |
+
}
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"model": "quizzes.multiplechoiceanswer",
|
| 35 |
+
"pk": 1,
|
| 36 |
+
"fields": {
|
| 37 |
+
"question": 1,
|
| 38 |
+
"correct_answer": "Guido van Rossum",
|
| 39 |
+
"choices": "[\"Guido van Rossum\", \"Ada Lovelace\", \"Rob Pike\", \"Kathleen Booth\"]"
|
| 40 |
+
}
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"model": "quizzes.multiplechoiceanswer",
|
| 44 |
+
"pk": 2,
|
| 45 |
+
"fields": {
|
| 46 |
+
"question": 2,
|
| 47 |
+
"correct_answer": "1991",
|
| 48 |
+
"choices": "[\"1971\", \"1981\", \"1991\", \"2001\", \"2011\"]"
|
| 49 |
+
}
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"model": "quizzes.multiplechoiceanswer",
|
| 53 |
+
"pk": 3,
|
| 54 |
+
"fields": {
|
| 55 |
+
"question": 3,
|
| 56 |
+
"correct_answer": "3.11",
|
| 57 |
+
"choices": "[\"3.6\", \"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\"]"
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
]
|