Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (23 sloc) 0.751 kB

django_pgarray

Django array field support for postgres.

Use unicode csv for text widget (play nice with django admin) and to save array in others database like a text field

usage

the first attribute determines the item type through a field type

from django_pgarray.fields import PgArrayField

class MyModel(TimeStampedModel):
tags = PgArrayField(models.CharField, verbose_name = _(u"tags"), max_length=80)

default atributes

  • blank = True
  • null = True
  • default = None
  • blank_item = False # allow blank items
  • unique_item = True # treat array as a set

TODO

  • clean lookups posibilites
  • manager for contain sql, with extra method of queryset
  • tests
Jump to Line
Something went wrong with that request. Please try again.