How to setup django-hstore with an existing app managed by south?

后端 未结 3 1829
谎友^
谎友^ 2020-12-28 15:55

I tried to use django-hstore using this nice tutorial. I added two classes to an existing app managed by South:

clas         


        
3条回答
  •  伪装坚强ぢ
    2020-12-28 16:31

    Django now includes a migration operation to create the hstore extension in PostgreSQL:

    from django.contrib.postgres.operations import HStoreExtension
    
    class Migration(migrations.Migration):
        ...
    
        operations = [
            HStoreExtension(),
            ...
        ]
    

提交回复
热议问题