Compare commits
No commits in common. "05ade38f2f088cdfa7385f127f9551225abd126e" and "42ea8d14d48985e1272422441d9611901de0093c" have entirely different histories.
05ade38f2f
...
42ea8d14d4
5 changed files with 9 additions and 10 deletions
|
@ -297,4 +297,4 @@ LOGGING = {
|
||||||
#MEDIA_ROOT = "/home/plex/Documents/code/python/gawa/media"
|
#MEDIA_ROOT = "/home/plex/Documents/code/python/gawa/media"
|
||||||
MEDIA_ROOT = "/app/media"
|
MEDIA_ROOT = "/app/media"
|
||||||
MEDIA_URL = "/media/"
|
MEDIA_URL = "/media/"
|
||||||
# FILE_UPLOAD_TEMP_DIR = "/tmp/gawa/upload"
|
FILE_UPLOAD_TEMP_DIR = "/tmp/gawa/upload"
|
||||||
|
|
|
@ -14,14 +14,14 @@ Including another URLconf
|
||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.conf.urls.i18n import i18n_patterns
|
from django.conf.urls.i18n import i18n_patterns
|
||||||
|
from django.conf.urls import url
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import include, re_path
|
|
||||||
from django.urls import include, path
|
from django.urls import include, path
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
re_path(r'^i18n/', include('django.conf.urls.i18n')),
|
url(r'^i18n/', include('django.conf.urls.i18n')),
|
||||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|
||||||
urlpatterns += i18n_patterns(
|
urlpatterns += i18n_patterns(
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
<link rel="stylesheet" href="/static/codehighlight.css">
|
<link rel="stylesheet" href="/static/codehighlight.css">
|
||||||
<link rel="stylesheet" href="/static/custom.css">
|
<link rel="stylesheet" href="/static/custom.css">
|
||||||
{% endcompress %}
|
{% endcompress %}
|
||||||
|
<script>
|
||||||
|
const setTheme = theme => {
|
||||||
|
document.documentElement.setAttribute('data-bs-theme', theme)
|
||||||
|
}
|
||||||
|
setTheme(localStorage.getItem('theme'));
|
||||||
|
</script>
|
||||||
{% block headscripts %}
|
{% block headscripts %}
|
||||||
{% endblock headscripts %}
|
{% endblock headscripts %}
|
||||||
</head>
|
</head>
|
||||||
|
@ -102,7 +108,6 @@
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
{% compress js %}
|
{% compress js %}
|
||||||
<script src="/static/custom.js"></script>
|
|
||||||
<script src="/static/bs5/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="/static/bs5/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
{% endcompress %}
|
{% endcompress %}
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -19,9 +19,6 @@ def change_lang(context, lang="de", *args, **kwargs):
|
||||||
shamelessly stolen from stackoverflow:
|
shamelessly stolen from stackoverflow:
|
||||||
https://stackoverflow.com/a/41147772
|
https://stackoverflow.com/a/41147772
|
||||||
"""
|
"""
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
logger.debug(f"changing lang from '{lang}'")
|
|
||||||
|
|
||||||
path = context['request'].get_raw_uri()
|
path = context['request'].get_raw_uri()
|
||||||
url = path
|
url = path
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
docker compose exec main python /app/manage.py makemigrations
|
|
||||||
docker compose exec main python /app/manage.py migrate
|
|
Loading…
Add table
Reference in a new issue