django-followit


Namedjango-followit JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://github.com/ASKBOT/django-followit
SummaryA Django application that allows users to follow django model objects
upload_time2023-07-17 19:45:30
maintainer
docs_urlNone
authorEvgeny.Fadeev
requires_python
licenseBSD License
keywords follow database django
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            The ``followit`` django app allows for the site users
to follow various instances of Django models,
represented by django model ``followit.models.FollowRecord`` 
using the ``django.contrib.models.ContentTypes`` system.

Release Notes
=============

The list below shows compatibility of `django-followit` with versions of Django and Python.
Python version compatibility was thoroughly tested only with release `0.4.0`::

  * ``0.6.x`` supports Django 1.10 to 4.x
  * ``0.5.x`` supports Django versions 1.10 up to 3.2
  * ``0.4.x`` Django 1.7(**) - 1.9. Python 2 and 3.
  * ``0.3.x`` - Django 1.9 - 1.11
  * ``0.2.x`` - Django 1.8
  * ``0.1.x`` - Django 1.7
  * ``0.0.9`` can be used for the earlier versions

(**) versions ``0.4.x`` do not support Django 1.7 with Python 3.

Setup
=====

To the INSTALLED_APPS in your ``settings.py`` add entry ``'followit'``.

Run `python manage.py migrate followit`

Then, in the body of `AppConfig.ready` method, add::

    import followit
    followit.register(Thing)

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.

Usage
=====

Examples below show how to use ``followit``::

    bob.follow_thing(x)
    bob.unfollow_thing(x)
    things = bob.get_followed_things()
    x_followers = x.get_followers()

To follow/unfollow items via the HTTTP, make AJAX post requests at urls,
available urls ``followit/urls.py``::

    /follow/<model_name>/<item_id>/
    {% url follow_object "somemodel" item_id %} #model name lower case

    /unfollow/<model_name>/<item_id>/
    {% url unfollow_object "somemodel" item_id %} #lower case model name

    /toggle-follow/<model_name>/<item_id>/
    {% url toggle_follow_object "somemodel" item_id %} #lower case model name

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ASKBOT/django-followit",
    "name": "django-followit",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "follow,database,django",
    "author": "Evgeny.Fadeev",
    "author_email": "evgeny.fadeev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b6/d2/a3cad6a9d9d1518950646066fee4132117992655e9b9b35ac13f4d46293b/django-followit-0.6.0.tar.gz",
    "platform": null,
    "description": "The ``followit`` django app allows for the site users\nto follow various instances of Django models,\nrepresented by django model ``followit.models.FollowRecord`` \nusing the ``django.contrib.models.ContentTypes`` system.\n\nRelease Notes\n=============\n\nThe list below shows compatibility of `django-followit` with versions of Django and Python.\nPython version compatibility was thoroughly tested only with release `0.4.0`::\n\n  * ``0.6.x`` supports Django 1.10 to 4.x\n  * ``0.5.x`` supports Django versions 1.10 up to 3.2\n  * ``0.4.x`` Django 1.7(**) - 1.9. Python 2 and 3.\n  * ``0.3.x`` - Django 1.9 - 1.11\n  * ``0.2.x`` - Django 1.8\n  * ``0.1.x`` - Django 1.7\n  * ``0.0.9`` can be used for the earlier versions\n\n(**) versions ``0.4.x`` do not support Django 1.7 with Python 3.\n\nSetup\n=====\n\nTo the INSTALLED_APPS in your ``settings.py`` add entry ``'followit'``.\n\nRun `python manage.py migrate followit`\n\nThen, in the body of `AppConfig.ready` method, add::\n\n    import followit\n    followit.register(Thing)\n\nNot it will be possible for the user to follow instances of ``SomeModel``.\n\nIf you decide to allow following another model, just add another\n``followit.register(...)`` statement.\n\nUsage\n=====\n\nExamples below show how to use ``followit``::\n\n    bob.follow_thing(x)\n    bob.unfollow_thing(x)\n    things = bob.get_followed_things()\n    x_followers = x.get_followers()\n\nTo follow/unfollow items via the HTTTP, make AJAX post requests at urls,\navailable urls ``followit/urls.py``::\n\n    /follow/<model_name>/<item_id>/\n    {% url follow_object \"somemodel\" item_id %} #model name lower case\n\n    /unfollow/<model_name>/<item_id>/\n    {% url unfollow_object \"somemodel\" item_id %} #lower case model name\n\n    /toggle-follow/<model_name>/<item_id>/\n    {% url toggle_follow_object \"somemodel\" item_id %} #lower case model name\n",
    "bugtrack_url": null,
    "license": "BSD License",
    "summary": "A Django application that allows users to follow django model objects",
    "version": "0.6.0",
    "project_urls": {
        "Homepage": "https://github.com/ASKBOT/django-followit"
    },
    "split_keywords": [
        "follow",
        "database",
        "django"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6d2a3cad6a9d9d1518950646066fee4132117992655e9b9b35ac13f4d46293b",
                "md5": "eea54c078f830b7645d439655ad22102",
                "sha256": "07a9ba15c85f5545c4da48bc63f74314a10265fdd3b123c990422d82bb8d5280"
            },
            "downloads": -1,
            "filename": "django-followit-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "eea54c078f830b7645d439655ad22102",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13163,
            "upload_time": "2023-07-17T19:45:30",
            "upload_time_iso_8601": "2023-07-17T19:45:30.975743Z",
            "url": "https://files.pythonhosted.org/packages/b6/d2/a3cad6a9d9d1518950646066fee4132117992655e9b9b35ac13f4d46293b/django-followit-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-17 19:45:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ASKBOT",
    "github_project": "django-followit",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "django-followit"
}
        
Elapsed time: 0.09828s