mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 10:51:09 -05:00
- Created critical functionality audit report identifying 7 critical issues affecting production readiness. - Added design assessment report highlighting exceptional design quality and minor cosmetic fixes needed. - Documented non-authenticated features testing results confirming successful functionality and public access. - Implemented ride search form with autocomplete functionality and corresponding templates for search results. - Developed tests for ride autocomplete functionality, ensuring proper filtering and authentication checks.
20 lines
628 B
Python
20 lines
628 B
Python
from django import forms
|
|
from autocomplete import AutocompleteWidget
|
|
|
|
from rides.models import Ride
|
|
from search.mixins import RideAutocomplete
|
|
|
|
|
|
class RideSearchForm(forms.Form):
|
|
"""Form for searching rides with autocomplete."""
|
|
ride = forms.ModelChoiceField(
|
|
queryset=Ride.objects.all(),
|
|
required=False,
|
|
widget=AutocompleteWidget(
|
|
ac_class=RideAutocomplete,
|
|
attrs={
|
|
'class': 'w-full border-gray-300 rounded-lg form-input dark:border-gray-600 dark:bg-gray-700 dark:text-white',
|
|
'placeholder': 'Search rides...'
|
|
}
|
|
)
|
|
) |