static url fix
This commit is contained in:
@@ -16,7 +16,8 @@ except ImportError:
|
||||
|
||||
# Django settings for blechreiz project.
|
||||
|
||||
DEBUG = True
|
||||
# Set DJANGO_DEBUG=True in .env for local development; leave unset (or False) in production.
|
||||
DEBUG = os.environ.get("DJANGO_DEBUG", "False") == "True"
|
||||
|
||||
ADMINS = [
|
||||
("Martin Bauer", "bauer_martin@gmx.de"),
|
||||
@@ -76,6 +77,9 @@ PUBLIC_URLS = (
|
||||
"^musicians/login/?$",
|
||||
"^musicians/login/usernames/?$",
|
||||
"^eventplanner_gcal/gcalApiCallback*",
|
||||
# Static and media files must be accessible without login
|
||||
r"^static/",
|
||||
r"^media/",
|
||||
)
|
||||
|
||||
# Additional locations of static files
|
||||
@@ -94,6 +98,8 @@ SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
|
||||
|
||||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
# WhiteNoise serves static files directly — must be right after SecurityMiddleware
|
||||
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
|
||||
21
docker/entrypoint.sh
Normal file
21
docker/entrypoint.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /app
|
||||
|
||||
echo "--- Installing/updating Python dependencies ---"
|
||||
pip install --quiet -r requirements.txt
|
||||
|
||||
echo "--- Collecting static files ---"
|
||||
python manage.py collectstatic --noinput
|
||||
|
||||
echo "--- Running database migrations ---"
|
||||
python manage.py migrate --noinput
|
||||
|
||||
echo "--- Starting gunicorn ---"
|
||||
exec gunicorn blechreiz.wsgi:application \
|
||||
--bind 0.0.0.0:8000 \
|
||||
--workers 2 \
|
||||
--timeout 120 \
|
||||
--access-logfile - \
|
||||
--error-logfile -
|
||||
@@ -1,11 +1,11 @@
|
||||
{% load sekizai_tags static %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{STATIC_URL}}/css/lib/animate.css"
|
||||
href="{{STATIC_URL}}css/lib/animate.css"
|
||||
media="screen, projection"
|
||||
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
href="{{STATIC_URL}}/css/coming-soon.css"
|
||||
href="{{STATIC_URL}}css/coming-soon.css"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
/>{% endaddtoblock %} {% if countdown %} {% addtoblock "js" %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{% block content %}
|
||||
|
||||
{% addtoblock "css" strip %}
|
||||
<link rel="stylesheet" href="{{STATIC_URL}}/css/bootstrap-switch.min.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="{{STATIC_URL}}css/bootstrap-switch.min.css" type="text/css" media="screen" />
|
||||
{% endaddtoblock %}
|
||||
|
||||
{% addtoblock "css" %}
|
||||
@@ -25,7 +25,7 @@
|
||||
{% endaddtoblock %}
|
||||
|
||||
{% addtoblock "js" strip %}
|
||||
<script src="{{STATIC_URL}}/js/bootstrap-switch.min.js"></script>
|
||||
<script src="{{STATIC_URL}}js/bootstrap-switch.min.js"></script>
|
||||
{% endaddtoblock %}
|
||||
|
||||
{% addtoblock "js" %}
|
||||
@@ -72,7 +72,7 @@
|
||||
weil man alle anderen eigenen Termine auch im Blick hat.
|
||||
</p>
|
||||
|
||||
<img src="{{STATIC_URL}}/img/screenshot.png">
|
||||
<img src="{{STATIC_URL}}img/screenshot.png">
|
||||
|
||||
<p>
|
||||
<h5>SO GEHTS:</h5>
|
||||
@@ -115,7 +115,7 @@
|
||||
</div>
|
||||
|
||||
<div class="span3 offset1">
|
||||
<img src="{{STATIC_URL}}/img/google_cal.png">
|
||||
<img src="{{STATIC_URL}}img/google_cal.png">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{% extends "website/base.html" %} {% load sekizai_tags static %} {% block content %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{STATIC_URL}}/css/portfolio.css"
|
||||
href="{{STATIC_URL}}css/portfolio.css"
|
||||
media="screen, projection"
|
||||
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{STATIC_URL}}/css/lib/isotope.css"
|
||||
href="{{STATIC_URL}}css/lib/isotope.css"
|
||||
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{STATIC_URL}}/css/lib/animate.css"
|
||||
href="{{STATIC_URL}}css/lib/animate.css"
|
||||
/>{% endaddtoblock %} {% addtoblock "css" %}
|
||||
<style>
|
||||
.addressbook_entry {
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
</style>
|
||||
{% endaddtoblock %} {% addtoblock "js" strip %}
|
||||
<script src="{{STATIC_URL}}/js/jquery.isotope.min.js"></script>
|
||||
<script src="{{STATIC_URL}}js/jquery.isotope.min.js"></script>
|
||||
{% endaddtoblock %} {% addtoblock "js" %}
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
{% extends "website/base.html" %} {% load sekizai_tags static %} {% block menu_contents %} {% endblock %} {% block content %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
href="{{STATIC_URL}}/css/lib/animate.css"
|
||||
href="{{STATIC_URL}}css/lib/animate.css"
|
||||
type="text/css"
|
||||
media="screen, projection"
|
||||
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
href="{{STATIC_URL}}/css/sign-in.css"
|
||||
href="{{STATIC_URL}}css/sign-in.css"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
/>
|
||||
{% endaddtoblock %} {% addtoblock "js" strip %}
|
||||
<script src="{{STATIC_URL}}/js/jquery.noty.js"></script>
|
||||
<script src="{{STATIC_URL}}js/jquery.noty.js"></script>
|
||||
{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
href="{{STATIC_URL}}/css/jquery.noty.css"
|
||||
href="{{STATIC_URL}}css/jquery.noty.css"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
/>
|
||||
{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
href="{{STATIC_URL}}/css/noty_theme_default.css"
|
||||
href="{{STATIC_URL}}css/noty_theme_default.css"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
/>
|
||||
|
||||
@@ -140,7 +140,7 @@ def logout_view(request):
|
||||
|
||||
|
||||
def userlistForAutocompletion(request):
|
||||
result = [u.username for u in User.objects.all()]
|
||||
result = [u.username for u in User.objects.filter(is_active=True).order_by("username")]
|
||||
return HttpResponse(json.dumps(result), content_type="application/json")
|
||||
|
||||
|
||||
|
||||
@@ -23,4 +23,11 @@ reportlab>=4.2
|
||||
# Image handling
|
||||
Pillow>=10.4
|
||||
|
||||
dotenv
|
||||
# Environment variable loading
|
||||
python-dotenv
|
||||
|
||||
# Production WSGI server
|
||||
gunicorn>=22.0
|
||||
|
||||
# Serve static files directly from gunicorn (no separate web server needed)
|
||||
whitenoise>=6.8
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
<img
|
||||
class="pic-with-border"
|
||||
src="{{STATIC_URL}}/img/scoreSheet.jpg"
|
||||
src="{{STATIC_URL}}img/scoreSheet.jpg"
|
||||
/>
|
||||
|
||||
<ul class="sidebar_menu">
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{% extends "website/base.html" %} {% load sekizai_tags static %} {% block content %} {% addtoblock "js" strip %}
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
|
||||
{% endaddtoblock %} {% addtoblock "js" strip %}
|
||||
<script src="{{STATIC_URL}}/js/List.js"></script>
|
||||
<script src="{{STATIC_URL}}js/List.js"></script>
|
||||
{% endaddtoblock %} {% addtoblock "js" strip %}
|
||||
<script src="{{STATIC_URL}}/js/List.pagination.js"></script>
|
||||
<script src="{{STATIC_URL}}js/List.pagination.js"></script>
|
||||
{% endaddtoblock %} {% addtoblock "css" strip %}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{{STATIC_URL}}/css/jquery-ui-1.8.21.custom.css"
|
||||
href="{{STATIC_URL}}css/jquery-ui-1.8.21.custom.css"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
/>
|
||||
@@ -230,7 +230,7 @@
|
||||
{% for piece in allPieces %}
|
||||
<li data-pieceid="{{piece.pk}}"{% if piece.repertoire_nr %} class="in-repertoire"{% endif %}>
|
||||
<p class="item">
|
||||
<img src="{{STATIC_URL}}/img/score-icon.png" />
|
||||
<img src="{{STATIC_URL}}img/score-icon.png" />
|
||||
<span class="title"> {{ piece.title }} </span>
|
||||
<br />
|
||||
<span class="composer">{{ piece.composer}} </span>
|
||||
@@ -256,7 +256,7 @@
|
||||
{% for piece in repertoire %}
|
||||
<li data-pieceid="{{piece.pk}}">
|
||||
<p class="item">
|
||||
<img src="{{STATIC_URL}}/img/score-icon.png" />
|
||||
<img src="{{STATIC_URL}}img/score-icon.png" />
|
||||
|
||||
<span class="title"> {{ piece.title }} </span>
|
||||
<br />
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
}
|
||||
|
||||
#section2 {
|
||||
background: url("{{STATIC_URL}}/img/backgrounds/aqua.jpg") no-repeat scroll 0% 0% / cover transparent;
|
||||
background: url("{{STATIC_URL}}img/backgrounds/aqua.jpg") no-repeat scroll 0% 0% / cover transparent;
|
||||
display: block;
|
||||
padding-top:50px;
|
||||
padding-bottom:20px;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{% extends "website/base.html" %} {% load sekizai_tags static youtubefilter %}
|
||||
{% block content %} {% addtoblock "css" strip %}<link
|
||||
rel="stylesheet"
|
||||
href="{{STATIC_URL}}/css/datepicker.css"
|
||||
href="{{STATIC_URL}}css/datepicker.css"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
/>
|
||||
{% endaddtoblock %} {% addtoblock "css" strip %}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{{STATIC_URL}}/css/blogpost.css"
|
||||
href="{{STATIC_URL}}css/blogpost.css"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
/>
|
||||
@@ -33,8 +33,8 @@
|
||||
}
|
||||
</style>
|
||||
{% endaddtoblock %} {% addtoblock "js" %}
|
||||
<script src="{{STATIC_URL}}/js/bootstrap-datepicker.js"></script>
|
||||
<script src="{{STATIC_URL}}/js/bootstrap-datepicker.de.js"></script>
|
||||
<script src="{{STATIC_URL}}js/bootstrap-datepicker.js"></script>
|
||||
<script src="{{STATIC_URL}}js/bootstrap-datepicker.de.js"></script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
{% addtoblock "css" strip %}
|
||||
<link
|
||||
id="base-style"
|
||||
href="{{STATIC_URL}}/css/perfectum-style.css"
|
||||
href="{{STATIC_URL}}css/perfectum-style.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
{% endaddtoblock %} {% addtoblock "css" strip %}
|
||||
<link
|
||||
id="base-style-responsive"
|
||||
href="{{STATIC_URL}}/css/perfectum-style-responsive.css"
|
||||
href="{{STATIC_URL}}css/perfectum-style-responsive.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
{% endaddtoblock %}
|
||||
|
||||
@@ -58,11 +58,11 @@ planning {% endcomment %} {% addtoblock "css" %}
|
||||
<article
|
||||
class="slide"
|
||||
id="slide_news"
|
||||
style="background: url('{{STATIC_URL}}/img/slides/aqua.jpg') repeat-x top center;"
|
||||
style="background: url('{{STATIC_URL}}img/slides/aqua.jpg') repeat-x top center;"
|
||||
>
|
||||
<img
|
||||
class="asset left-30 sp600 t150 z1"
|
||||
src="{{STATIC_URL}}/img/google_cal.png"
|
||||
src="{{STATIC_URL}}img/google_cal.png"
|
||||
/>
|
||||
<div class="info">
|
||||
<a href="/eventplanner_gcal/manage">GoogleCalendar</a>
|
||||
@@ -75,7 +75,7 @@ planning {% endcomment %} {% addtoblock "css" %}
|
||||
<article
|
||||
class="slide"
|
||||
id="slide_eventManagement"
|
||||
style="background: url('{{STATIC_URL}}/img/slides/andi2.jpg') repeat-x top center;"
|
||||
style="background: url('{{STATIC_URL}}img/slides/andi2.jpg') repeat-x top center;"
|
||||
>
|
||||
<div class="info">
|
||||
<a href="/events">Einsatzplanung</a>
|
||||
@@ -91,11 +91,11 @@ planning {% endcomment %} {% addtoblock "css" %}
|
||||
<article
|
||||
class="slide"
|
||||
id="slide_messages"
|
||||
style="background: url('{{STATIC_URL}}/img/backgrounds/silver.jpg') repeat-x top center;"
|
||||
style="background: url('{{STATIC_URL}}img/backgrounds/silver.jpg') repeat-x top center;"
|
||||
>
|
||||
<img
|
||||
class="asset left-30 sp600 t120 z1"
|
||||
src="{{STATIC_URL}}/img/slides/gruppe.png"
|
||||
src="{{STATIC_URL}}img/slides/gruppe.png"
|
||||
/>
|
||||
<div class="info">
|
||||
<a href="/messages">Forum</a>
|
||||
@@ -106,7 +106,7 @@ planning {% endcomment %} {% addtoblock "css" %}
|
||||
<article
|
||||
class="slide"
|
||||
id="adressbook"
|
||||
style="background: url('{{STATIC_URL}}/img/slides/spielen2.jpg') repeat-x top center;"
|
||||
style="background: url('{{STATIC_URL}}img/slides/spielen2.jpg') repeat-x top center;"
|
||||
>
|
||||
<div class="info">
|
||||
<a href="/musicians">Adressbuch</a>
|
||||
|
||||
Reference in New Issue
Block a user