Updated install docs

This commit is contained in:
David Gelvin 2010-09-29 13:04:02 +03:00
parent 3c1d3c9de3
commit df16ed379d
2 changed files with 21 additions and 15 deletions

View file

@ -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>`_

View file

@ -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
=====