We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1955667 commit 77e57cdCopy full SHA for 77e57cd
django_async_extensions/aforms/models.py
@@ -10,6 +10,18 @@ class AsyncModelForm(ModelForm):
10
async def from_async(cls, *args, **kwargs):
11
return await sync_to_async(cls)(*args, **kwargs)
12
13
+ @property
14
+ async def aerrors(self):
15
+ if self._errors is None:
16
+ await self.afull_clean()
17
+ return self._errors
18
+
19
+ async def ais_valid(self):
20
+ return self.is_bound and not await self.aerrors
21
22
+ async def afull_clean(self):
23
+ return await sync_to_async(self.full_clean)()
24
25
async def _asave_m2m(self):
26
"""
27
Save the many-to-many fields and generic relations for this form.
0 commit comments