diff --git a/.gitignore b/.gitignore index d96dc44c..eb203acb 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,8 @@ pushreg pbackup mcmd.py +pip-log.txt +build ppreadme.py ppdocs.py README.html diff --git a/AUTHORS b/AUTHORS index 613e1772..28d1c38a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ -django_polymorphic was initially created by Bert Constantin in 2009/2010. +django_polymorphic was created by Bert Constantin in 2009/2010. + +setup.py contributed by Andrew Ingram -If you contributed code, test cases etc., your name should -appear here as well. diff --git a/DOCS.rst b/DOCS.rst index 56cc5e9e..69db073c 100644 --- a/DOCS.rst +++ b/DOCS.rst @@ -27,19 +27,22 @@ to your liking, then run:: ./manage syncdb # db is created in /var/tmp/... (settings.py) ./manage pcmd -Using polymorphic models in your own projects ---------------------------------------------- +Installation +------------ -The easiest way for now is to just copy the ``polymorphic`` directory -(under ``django_polymorphic``) into your Django project dir. +In the directory "django_polymorphic", execute ``sudo python setup.py install``. + +Alternatively you can simply copy the ``polymorphic`` directory +(under "django_polymorphic") into your Django project dir. If you want to use the management command ``polymorphic_dumpdata``, then -you need to add ``polymorphic`` to your INSTALLED_APPS setting as well. +you need to add ``polymorphic`` to your INSTALLED_APPS setting. -In any case, the ContentType framework (``django.contrib.contenttypes``) +In any case, Django's ContentType framework (``django.contrib.contenttypes``) needs to be listed in INSTALLED_APPS (usually it already is). + Defining Polymorphic Models =========================== diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..3532b80f --- /dev/null +++ b/setup.py @@ -0,0 +1,11 @@ +from distutils.core import setup + +setup( + name = 'django_polymorphic', + version = '0.2', + description = 'Seamless Polymorphic Inheritance for Django Models', + author = 'Bert Constantin', + author_email = 'bert.constantin@gmx.de', + url = 'http://bserve.webhop.org/wiki/django_polymorphic', + packages = [ 'polymorphic' ], +)