diff --git a/Dockerfile b/Dockerfile index 75e4804dd..450a1428c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,6 +68,7 @@ COPY --from=backend-build /app/src/ /app/src/ # copy frontend build statics COPY --from=frontend-build /app/src/sdg/static /app/src/sdg/static +COPY --from=frontend-build /app/node_modules/formset.js /app/node_modules/formset.js # copy source code COPY ./src /app/src diff --git a/docker-compose.yml b/docker-compose.yml index 3b8744c79..aafde81d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,8 @@ services: # NOTE: No persistance storage configured. # See: https://hub.docker.com/_/postgres/ image: postgres + environment: + - POSTGRES_HOST_AUTH_METHOD=trust # NOTE: this works for bitnami, not sure if this works for regular # postgres image volumes: diff --git a/docker-init-db.sql b/docker-init-db.sql index c98654d50..6f79cdc90 100644 --- a/docker-init-db.sql +++ b/docker-init-db.sql @@ -1,4 +1,4 @@ -CREATE USER {{ project_name|lower }}; -CREATE DATABASE {{ project_name|lower }}; -GRANT ALL PRIVILEGES ON DATABASE {{ project_name|lower }} TO {{ project_name|lower }}; +CREATE USER sdg; +CREATE DATABASE sdg; +GRANT ALL PRIVILEGES ON DATABASE sdg TO sdg; diff --git a/src/sdg/conf/docker.py b/src/sdg/conf/docker.py index 86da9a20b..fd1722b61 100644 --- a/src/sdg/conf/docker.py +++ b/src/sdg/conf/docker.py @@ -10,6 +10,6 @@ # # Strongly suggested to not use this, but explicitly list the allowed hosts. It is # used to verify if a redirect is safe or not (open redirect vulnerabilities etc.) -# os.environ.setdefault("ALLOWED_HOSTS", "*") +os.environ.setdefault("ALLOWED_HOSTS", "*") from .production import * # noqa isort:skip diff --git a/src/sdg/templates/403.html b/src/sdg/templates/403.html index a7d3a2537..657db03c1 100644 --- a/src/sdg/templates/403.html +++ b/src/sdg/templates/403.html @@ -1,10 +1,7 @@ -{% extends 'master.html' %} +{% extends 'account/base.html' %} {% block menu %}{% endblock %} -{% block content %} - -

Sorry, you don't have access to this page (403)

- - -{% endblock content %} +{% block login_right %} +

Sorry, you don't have access to this page (403)

+{% endblock login_right %} diff --git a/src/sdg/templates/404.html b/src/sdg/templates/404.html index 836e66998..239af897c 100644 --- a/src/sdg/templates/404.html +++ b/src/sdg/templates/404.html @@ -1,10 +1,10 @@ -{% extends 'master.html' %} +{% extends 'account/base.html' %} -{% block menu %}{% endblock %} +{% load i18n %} -{% block content %} - -

Sorry, the requested page could not be found (404)

- - -{% endblock content %} +{% block login_right %} +

404

+

+ {% trans 'Sorry, the request page could not be found.' %} +

+{% endblock login_right %} diff --git a/src/sdg/templates/500.html b/src/sdg/templates/500.html index 01c568253..9c1ae835f 100644 --- a/src/sdg/templates/500.html +++ b/src/sdg/templates/500.html @@ -1,210 +1,15 @@ - - - - - - - +{% extends 'account/base.html' %} - - Server Error +{% block menu %}{% endblock %} - - - - - - - - - - - - - - -
- -
- -
- -
-

Sorry, a server error has occurred (500)

-

We have been automatically notified about the problem and will investigate as soon as possible.

- {% if request.sentry.id %} -

If you need assistance, you may reference this error as +{% block login_right %} +

Sorry, a server error has occurred (500)

+

We have been automatically notified about the problem and will investigate as soon as possible.

+ {% if request.sentry.id %} +

If you need assistance, you may reference this error as {{ request.sentry.id }}.

- {% endif %} -

- Back to home -

-
- -
- -
- -
- - - + {% endif %} +

+ Back to home +

+{% endblock login_right %} diff --git a/src/sdg/templates/503.html b/src/sdg/templates/503.html index e852c9336..af23cb0a6 100644 --- a/src/sdg/templates/503.html +++ b/src/sdg/templates/503.html @@ -1,207 +1,11 @@ +{% extends 'account/base.html' %} - - - - - - - +{% block menu %}{% endblock %} - - Service Unavailable - - - - - - - - - - - - - - - -
- -
- -
- -
-

Sorry, this website is closed for repair / is unavailable (503)

-

Please try again in a few moments.

-

- Back to home -

-
- -
- -
- -
- - - +{% block login_right %} +

Sorry, this website is closed for repair / is unavailable (503)

+

Please try again in a few moments.

+

+ Back to home +

+{% endblock login_right %} diff --git a/src/sdg/templates/account_blocked.html b/src/sdg/templates/account_blocked.html index df551d0f8..46018fbcd 100644 --- a/src/sdg/templates/account_blocked.html +++ b/src/sdg/templates/account_blocked.html @@ -1,11 +1,6 @@ -{% extends 'master.html' %} - -{% block menu %}{% endblock %} - -{% block content %} +{% extends 'account/base.html' %} +{% block login_right %}

Sorry, your account has been blocked

-

If you you want your account unblocked, please contact the webmaster.

- -{% endblock content %} +{% endblock login_right %} diff --git a/src/sdg/templates/master.html b/src/sdg/templates/master.html index de1ed5e86..0b1f13e34 100644 --- a/src/sdg/templates/master.html +++ b/src/sdg/templates/master.html @@ -18,8 +18,6 @@
{% block content %} - Override {% verbatim %}{% block content %}{% endverbatim %} - to get some actual content. {% endblock %}