Compare commits

...

3 commits

Author SHA1 Message Date
05ade38f2f move js to custom.js 2023-10-01 02:10:58 +02:00
ed75a20862 moar logs 2023-10-01 02:10:46 +02:00
a027fd7582 compat 2023-10-01 02:10:37 +02:00
5 changed files with 10 additions and 9 deletions

View file

@ -297,4 +297,4 @@ LOGGING = {
#MEDIA_ROOT = "/home/plex/Documents/code/python/gawa/media"
MEDIA_ROOT = "/app/media"
MEDIA_URL = "/media/"
FILE_UPLOAD_TEMP_DIR = "/tmp/gawa/upload"
# FILE_UPLOAD_TEMP_DIR = "/tmp/gawa/upload"

View file

@ -14,14 +14,14 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls import url
from django.contrib import admin
from django.urls import include, re_path
from django.urls import include, path
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
url(r'^i18n/', include('django.conf.urls.i18n')),
re_path(r'^i18n/', include('django.conf.urls.i18n')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += i18n_patterns(

View file

@ -14,12 +14,6 @@
<link rel="stylesheet" href="/static/codehighlight.css">
<link rel="stylesheet" href="/static/custom.css">
{% endcompress %}
<script>
const setTheme = theme => {
document.documentElement.setAttribute('data-bs-theme', theme)
}
setTheme(localStorage.getItem('theme'));
</script>
{% block headscripts %}
{% endblock headscripts %}
</head>
@ -108,6 +102,7 @@
</div>
</footer>
{% compress js %}
<script src="/static/custom.js"></script>
<script src="/static/bs5/dist/js/bootstrap.bundle.min.js"></script>
{% endcompress %}
</body>

View file

@ -19,6 +19,9 @@ def change_lang(context, lang="de", *args, **kwargs):
shamelessly stolen from stackoverflow:
https://stackoverflow.com/a/41147772
"""
logger = logging.getLogger(__name__)
logger.debug(f"changing lang from '{lang}'")
path = context['request'].get_raw_uri()
url = path

3
makemigrations.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
docker compose exec main python /app/manage.py makemigrations
docker compose exec main python /app/manage.py migrate