Comments (6)
Can you test the latest version (1.2) it should fix it.
from djorm-pgarray.
Seems to be working OK for me on 1.7 with a similar use case.
from djorm-pgarray.
Thanks
from djorm-pgarray.
I think this issue should be reopened. Using pgarray 1.2, if the field is defined as:
str_array = TextArrayField(default=[], null=False, blank=False)
It fails on Django 1.7 migrate
: django.db.utils.DataError: missing dimension value
. Though it seems to workaround fine if I do this:
str_array = TextArrayField(default="{}", null=False, blank=False)
from djorm-pgarray.
@niwinz I found this issue searching Github and has to use the same solution as @ses4j. I also noticed the field definition in the test cases here - https://github.com/niwinz/djorm-pgarray/blob/master/testing/pg_array_fields/models.py#L16 - where a function defines the default value by returning a list.
I don't fully understand the constraints, but setting the default with default=[]
seems like the good/correct behavior.
from djorm-pgarray.
Is clearly not fixed bug! I'll reopen the issue.
from djorm-pgarray.
Related Issues (20)
- Unicode values and `ArrayFormField` HOT 4
- ArrayField(dbtype='date') HOT 3
- Table creation in Django 1.7 HOT 1
- Default null and blank kwargs are inconsistent with default null and blank kwargs for Django fields HOT 2
- Multiple DB representations for blank values HOT 1
- dbtype / type_cast are not Django-esque HOT 2
- How to remove an element from the array? HOT 6
- ArrayFormField with dimension > 1 HOT 1
- How to use PostgreSQL array operator in Django 1.6? HOT 2
- Bug with the default form field HOT 5
- TLDR: where's PyPI release? HOT 1
- How work with pgarray? HOT 2
- Model class is read multiple times, but pop removes the dbtype argument HOT 8
- Django Admin HOT 1
- How to properly delete an object that uses pg_array fields HOT 2
- Tag version 1.2 in git HOT 2
- Migrating to 1.8's django.contrib.postgres.fields.ArrayField HOT 3
- Use GIN index by default
- django.db.utils.ProgrammingError: operator class "text_pattern_ops" does not accept data type text[]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djorm-pgarray.