Skip to content

gustabot42/django_pgarray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Django array field support for postgres

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages