mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-20 19:01:16 +08:00
Fix base_field type for SimpleArrayField (#1097)
* Fix base_field type for SimpleArrayField * Add test which fails without this change
This commit is contained in:
@@ -17,3 +17,18 @@
|
||||
|
||||
class MyModel(models.Model):
|
||||
array = ArrayField(base_field=models.TextField())
|
||||
- case: postgres_forms_simple_array_field
|
||||
main: |
|
||||
from myapp.forms import MyForm
|
||||
MyForm()
|
||||
installed_apps:
|
||||
- myapp
|
||||
files:
|
||||
- path: myapp/__init__.py
|
||||
- path: myapp/forms.py
|
||||
content: |
|
||||
from django import forms
|
||||
from django.contrib.postgres.forms import SimpleArrayField
|
||||
|
||||
class MyForm(forms.Form):
|
||||
lots_of_dates = SimpleArrayField(forms.DateField(), required=False)
|
||||
|
||||
Reference in New Issue
Block a user