mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 13:31:08 -05:00
Refactor ride list and search suggestion templates for improved structure and styling; update view logic to support dynamic template rendering based on request type
This commit is contained in:
@@ -261,6 +261,12 @@ class RideListView(ListView):
|
||||
|
||||
return queryset
|
||||
|
||||
def get_template_names(self):
|
||||
"""Return appropriate template based on request type"""
|
||||
if self.request.htmx:
|
||||
return ["rides/partials/ride_list_results.html"]
|
||||
return [self.template_name]
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
"""Add park and category choices to context"""
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user