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

@@ -95,7 +95,15 @@ RIDE_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',
'SBNO',
'CLOSING',
],
'requires_moderator': False,
'is_final': False,
'is_initial': True,
},
category=ChoiceCategory.STATUS
),
@@ -107,7 +115,13 @@ RIDE_STATUSES = [
'color': 'yellow',
'icon': 'pause-circle',
'css_class': 'bg-yellow-100 text-yellow-800',
'sort_order': 2
'sort_order': 2,
'can_transition_to': [
'SBNO',
'CLOSING',
],
'requires_moderator': False,
'is_final': False,
},
category=ChoiceCategory.STATUS
),
@@ -119,7 +133,14 @@ RIDE_STATUSES = [
'color': 'orange',
'icon': 'stop-circle',
'css_class': 'bg-orange-100 text-orange-800',
'sort_order': 3
'sort_order': 3,
'can_transition_to': [
'CLOSED_PERM',
'DEMOLISHED',
'RELOCATED',
],
'requires_moderator': True,
'is_final': False,
},
category=ChoiceCategory.STATUS
),
@@ -131,7 +152,13 @@ RIDE_STATUSES = [
'color': 'red',
'icon': 'x-circle',
'css_class': 'bg-red-100 text-red-800',
'sort_order': 4
'sort_order': 4,
'can_transition_to': [
'CLOSED_PERM',
'SBNO',
],
'requires_moderator': True,
'is_final': False,
},
category=ChoiceCategory.STATUS
),
@@ -143,7 +170,13 @@ RIDE_STATUSES = [
'color': 'red',
'icon': 'x-circle',
'css_class': 'bg-red-100 text-red-800',
'sort_order': 5
'sort_order': 5,
'can_transition_to': [
'DEMOLISHED',
'RELOCATED',
],
'requires_moderator': True,
'is_final': False,
},
category=ChoiceCategory.STATUS
),
@@ -155,7 +188,12 @@ RIDE_STATUSES = [
'color': 'blue',
'icon': 'tool',
'css_class': 'bg-blue-100 text-blue-800',
'sort_order': 6
'sort_order': 6,
'can_transition_to': [
'OPERATING',
],
'requires_moderator': False,
'is_final': False,
},
category=ChoiceCategory.STATUS
),
@@ -167,7 +205,10 @@ RIDE_STATUSES = [
'color': 'gray',
'icon': 'trash',
'css_class': 'bg-gray-100 text-gray-800',
'sort_order': 7
'sort_order': 7,
'can_transition_to': [],
'requires_moderator': True,
'is_final': True,
},
category=ChoiceCategory.STATUS
),
@@ -179,7 +220,10 @@ RIDE_STATUSES = [
'color': 'purple',
'icon': 'arrow-right',
'css_class': 'bg-purple-100 text-purple-800',
'sort_order': 8
'sort_order': 8,
'can_transition_to': [],
'requires_moderator': True,
'is_final': True,
},
category=ChoiceCategory.STATUS
),