Add vite react #45
|
@ -9,6 +9,11 @@ custom_datetime_widget = forms.DateTimeInput(
|
|||
)
|
||||
autofocus_input_widget = forms.TextInput(attrs={"autofocus": "autofocus"})
|
||||
|
||||
custom_date_widget = forms.DateInput(attrs={"type": "date"})
|
||||
custom_datetime_widget = forms.DateTimeInput(
|
||||
attrs={"type": "datetime-local"}, format="%Y-%m-%d %H:%M"
|
||||
)
|
||||
|
||||
|
||||
class SessionForm(forms.ModelForm):
|
||||
# purchase = forms.ModelChoiceField(
|
||||
|
@ -82,7 +87,6 @@ class PurchaseForm(forms.ModelForm):
|
|||
widgets = {
|
||||
"date_purchased": custom_date_widget,
|
||||
"date_refunded": custom_date_widget,
|
||||
"date_finished": custom_date_widget,
|
||||
}
|
||||
model = Purchase
|
||||
fields = [
|
||||
|
|
|
@ -155,23 +155,4 @@ if _csrf_trusted_origins:
|
|||
else:
|
||||
CSRF_TRUSTED_ORIGINS = []
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
"DEFAULT_PERMISSION_CLASSES": [
|
||||
"rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly"
|
||||
]
|
||||
}
|
||||
|
||||
FRONTEND_ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "frontend", "dist"))
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
|
||||
CORS_ALLOW_HEADERS = list(default_headers) + [
|
||||
"Accept-Language",
|
||||
"Connection",
|
||||
"Host",
|
||||
"Origin",
|
||||
"Referer",
|
||||
"Sec-Fetch-Dest",
|
||||
"Sec-Fetch-Mode",
|
||||
"Sec-Fetch-Site",
|
||||
]
|
||||
USE_L10N = False
|
||||
|
|
Loading…
Reference in New Issue