forked from ASKBOT/django-followit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (54 loc) · 2.12 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, find_packages
import sys
setup(
name = "django-followit",
version = '0.0.3',
description = 'A Django application that allows users to follow django model objects',
packages = find_packages(),
author = 'Evgeny.Fadeev',
author_email = '[email protected]',
license = 'BSD License',
keywords = 'follow, database, django',
url = 'https://github.com/ASKBOT/django-followit',
include_package_data = True,
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.4',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: JavaScript',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
long_description = """The ``followit`` django app allows to easily set up a
capability for the site users to follow various things on the site,
represented by django model objects.
Setup
========
To the INSTALLED_APPS in your ``settings.py`` add entry ``'followit'``.
Then, in your apps' ``models.py``, probably at the end of the file, add:
import followit
followit.register(Thing)
Once that is done, in your shell run:
python manage.py syncdb
Not it will be possible for the user to follow instances of ``SomeModel``.
If you decide to allow following another model, just add another
``followit.register(...)`` statement to the ``models.py`` and re-run the ``syncdb``.
Usage
============
Examples below show how to use ``followit`` (assuming that model ``Thing``
is registered with ``followit`` in your ``models.py``.
bob.follow_thing(x)
bob.unfollow_thing(x)
things = bob.get_followed_things()
x_followers = x.get_followers()
Note that ``followit`` does not yet provide view functions of url routing
relevant to following or unfollowing items, nor template tags.
"""
)