static url fix
This commit is contained in:
@@ -16,7 +16,8 @@ except ImportError:
|
|||||||
|
|
||||||
# Django settings for blechreiz project.
|
# 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 = [
|
ADMINS = [
|
||||||
("Martin Bauer", "bauer_martin@gmx.de"),
|
("Martin Bauer", "bauer_martin@gmx.de"),
|
||||||
@@ -76,6 +77,9 @@ PUBLIC_URLS = (
|
|||||||
"^musicians/login/?$",
|
"^musicians/login/?$",
|
||||||
"^musicians/login/usernames/?$",
|
"^musicians/login/usernames/?$",
|
||||||
"^eventplanner_gcal/gcalApiCallback*",
|
"^eventplanner_gcal/gcalApiCallback*",
|
||||||
|
# Static and media files must be accessible without login
|
||||||
|
r"^static/",
|
||||||
|
r"^media/",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Additional locations of static files
|
# Additional locations of static files
|
||||||
@@ -94,6 +98,8 @@ SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
|
|||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
"django.middleware.security.SecurityMiddleware",
|
"django.middleware.security.SecurityMiddleware",
|
||||||
|
# WhiteNoise serves static files directly — must be right after SecurityMiddleware
|
||||||
|
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||||
"django.middleware.common.CommonMiddleware",
|
"django.middleware.common.CommonMiddleware",
|
||||||
"django.middleware.csrf.CsrfViewMiddleware",
|
"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
|
{% load sekizai_tags static %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
href="{{STATIC_URL}}/css/lib/animate.css"
|
href="{{STATIC_URL}}css/lib/animate.css"
|
||||||
media="screen, projection"
|
media="screen, projection"
|
||||||
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{STATIC_URL}}/css/coming-soon.css"
|
href="{{STATIC_URL}}css/coming-soon.css"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
media="screen"
|
media="screen"
|
||||||
/>{% endaddtoblock %} {% if countdown %} {% addtoblock "js" %}
|
/>{% endaddtoblock %} {% if countdown %} {% addtoblock "js" %}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% addtoblock "css" strip %}
|
{% 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 %}
|
{% endaddtoblock %}
|
||||||
|
|
||||||
{% addtoblock "css" %}
|
{% addtoblock "css" %}
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
{% endaddtoblock %}
|
{% endaddtoblock %}
|
||||||
|
|
||||||
{% addtoblock "js" strip %}
|
{% addtoblock "js" strip %}
|
||||||
<script src="{{STATIC_URL}}/js/bootstrap-switch.min.js"></script>
|
<script src="{{STATIC_URL}}js/bootstrap-switch.min.js"></script>
|
||||||
{% endaddtoblock %}
|
{% endaddtoblock %}
|
||||||
|
|
||||||
{% addtoblock "js" %}
|
{% addtoblock "js" %}
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
weil man alle anderen eigenen Termine auch im Blick hat.
|
weil man alle anderen eigenen Termine auch im Blick hat.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<img src="{{STATIC_URL}}/img/screenshot.png">
|
<img src="{{STATIC_URL}}img/screenshot.png">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<h5>SO GEHTS:</h5>
|
<h5>SO GEHTS:</h5>
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span3 offset1">
|
<div class="span3 offset1">
|
||||||
<img src="{{STATIC_URL}}/img/google_cal.png">
|
<img src="{{STATIC_URL}}img/google_cal.png">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
{% extends "website/base.html" %} {% load sekizai_tags static %} {% block content %} {% addtoblock "css" strip %}<link
|
{% extends "website/base.html" %} {% load sekizai_tags static %} {% block content %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
href="{{STATIC_URL}}/css/portfolio.css"
|
href="{{STATIC_URL}}css/portfolio.css"
|
||||||
media="screen, projection"
|
media="screen, projection"
|
||||||
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
href="{{STATIC_URL}}/css/lib/isotope.css"
|
href="{{STATIC_URL}}css/lib/isotope.css"
|
||||||
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
href="{{STATIC_URL}}/css/lib/animate.css"
|
href="{{STATIC_URL}}css/lib/animate.css"
|
||||||
/>{% endaddtoblock %} {% addtoblock "css" %}
|
/>{% endaddtoblock %} {% addtoblock "css" %}
|
||||||
<style>
|
<style>
|
||||||
.addressbook_entry {
|
.addressbook_entry {
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% endaddtoblock %} {% addtoblock "js" strip %}
|
{% 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" %}
|
{% endaddtoblock %} {% addtoblock "js" %}
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
{% extends "website/base.html" %} {% load sekizai_tags static %} {% block menu_contents %} {% endblock %} {% block content %} {% addtoblock "css" strip %}<link
|
{% extends "website/base.html" %} {% load sekizai_tags static %} {% block menu_contents %} {% endblock %} {% block content %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{STATIC_URL}}/css/lib/animate.css"
|
href="{{STATIC_URL}}css/lib/animate.css"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
media="screen, projection"
|
media="screen, projection"
|
||||||
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
/>{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{STATIC_URL}}/css/sign-in.css"
|
href="{{STATIC_URL}}css/sign-in.css"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
media="screen"
|
media="screen"
|
||||||
/>
|
/>
|
||||||
{% endaddtoblock %} {% addtoblock "js" strip %}
|
{% 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
|
{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{STATIC_URL}}/css/jquery.noty.css"
|
href="{{STATIC_URL}}css/jquery.noty.css"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
media="screen"
|
media="screen"
|
||||||
/>
|
/>
|
||||||
{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
{% endaddtoblock %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{STATIC_URL}}/css/noty_theme_default.css"
|
href="{{STATIC_URL}}css/noty_theme_default.css"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
media="screen"
|
media="screen"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ def logout_view(request):
|
|||||||
|
|
||||||
|
|
||||||
def userlistForAutocompletion(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")
|
return HttpResponse(json.dumps(result), content_type="application/json")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,4 +23,11 @@ reportlab>=4.2
|
|||||||
# Image handling
|
# Image handling
|
||||||
Pillow>=10.4
|
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
|
<img
|
||||||
class="pic-with-border"
|
class="pic-with-border"
|
||||||
src="{{STATIC_URL}}/img/scoreSheet.jpg"
|
src="{{STATIC_URL}}img/scoreSheet.jpg"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ul class="sidebar_menu">
|
<ul class="sidebar_menu">
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{% extends "website/base.html" %} {% load sekizai_tags static %} {% block content %} {% addtoblock "js" strip %}
|
{% 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>
|
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
|
||||||
{% endaddtoblock %} {% addtoblock "js" strip %}
|
{% endaddtoblock %} {% addtoblock "js" strip %}
|
||||||
<script src="{{STATIC_URL}}/js/List.js"></script>
|
<script src="{{STATIC_URL}}js/List.js"></script>
|
||||||
{% endaddtoblock %} {% addtoblock "js" strip %}
|
{% 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 %}
|
{% endaddtoblock %} {% addtoblock "css" strip %}
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
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"
|
type="text/css"
|
||||||
media="screen"
|
media="screen"
|
||||||
/>
|
/>
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
{% for piece in allPieces %}
|
{% for piece in allPieces %}
|
||||||
<li data-pieceid="{{piece.pk}}"{% if piece.repertoire_nr %} class="in-repertoire"{% endif %}>
|
<li data-pieceid="{{piece.pk}}"{% if piece.repertoire_nr %} class="in-repertoire"{% endif %}>
|
||||||
<p class="item">
|
<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>
|
<span class="title"> {{ piece.title }} </span>
|
||||||
<br />
|
<br />
|
||||||
<span class="composer">{{ piece.composer}} </span>
|
<span class="composer">{{ piece.composer}} </span>
|
||||||
@@ -256,7 +256,7 @@
|
|||||||
{% for piece in repertoire %}
|
{% for piece in repertoire %}
|
||||||
<li data-pieceid="{{piece.pk}}">
|
<li data-pieceid="{{piece.pk}}">
|
||||||
<p class="item">
|
<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>
|
<span class="title"> {{ piece.title }} </span>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#section2 {
|
#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;
|
display: block;
|
||||||
padding-top:50px;
|
padding-top:50px;
|
||||||
padding-bottom:20px;
|
padding-bottom:20px;
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
{% extends "website/base.html" %} {% load sekizai_tags static youtubefilter %}
|
{% extends "website/base.html" %} {% load sekizai_tags static youtubefilter %}
|
||||||
{% block content %} {% addtoblock "css" strip %}<link
|
{% block content %} {% addtoblock "css" strip %}<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{STATIC_URL}}/css/datepicker.css"
|
href="{{STATIC_URL}}css/datepicker.css"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
media="screen"
|
media="screen"
|
||||||
/>
|
/>
|
||||||
{% endaddtoblock %} {% addtoblock "css" strip %}
|
{% endaddtoblock %} {% addtoblock "css" strip %}
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{STATIC_URL}}/css/blogpost.css"
|
href="{{STATIC_URL}}css/blogpost.css"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
media="screen"
|
media="screen"
|
||||||
/>
|
/>
|
||||||
@@ -33,8 +33,8 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% endaddtoblock %} {% addtoblock "js" %}
|
{% endaddtoblock %} {% addtoblock "js" %}
|
||||||
<script src="{{STATIC_URL}}/js/bootstrap-datepicker.js"></script>
|
<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.de.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
{% addtoblock "css" strip %}
|
{% addtoblock "css" strip %}
|
||||||
<link
|
<link
|
||||||
id="base-style"
|
id="base-style"
|
||||||
href="{{STATIC_URL}}/css/perfectum-style.css"
|
href="{{STATIC_URL}}css/perfectum-style.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
{% endaddtoblock %} {% addtoblock "css" strip %}
|
{% endaddtoblock %} {% addtoblock "css" strip %}
|
||||||
<link
|
<link
|
||||||
id="base-style-responsive"
|
id="base-style-responsive"
|
||||||
href="{{STATIC_URL}}/css/perfectum-style-responsive.css"
|
href="{{STATIC_URL}}css/perfectum-style-responsive.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
{% endaddtoblock %}
|
{% endaddtoblock %}
|
||||||
|
|||||||
@@ -58,11 +58,11 @@ planning {% endcomment %} {% addtoblock "css" %}
|
|||||||
<article
|
<article
|
||||||
class="slide"
|
class="slide"
|
||||||
id="slide_news"
|
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
|
<img
|
||||||
class="asset left-30 sp600 t150 z1"
|
class="asset left-30 sp600 t150 z1"
|
||||||
src="{{STATIC_URL}}/img/google_cal.png"
|
src="{{STATIC_URL}}img/google_cal.png"
|
||||||
/>
|
/>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<a href="/eventplanner_gcal/manage">GoogleCalendar</a>
|
<a href="/eventplanner_gcal/manage">GoogleCalendar</a>
|
||||||
@@ -75,7 +75,7 @@ planning {% endcomment %} {% addtoblock "css" %}
|
|||||||
<article
|
<article
|
||||||
class="slide"
|
class="slide"
|
||||||
id="slide_eventManagement"
|
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">
|
<div class="info">
|
||||||
<a href="/events">Einsatzplanung</a>
|
<a href="/events">Einsatzplanung</a>
|
||||||
@@ -91,11 +91,11 @@ planning {% endcomment %} {% addtoblock "css" %}
|
|||||||
<article
|
<article
|
||||||
class="slide"
|
class="slide"
|
||||||
id="slide_messages"
|
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
|
<img
|
||||||
class="asset left-30 sp600 t120 z1"
|
class="asset left-30 sp600 t120 z1"
|
||||||
src="{{STATIC_URL}}/img/slides/gruppe.png"
|
src="{{STATIC_URL}}img/slides/gruppe.png"
|
||||||
/>
|
/>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<a href="/messages">Forum</a>
|
<a href="/messages">Forum</a>
|
||||||
@@ -106,7 +106,7 @@ planning {% endcomment %} {% addtoblock "css" %}
|
|||||||
<article
|
<article
|
||||||
class="slide"
|
class="slide"
|
||||||
id="adressbook"
|
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">
|
<div class="info">
|
||||||
<a href="/musicians">Adressbuch</a>
|
<a href="/musicians">Adressbuch</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user