mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-03-17 06:50:24 +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.
|
||||
|
||||
|
||||
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
|
||||
-----
|
||||
|
||||
Edit settings.py
|
||||
~~~~~~~~~~~~~~~~
|
||||
Add ``eav`` to your INSTALLED_APPS in your settings.py file.
|
||||
|
||||
Register your model(s)
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
Before you can attach eav attributes to your model, you must register your
|
||||
|
|
@ -37,6 +50,9 @@ model with eav::
|
|||
>>> import eav
|
||||
>>> eav.register(MyModel)
|
||||
|
||||
Generally you would do this in your ``models.py`` immediate after your model
|
||||
declarations.
|
||||
|
||||
Create some attributes
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
::
|
||||
|
|
@ -71,17 +87,7 @@ Filter on eav values
|
|||
>>> 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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
--------------------------
|
||||
|
||||
`<http://mvpdev.github.com/django-eav>`_
|
||||
`<http://mvpdev.github.com/django-eav>`_
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ check `Wikipedia
|
|||
|
||||
Installation
|
||||
============
|
||||
Until it is properly packaged, you'll just need to copy the eav directory
|
||||
alongside your other django apps in your project directory. Then simply add
|
||||
``eav`` to your INSTALLED_APPS, then run ``syncdb`` to create the tables.
|
||||
You can install django-eav directly from guthub:
|
||||
|
||||
pip install -e git+git://github.com/mvpdev/django-eav.git#egg=django-eav
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
|
|
|||
Loading…
Reference in a new issue