- Added WebSocket connection for real-time updates on activity attendees and capacity. - Created base HTML template for consistent layout across event pages. - Developed event details page to display event information and activities. - Implemented RSVP page with multi-step navigation for email, guests, activities, questions, and notes. - Added partial templates for dynamic content rendering during RSVP process. - Introduced utility functions for page management and RSVP creation. - Updated ASGI configuration to support WebSocket connections. - Enhanced logging for better debugging and error tracking. - Integrated channels for handling real-time communication in RSVP process.
31 lines
840 B
Python
31 lines
840 B
Python
|
|
PAGE_ORDER = [
|
|
'invalid',
|
|
'email',
|
|
'guests',
|
|
'activities',
|
|
'questions',
|
|
'notes',
|
|
'completed',
|
|
]
|
|
|
|
### PAGES
|
|
def is_previous_page(first:str, second:str) -> bool:
|
|
"""return True if `first` is a previous page of `second`"""
|
|
try:
|
|
first_idx = PAGE_ORDER.index(first)
|
|
second_idx = PAGE_ORDER.index(second)
|
|
return first_idx < second_idx
|
|
except ValueError:
|
|
# If either page is not in the list, return False
|
|
return False
|
|
|
|
def is_next_page(first:str, second:str) -> bool:
|
|
"""return True if `first` is a next page of `second`"""
|
|
try:
|
|
first_idx = PAGE_ORDER.index(first)
|
|
second_idx = PAGE_ORDER.index(second)
|
|
return first_idx > second_idx
|
|
except ValueError:
|
|
# If either page is not in the list, return False
|
|
return False |