Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r prod-requirements.txt

COPY --chown=nobody:nogroup . .

Expand Down
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,19 @@ To get started:
pre-commit install
```

5. Run the webapp:
5. First-time database setup:

Before running the server for the first time, initialise the database tables as follows:

```bash
python manage.py migrate
```

If you run into the following error, then you've missed this step:

`django.db.utils.OperationalError: no such table: main_skilllevel`

6. Run the webapp:

```bash
python manage.py runserver
Expand All @@ -83,19 +95,19 @@ To get started:

then restart it.

6. Run the tests:
7. Run the tests:

```bash
pytest
```

7. Create an admin account to access admin backend:
8. Create an admin account to access admin backend:

```bash
python manage.py createsuperuser
```

8. Populate the database using a snapshot of v2.0 of the framework (this is not necessarily the latest live version, so this is only used for development).
9. Populate the database using a snapshot of v2.0 of the framework (this is not necessarily the latest live version, so this is only used for development).

```bash
python manage.py loaddata direct_webapp/fixtures/framework-2-0.json
Expand Down
4 changes: 1 addition & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --extra=dev --output-file=dev-requirements.txt
Expand Down Expand Up @@ -102,8 +102,6 @@ mypy==1.20.0
# django-stubs
mypy-extensions==1.1.0
# via mypy
mysqlclient==2.2.8
# via direct_webapp (pyproject.toml)
nh3==0.3.4
# via direct_webapp (pyproject.toml)
nodeenv==1.10.0
Expand Down
4 changes: 1 addition & 3 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --extra=doc --output-file=doc-requirements.txt
Expand Down Expand Up @@ -120,8 +120,6 @@ mkdocstrings==1.0.3
# mkdocstrings-python
mkdocstrings-python==2.0.3
# via direct_webapp (pyproject.toml)
mysqlclient==2.2.8
# via direct_webapp (pyproject.toml)
nh3==0.3.4
# via direct_webapp (pyproject.toml)
packaging==26.0
Expand Down
69 changes: 69 additions & 0 deletions prod-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --extra=prod --output-file=prod-requirements.txt
#
asgiref==3.11.1
# via django
certifi==2026.4.22
# via requests
charset-normalizer==3.4.7
# via requests
confusable-homoglyphs==3.3.1
# via django-registration
crispy-bootstrap5==2026.3
# via direct_webapp (pyproject.toml)
diff-match-patch==20241021
# via django-import-export
django==6.0.3
# via
# crispy-bootstrap5
# direct_webapp (pyproject.toml)
# django-bootstrap5
# django-crispy-forms
# django-import-export
# django-multiselectfield
# django-registration
# django-stubs-ext
# django-tables2
django-bootstrap5==26.2
# via direct_webapp (pyproject.toml)
django-crispy-forms==2.6
# via
# crispy-bootstrap5
# direct_webapp (pyproject.toml)
django-import-export==4.4.0
# via direct_webapp (pyproject.toml)
django-multiselectfield==1.0.1
# via direct_webapp (pyproject.toml)
django-registration==5.2.1
# via direct_webapp (pyproject.toml)
django-stubs-ext==6.0.2
# via direct_webapp (pyproject.toml)
django-tables2==3.0.0
# via direct_webapp (pyproject.toml)
gunicorn==25.3.0
# via direct_webapp (pyproject.toml)
idna==3.13
# via requests
markdown==3.10.2
# via direct_webapp (pyproject.toml)
mysqlclient==2.2.8
# via direct_webapp (pyproject.toml)
nh3==0.3.4
# via direct_webapp (pyproject.toml)
packaging==26.0
# via gunicorn
requests==2.33.1
# via direct_webapp (pyproject.toml)
sqlparse==0.5.5
# via django
tablib==3.9.0
# via django-import-export
typing-extensions==4.15.0
# via django-stubs-ext
urllib3==2.6.3
# via requests
whitenoise==6.12.0
# via direct_webapp (pyproject.toml)
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies = [
"crispy-bootstrap5",
"gunicorn",
"whitenoise",
"mysqlclient",
"django-import-export",
"django-multiselectfield",
"django-tables2",
Expand All @@ -41,6 +40,9 @@ dev = [
"types-requests",
"beautifulsoup4",
]
prod = [
"mysqlclient",
]
doc = [
"mkdocs<2",
"mkdocstrings",
Expand Down
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile
Expand Down Expand Up @@ -49,8 +49,6 @@ idna==3.13
# via requests
markdown==3.10.2
# via direct_webapp (pyproject.toml)
mysqlclient==2.2.8
# via direct_webapp (pyproject.toml)
nh3==0.3.4
# via direct_webapp (pyproject.toml)
packaging==26.0
Expand Down