django-homegate通过弥合python-homegate (https://github.com/arteria/python-homegate) 和您的房地产Django应用之间的差距,为您的Django项目提供IDX3.01 API支持。
项目描述
Django Homegate
============
django-homegate (https://github.com/arteria/django-homegate) 通过弥合python-homegate (https://github.com/arteria/python-homegate) 和您的房地产Django应用之间的差距,为您的Django项目提供IDX3.01 API支持。
安装
------------
从PyPi获取最新稳定版本
.. code-block:: bash
$ TODO
从GitHub获取最新提交
.. code-block:: bash
$ pip install -e git+git://github.com/arteria/django-homegate.git#egg=django_homegate
将``django_homegate``添加到您的``INSTALLED_APPS``
.. code-block:: python
INSTALLED_APPS = (
...,
'django_homegate',
)
用法
-----
django-homegate是一个辅助应用,提供管理命令以使用python-homegate (https://github.com/arteria/python-homegate) 的API实现将新记录推送到Homegate。如果您从PyPi安装,此包将作为依赖项安装。
要连接您的房地产模型,请在设置中注册您的模型,并实现一个模型管理器方法,该方法返回所有要推送到Homegate的记录(房地产对象)。此外,您的房地产模型必须实现``get_idx_record()``和``published_idx_record()``方法,以获取要推送到Homegate的数据并更新记录的状态。在``django_homegate/models.py``中提供了一个示例。
要注册模型,请勿忘记在您的房地产模型中设置应用程序标签,例如 '<real-estate>',并在您的settings.py中添加``HOMEGATE_REAL_ESTATE_MODEL = '<your-app>.models.<real-estate-class>'``。
管理器方法名称为``ready_to_push()``,因此
.. code-block:: python
>>> objs = RealEstate.objects.ready_to_push()
将返回一个包含所有要发布到Homegate的房地产对象的QuerySet。在``django_homegate/models.py``中也提供了一个示例。
在 ``settings.py`` 中添加 ``HOMEGATE_AGENCY_ID = '<your-agency-id>'``, ``HOMEGATE_HOST = '<homegate-host>'`$, ``HOMEGATE_USERNAME = '<your-username>'`` 和 ``HOMEGATE_PASSWORD = '<your-password>'``。
有关模型管理器和应用程序标签的更多信息,请参阅
http://www.djangobook.com/en/2.0/chapter10.html
https://docs.django.ac.cn/en/dev/ref/models/options/#django.db.models.Options.app_label
贡献
----------
如果您想为此项目做出贡献,请执行以下步骤
.. code-block:: bash
# 分支此存储库
# 克隆您的分支
$ mkvirtualenv -p python2.7 django-homegate
$ python setup.py install
$ pip install -r dev_requirements.txt
$ git co -b feature_branch master
# 实现您的功能和测试
$ git add . && git commit
$ git push -u origin feature_branch
# 向我们发送您的功能分支的拉取请求
.. image:: https://d2weczhvl823v0.cloudfront.net/philippeowagner/django-homegate/trend.png
:alt: Bitdeli徽章
:target: https://bitdeli.com/free
============
django-homegate (https://github.com/arteria/django-homegate) 通过弥合python-homegate (https://github.com/arteria/python-homegate) 和您的房地产Django应用之间的差距,为您的Django项目提供IDX3.01 API支持。
安装
------------
从PyPi获取最新稳定版本
.. code-block:: bash
$ TODO
从GitHub获取最新提交
.. code-block:: bash
$ pip install -e git+git://github.com/arteria/django-homegate.git#egg=django_homegate
将``django_homegate``添加到您的``INSTALLED_APPS``
.. code-block:: python
INSTALLED_APPS = (
...,
'django_homegate',
)
用法
-----
django-homegate是一个辅助应用,提供管理命令以使用python-homegate (https://github.com/arteria/python-homegate) 的API实现将新记录推送到Homegate。如果您从PyPi安装,此包将作为依赖项安装。
要连接您的房地产模型,请在设置中注册您的模型,并实现一个模型管理器方法,该方法返回所有要推送到Homegate的记录(房地产对象)。此外,您的房地产模型必须实现``get_idx_record()``和``published_idx_record()``方法,以获取要推送到Homegate的数据并更新记录的状态。在``django_homegate/models.py``中提供了一个示例。
要注册模型,请勿忘记在您的房地产模型中设置应用程序标签,例如 '<real-estate>',并在您的settings.py中添加``HOMEGATE_REAL_ESTATE_MODEL = '<your-app>.models.<real-estate-class>'``。
管理器方法名称为``ready_to_push()``,因此
.. code-block:: python
>>> objs = RealEstate.objects.ready_to_push()
将返回一个包含所有要发布到Homegate的房地产对象的QuerySet。在``django_homegate/models.py``中也提供了一个示例。
在 ``settings.py`` 中添加 ``HOMEGATE_AGENCY_ID = '<your-agency-id>'``, ``HOMEGATE_HOST = '<homegate-host>'`$, ``HOMEGATE_USERNAME = '<your-username>'`` 和 ``HOMEGATE_PASSWORD = '<your-password>'``。
有关模型管理器和应用程序标签的更多信息,请参阅
http://www.djangobook.com/en/2.0/chapter10.html
https://docs.django.ac.cn/en/dev/ref/models/options/#django.db.models.Options.app_label
贡献
----------
如果您想为此项目做出贡献,请执行以下步骤
.. code-block:: bash
# 分支此存储库
# 克隆您的分支
$ mkvirtualenv -p python2.7 django-homegate
$ python setup.py install
$ pip install -r dev_requirements.txt
$ git co -b feature_branch master
# 实现您的功能和测试
$ git add . && git commit
$ git push -u origin feature_branch
# 向我们发送您的功能分支的拉取请求
.. image:: https://d2weczhvl823v0.cloudfront.net/philippeowagner/django-homegate/trend.png
:alt: Bitdeli徽章
:target: https://bitdeli.com/free
项目详情
关闭
django-homegate-0.1.1.tar.gz 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | a44343456560b7a058c4f36835fd5a858f68e639e14c85cd287eb6e3a4416fd1 |
|
MD5 | f236434e6fe4edfd6ac872ac32d926d6 |
|
BLAKE2b-256 | 2f3816fd28df7530e6ea500fd84e7378f84c9c7d11032552d9b0ea925e57b440 |