Commit a98c0d2 1 parent d6a05a0 commit a98c0d2 Copy full SHA for a98c0d2
File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ We follow [Semantic Versions](https://semver.org/) starting at the `0.14.0` rele
9
9
### Bug Fixes
10
10
11
11
- Fixes missing ` Add another ` button for inlines in ` BaseEntityAdmin `
12
+ - Fixes saving of Attribute date types rendering using ` BaseDynamicEntityForm ` [ #261 ] ( https://github.com/jazzband/django-eav2/issues/261 )
12
13
13
14
## 1.2.3 (2022-08-15)
14
15
Original file line number Diff line number Diff line change 2
2
3
3
from copy import deepcopy
4
4
5
- from django import forms
6
5
from django .contrib .admin .widgets import AdminSplitDateTime
7
6
from django .core .exceptions import ValidationError
8
7
from django .forms import (
9
8
BooleanField ,
10
9
CharField ,
11
10
ChoiceField ,
12
- DateTimeField ,
11
+ Field ,
13
12
FloatField ,
14
13
IntegerField ,
15
14
ModelForm ,
15
+ SplitDateTimeField ,
16
16
)
17
17
from django .utils .translation import gettext_lazy as _
18
18
19
+ from eav .widgets import CSVWidget
20
+
19
21
try :
20
22
from django .forms import JSONField
21
23
except :
22
24
JSONField = CharField
23
25
24
- from eav .widgets import CSVWidget
25
-
26
26
27
- class CSVFormField (forms . Field ):
27
+ class CSVFormField (Field ):
28
28
message = _ ('Enter comma-separated-values. eg: one;two;three.' )
29
29
code = 'invalid'
30
30
widget = CSVWidget
@@ -66,6 +66,7 @@ class BaseDynamicEntityForm(ModelForm):
66
66
text CharField
67
67
float IntegerField
68
68
int DateTimeField
69
+ date SplitDateTimeField
69
70
bool BooleanField
70
71
enum ChoiceField
71
72
json JSONField
@@ -77,7 +78,7 @@ class BaseDynamicEntityForm(ModelForm):
77
78
'text' : CharField ,
78
79
'float' : FloatField ,
79
80
'int' : IntegerField ,
80
- 'date' : DateTimeField ,
81
+ 'date' : SplitDateTimeField ,
81
82
'bool' : BooleanField ,
82
83
'enum' : ChoiceField ,
83
84
'json' : JSONField ,
You can’t perform that action at this time.
0 commit comments