From df16ed379d28d7ce53c92c19b500ef822e28fd5f Mon Sep 17 00:00:00 2001 From: David Gelvin Date: Wed, 29 Sep 2010 13:04:02 +0300 Subject: [PATCH] Updated install docs --- README.rst | 30 ++++++++++++++++++------------ docs/index.rst | 6 +++--- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/README.rst b/README.rst index e63a3f8..bbcce68 100644 --- a/README.rst +++ b/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~ +-------------------------- - ``_ +``_ diff --git a/docs/index.rst b/docs/index.rst index 973c184..34f251d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 =====