mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 10:51:09 -05:00
Add timezone utility and current branch signal to enhance park detail functionality
This commit is contained in:
@@ -5,6 +5,7 @@ from django.template.loader import render_to_string
|
|||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
|
from django.utils import timezone
|
||||||
|
|
||||||
from .models import VersionBranch, VersionTag, ChangeSet
|
from .models import VersionBranch, VersionTag, ChangeSet
|
||||||
from .managers import BranchManager, ChangeTracker, MergeStrategy
|
from .managers import BranchManager, ChangeTracker, MergeStrategy
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from decimal import Decimal, ROUND_DOWN, InvalidOperation
|
|||||||
from typing import Tuple, Optional, Any, TYPE_CHECKING
|
from typing import Tuple, Optional, Any, TYPE_CHECKING
|
||||||
|
|
||||||
from companies.models import Company
|
from companies.models import Company
|
||||||
|
from history_tracking.signals import get_current_branch
|
||||||
from media.models import Photo
|
from media.models import Photo
|
||||||
from history_tracking.models import HistoricalModel
|
from history_tracking.models import HistoricalModel
|
||||||
from location.models import Location
|
from location.models import Location
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
{% for photo in park.photos.all|slice:":4" %}
|
{% for photo in park.photos.all|slice:":4" %}
|
||||||
<li class="aspect-w-1 aspect-h-1">
|
<li class="aspect-w-1 aspect-h-1">
|
||||||
<img src="{{ photo.image.url }}"
|
<img src="{{ photo.image.url }}"
|
||||||
alt="{% if photo.title %}{{ photo.title }} - {% endif %}{{ park.name }}"
|
alt="{% if photo.title %}{{ photo.title }} at {% endif %}{{ park.name }}"
|
||||||
class="object-cover rounded"
|
class="object-cover rounded"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
decoding="async"
|
decoding="async"
|
||||||
|
|||||||
Reference in New Issue
Block a user