Skip to content

Commit

Permalink
added whitenoise
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-pettinga committed Feb 5, 2024
1 parent 3755b93 commit 829defd
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 19 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dj-database-url = "*"
django-formtools = "*"
gevent = "*"
sentry-sdk = "*"
whitenoise = "*"

[dev-packages]
black = "~=23.12"
Expand Down
34 changes: 21 additions & 13 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@

MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
Expand Down
3 changes: 1 addition & 2 deletions report_a_breach/base_classes/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ def __init__(self, *args, **kwargs):


class BaseModelForm(BaseForm, forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
pass
3 changes: 1 addition & 2 deletions report_a_breach/core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class EmailForm(BaseModelForm):
class Meta:
model = Breach
fields = ["reporter_email_address"]
widget = forms.TextInput(attrs={"id": "email_address"})


class EmailVerifyForm(BaseForm):
Expand Down Expand Up @@ -57,4 +56,4 @@ class Meta:


class SummaryForm(BaseForm):
...
pass
4 changes: 2 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e

python manage.py migrate --noinput
python manage.py collectstatic --noinput
python manage.py migrate --no-input
python manage.py collectstatic --no-input

# Start webserver
gunicorn config.wsgi --bind 0.0.0.0:8080 --capture-output --config config/gunicorn.py

0 comments on commit 829defd

Please sign in to comment.