mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-05-15 19:13:18 +00:00
Updated install docs
This commit is contained in:
parent
3c1d3c9de3
commit
df16ed379d
2 changed files with 21 additions and 15 deletions
30
README.rst
30
README.rst
|
|
@ -26,9 +26,22 @@ check `Wikipedia
|
||||||
* This app has slightly more robust (but still not perfect) filtering.
|
* This app has slightly more robust (but still not perfect) filtering.
|
||||||
|
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
|
||||||
|
From Github
|
||||||
|
~~~~~~~~~~~
|
||||||
|
You can install django-eav directly from guthub:
|
||||||
|
|
||||||
|
pip install -e git+git://github.com/mvpdev/django-eav.git#egg=django-eav
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
Edit settings.py
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
Add ``eav`` to your INSTALLED_APPS in your settings.py file.
|
||||||
|
|
||||||
Register your model(s)
|
Register your model(s)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Before you can attach eav attributes to your model, you must register your
|
Before you can attach eav attributes to your model, you must register your
|
||||||
|
|
@ -37,6 +50,9 @@ model with eav::
|
||||||
>>> import eav
|
>>> import eav
|
||||||
>>> eav.register(MyModel)
|
>>> eav.register(MyModel)
|
||||||
|
|
||||||
|
Generally you would do this in your ``models.py`` immediate after your model
|
||||||
|
declarations.
|
||||||
|
|
||||||
Create some attributes
|
Create some attributes
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
::
|
::
|
||||||
|
|
@ -71,17 +87,7 @@ Filter on eav values
|
||||||
>>> MyModel.objects.exclude(name='bob', eav__weight=15.4, eav__color='red')
|
>>> MyModel.objects.exclude(name='bob', eav__weight=15.4, eav__color='red')
|
||||||
|
|
||||||
|
|
||||||
Further Information
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Install from GitHub
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
It should be possible to install this tool directly from github using pip::
|
|
||||||
|
|
||||||
pip install -e git+git://github.com/mvpdev/django-eav.git#egg=django-eav
|
|
||||||
|
|
||||||
Documentation and Examples
|
Documentation and Examples
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
--------------------------
|
||||||
|
|
||||||
`<http://mvpdev.github.com/django-eav>`_
|
`<http://mvpdev.github.com/django-eav>`_
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ check `Wikipedia
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
Until it is properly packaged, you'll just need to copy the eav directory
|
You can install django-eav directly from guthub:
|
||||||
alongside your other django apps in your project directory. Then simply add
|
|
||||||
``eav`` to your INSTALLED_APPS, then run ``syncdb`` to create the tables.
|
pip install -e git+git://github.com/mvpdev/django-eav.git#egg=django-eav
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
=====
|
=====
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue