Add tobacco image, Fix session cookie non https
This commit is contained in:
parent
db52750d97
commit
2e475ca433
@ -12,6 +12,7 @@ services:
|
||||
environment:
|
||||
- ALLOWED_HOSTS=internal.security
|
||||
- CSRF_TRUSTED_ORIGINS=internal.security
|
||||
- SESSION_COOKIE_SECURE=False
|
||||
- IP_RATE_LIMIT_TIME=1 # rate limit doesn't work in docker networking therefore disable it
|
||||
|
||||
nginx:
|
||||
|
@ -73,7 +73,7 @@ if csrf_origins := os.getenv("CSRF_TRUSTED_ORIGINS"):
|
||||
|
||||
WSGI_APPLICATION = 'clubhaus.wsgi.application'
|
||||
|
||||
SESSION_COOKIE_SECURE = True
|
||||
SESSION_COOKIE_SECURE = os.getenv("SESSION_COOKIE_SECURE", "False") == "True"
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
||||
|
@ -20,10 +20,10 @@
|
||||
const timerId =
|
||||
countdown(
|
||||
function (ts) {
|
||||
document.getElementById("timerDays").textContent = ts.days;
|
||||
document.getElementById("timerHours").textContent = ts.hours;
|
||||
document.getElementById("timerMinutes").textContent = ts.minutes;
|
||||
document.getElementById("timerSeconds").textContent = ts.seconds;
|
||||
document.getElementById("timerDays").textContent = ts.days || "00";
|
||||
document.getElementById("timerHours").textContent = ts.hours || "00";
|
||||
document.getElementById("timerMinutes").textContent = ts.minutes || "00";
|
||||
document.getElementById("timerSeconds").textContent = ts.seconds || "00";
|
||||
},
|
||||
new Date("{{ next_event.date.isoformat }}"),
|
||||
countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS);
|
||||
|
@ -25,6 +25,9 @@
|
||||
{% for tobacco in tobaccos %}
|
||||
<div class="col-sm-6 col-lg-4 col-sm-12 mb-4 text-center">
|
||||
<div class="card {% if tobacco.in_stock %} bg-success {% else %} red-700 text-decoration-line-through {% endif %}">
|
||||
{% if tobacco.picture %}
|
||||
<img class="rounded" src="{% get_media_prefix %}{{ tobacco.picture }}" alt="Tobacco Image">
|
||||
{% endif %}
|
||||
<div class="card-header">
|
||||
<h4 class="align-baseline">{{ tobacco.name }}</h4>
|
||||
<h6 class="card-subtitle mb-2">{{ tobacco.category.name }}</h6>
|
||||
|
BIN
clubhaus/media/tobacco_images/image01.jpg
Normal file
BIN
clubhaus/media/tobacco_images/image01.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
@ -1 +1,2 @@
|
||||
django~=4.0.5
|
||||
Pillow~=8.3.1
|
Loading…
Reference in New Issue
Block a user