Pamela Fox
commited on
Commit
·
ee0267e
1
Parent(s):
0bf56a7
Update URLs
Browse files- README.md +10 -4
- quizsite/urls.py +1 -1
- quizzes/urls.py +2 -2
- readme_diagram.png +0 -0
- readme_screenshot.png +0 -0
README.md
CHANGED
|
@@ -2,9 +2,15 @@
|
|
| 2 |
|
| 3 |
# Quizzes app
|
| 4 |
|
| 5 |
-
An example Django app that serves quizzes and lets people know how they scored.
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
## Opening the project
|
| 10 |
|
|
@@ -49,7 +55,7 @@ If you're not using one of those options for opening the project, then you'll ne
|
|
| 49 |
python3 manage.py runserver
|
| 50 |
```
|
| 51 |
|
| 52 |
-
5. Navigate to
|
| 53 |
|
| 54 |
### Admin
|
| 55 |
|
|
|
|
| 2 |
|
| 3 |
# Quizzes app
|
| 4 |
|
| 5 |
+
An example Django app that serves quizzes and lets people know how they scored. Quizzes and their questions are stored in a PostgreSQL database. There is no user authentication or per-user data stored.
|
| 6 |
+
|
| 7 |
+

|
| 8 |
+
|
| 9 |
+
The project is designed for deployment on Azure App Service with a PostgreSQL flexible server. See deployment instructions below.
|
| 10 |
+
|
| 11 |
+

|
| 12 |
+
|
| 13 |
+
The code is tested with `django.test`, linted with [ruff](https://github.com/charliermarsh/ruff), and formatted with [black](https://black.readthedocs.io/en/stable/). Code quality issues are all checked with both [pre-commit](https://pre-commit.com/) and Github actions.
|
| 14 |
|
| 15 |
## Opening the project
|
| 16 |
|
|
|
|
| 55 |
python3 manage.py runserver
|
| 56 |
```
|
| 57 |
|
| 58 |
+
5. Navigate to the displayed URL to verify the website is working.
|
| 59 |
|
| 60 |
### Admin
|
| 61 |
|
quizsite/urls.py
CHANGED
|
@@ -17,6 +17,6 @@ from django.contrib import admin
|
|
| 17 |
from django.urls import include, path
|
| 18 |
|
| 19 |
urlpatterns = [
|
| 20 |
-
path("
|
| 21 |
path("admin/", admin.site.urls),
|
| 22 |
]
|
|
|
|
| 17 |
from django.urls import include, path
|
| 18 |
|
| 19 |
urlpatterns = [
|
| 20 |
+
path("", include("quizzes.urls")),
|
| 21 |
path("admin/", admin.site.urls),
|
| 22 |
]
|
quizzes/urls.py
CHANGED
|
@@ -6,7 +6,7 @@ app_name = "quizzes"
|
|
| 6 |
|
| 7 |
urlpatterns = [
|
| 8 |
path("", views.IndexView.as_view(), name="index"),
|
| 9 |
-
path("
|
| 10 |
-
path("
|
| 11 |
path("questions/<int:question_id>/grade/", views.grade_question, name="grade_question"),
|
| 12 |
]
|
|
|
|
| 6 |
|
| 7 |
urlpatterns = [
|
| 8 |
path("", views.IndexView.as_view(), name="index"),
|
| 9 |
+
path("quizzes/<int:quiz_id>/", views.display_quiz, name="display_quiz"),
|
| 10 |
+
path("quizzes/<int:quiz_id>/questions/<int:question_id>", views.display_question, name="display_question"),
|
| 11 |
path("questions/<int:question_id>/grade/", views.grade_question, name="grade_question"),
|
| 12 |
]
|
readme_diagram.png
ADDED
|
readme_screenshot.png
ADDED
|