我已经安装了以下通过PIP和的virtualenv:Django的安装自定义应用程序(PostgreSQL系统模型)
pip install git+https://github.com/zacharyvoase/django-postgres.git
它成功地安装的软件包https://github.com/zacharyvoase/django-postgres。我用它在我的模型(作为其文件建立描述)
from django.db import models
import django_postgres as pg
USStates = pg.Enum('states_of_the_usa', ['AL', 'WY'])
class Address(pg.CompositeType):
line1 = models.CharField(max_length=100)
line2 = models.CharField(max_length=100, blank=True)
city = models.CharField(max_length=100)
zip_code = models.CharField(max_length=10)
state = USStates()
country = models.CharField(max_length=100)
当我尝试通过shell同步,它抛出一个错误:
(virtualenv) user$ python manage.py sync_pgviews
Unknown command: 'sync_pgviews'
Type 'manage.py help' for usage.
,我就留在安装应用程序后的东西吗?这是安装Django新应用程序的正确方法?
简短的答案是 - 没有。 –