chore: fix pghistory migration deps and improve htmx utilities

- Update pghistory dependency from 0007 to 0006 in account migrations
- Add docstrings and remove unused imports in htmx_forms.py
- Add DJANGO_SETTINGS_MODULE bash commands to Claude settings
- Add state transition definitions for ride statuses
This commit is contained in:
pacnpal
2025-12-21 17:33:24 -05:00
parent b9063ff4f8
commit 7ba0004c93
74 changed files with 11134 additions and 198 deletions

View File

@@ -19,7 +19,14 @@ PARK_STATUSES = [
'color': 'green',
'icon': 'check-circle',
'css_class': 'bg-green-100 text-green-800',
'sort_order': 1
'sort_order': 1,
'can_transition_to': [
'CLOSED_TEMP',
'CLOSED_PERM',
],
'requires_moderator': False,
'is_final': False,
'is_initial': True,
},
category=ChoiceCategory.STATUS
),
@@ -31,7 +38,12 @@ PARK_STATUSES = [
'color': 'yellow',
'icon': 'pause-circle',
'css_class': 'bg-yellow-100 text-yellow-800',
'sort_order': 2
'sort_order': 2,
'can_transition_to': [
'CLOSED_PERM',
],
'requires_moderator': False,
'is_final': False,
},
category=ChoiceCategory.STATUS
),
@@ -43,7 +55,13 @@ PARK_STATUSES = [
'color': 'red',
'icon': 'x-circle',
'css_class': 'bg-red-100 text-red-800',
'sort_order': 3
'sort_order': 3,
'can_transition_to': [
'DEMOLISHED',
'RELOCATED',
],
'requires_moderator': True,
'is_final': False,
},
category=ChoiceCategory.STATUS
),
@@ -55,7 +73,12 @@ PARK_STATUSES = [
'color': 'blue',
'icon': 'tool',
'css_class': 'bg-blue-100 text-blue-800',
'sort_order': 4
'sort_order': 4,
'can_transition_to': [
'OPERATING',
],
'requires_moderator': False,
'is_final': False,
},
category=ChoiceCategory.STATUS
),
@@ -67,7 +90,10 @@ PARK_STATUSES = [
'color': 'gray',
'icon': 'trash',
'css_class': 'bg-gray-100 text-gray-800',
'sort_order': 5
'sort_order': 5,
'can_transition_to': [],
'requires_moderator': True,
'is_final': True,
},
category=ChoiceCategory.STATUS
),
@@ -79,7 +105,10 @@ PARK_STATUSES = [
'color': 'purple',
'icon': 'arrow-right',
'css_class': 'bg-purple-100 text-purple-800',
'sort_order': 6
'sort_order': 6,
'can_transition_to': [],
'requires_moderator': True,
'is_final': True,
},
category=ChoiceCategory.STATUS
),