diff --git a/.flake8 b/.flake8 index f317e57..9aeee7f 100644 --- a/.flake8 +++ b/.flake8 @@ -7,3 +7,4 @@ exclude = .git, build, env + venv diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7df8095..1d12601 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,13 +17,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Log in to the Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -31,12 +31,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d94f357..395a85e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,10 +8,10 @@ jobs: name: Lint steps: - name: Check out source repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python environment - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.10" - name: flake8 Lint - uses: py-actions/flake8@v1 \ No newline at end of file + uses: py-actions/flake8@v2 \ No newline at end of file diff --git a/.github/workflows/test-app.yml b/.github/workflows/test-app.yml index fec2575..7dd42e7 100644 --- a/.github/workflows/test-app.yml +++ b/.github/workflows/test-app.yml @@ -2,8 +2,6 @@ name: Test on: push: - branches: - - master jobs: test: @@ -12,13 +10,13 @@ jobs: env: SQLITE: True steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.10" - name: Cache pip - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} diff --git a/webpage/templates/webpage/base.html b/webpage/templates/webpage/base.html index 2e6b976..3de757e 100644 --- a/webpage/templates/webpage/base.html +++ b/webpage/templates/webpage/base.html @@ -53,7 +53,7 @@ {% include 'webpage/partials/navbar.html' %}
-
+
{% block content %}{% endblock %}
diff --git a/webpage/templates/webpage/imprint.html b/webpage/templates/webpage/imprint.html index 23abdc4..232825d 100644 --- a/webpage/templates/webpage/imprint.html +++ b/webpage/templates/webpage/imprint.html @@ -6,10 +6,12 @@
-

Imprint | Impressum

+

Imprint

-
+
+ {{ imprint_body|safe }} +
diff --git a/webpage/templates/webpage/partials/footer.html b/webpage/templates/webpage/partials/footer.html index 3e32b94..5f92ac1 100644 --- a/webpage/templates/webpage/partials/footer.html +++ b/webpage/templates/webpage/partials/footer.html @@ -40,7 +40,7 @@

HELPDESK

- Imprint + Imprint
diff --git a/webpage/templates/webpage/partials/navbar.html b/webpage/templates/webpage/partials/navbar.html index 9544e86..ea41319 100644 --- a/webpage/templates/webpage/partials/navbar.html +++ b/webpage/templates/webpage/partials/navbar.html @@ -30,7 +30,7 @@ {% if user.is_authenticated %} - + {% else %} {% endif %} diff --git a/webpage/urls.py b/webpage/urls.py index 25d5bfa..86e7ce7 100644 --- a/webpage/urls.py +++ b/webpage/urls.py @@ -12,6 +12,7 @@ path('project-info/', views.project_info, name='project_info'), path('accounts/login/', views.user_login, name='user_login'), path('logout/', views.user_logout, name='user_logout'), + path('imprint/', views.ImprintView.as_view(), name='imprint'), path('', views.GenericWebpageView.as_view(), name='staticpage'), path('user/', views.UserDetailView.as_view(), name='user_detail'), ] diff --git a/webpage/views.py b/webpage/views.py index 173a854..96afa28 100644 --- a/webpage/views.py +++ b/webpage/views.py @@ -18,25 +18,12 @@ from copy import deepcopy -def get_imprint_url(): - try: - base_url = settings.ACDH_IMPRINT_URL - except AttributeError: - base_url = "https://provide-an-acdh-imprint-url/" - try: - redmine_id = settings.REDMINE_ID - except AttributeError: - redmine_id = "go-register-a-redmine-service-issue" - return "{}{}".format(base_url, redmine_id) - - class ImprintView(TemplateView): template_name = 'webpage/imprint.html' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) - r = requests.get(get_imprint_url()) - + r = requests.get("https://imprint.acdh.oeaw.ac.at/12305") if r.status_code == 200: context['imprint_body'] = "{}".format(r.text) else: