File: tests-Set-STATIC_ROOT-STATIC_URL-in-settings.py.patch

package info (click to toggle)
django-graphiql-debug-toolbar 0.2.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 248 kB
  • sloc: python: 155; javascript: 30; sh: 15; makefile: 11
file content (28 lines) | stat: -rw-r--r-- 825 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Carsten Schoenert <c.schoenert@t-online.de>
Date: Fri, 28 Mar 2025 15:52:08 +0200
Subject: tests: Set STATIC_ROOT & STATIC_URL in settings.py

Django is requiring these settings as otherwise the test call will fail
with:

---%<---
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the required STATIC_URL setting.
--->%---
---
 tests/settings.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/settings.py b/tests/settings.py
index 7ae8302..f9cd212 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -16,6 +16,9 @@ DATABASES = {
 SECRET_KEY = "test"
 ROOT_URLCONF = "tests.urls"
 
+STATIC_ROOT = "../graphiql_debug_toolbar/static/"
+STATIC_URL = '/static/'
+
 TEMPLATES = [
     {
         "BACKEND": "django.template.backends.django.DjangoTemplates",