`_ unless you are a paying MaxMind\ncustomer. This is the data file that ``django-tracking`` uses to translate an\nIP into a location on the planet. Configuring this feature is discussed later.\n\nInstallation\n============\n\nDownload ``codingsoho-tracking`` using *one* of the following methods:\n\npip\n---\n\nYou can download the package from the `CheeseShop\n`_ or use::\n\n pip install codingsoho-tracking\n\nto download and install ``codingsoho-tracking``.\n\neasy_install\n------------\n\nYou can download the package from the `CheeseShop `_ or use::\n\n easy_install codingsoho-tracking\n\nto download and install ``codingsoho-tracking``.\n\nCheckout from BitBucket/GitHub/Google Code\n------------------------------------------\n\nUse one of the following commands::\n\n hg clone http://bitbucket.org/hordechief/codingsoho-tracking\n git clone http://github.com/hordechief/codingsoho-tracking.git\n\nPackage Download\n================\n\nDownload the latest ``.tar.gz`` file from the downloads section and extract it\nsomewhere you'll remember.\n\nConfiguration\n=============\n\nFirst of all, you must add this project to your list of ``INSTALLED_APPS`` in\n``settings.py``::\n\n INSTALLED_APPS = (\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n ...\n 'tracking',\n ...\n )\n\nRun ``manage.py syncdb``. This creates a few tables in your database that are\nnecessary for operation.\n\nDepending on how you wish to use this application, you have a few options:\n\nVisitor Tracking\n----------------\n\nAdd ``tracking.middleware.VisitorTrackingMiddleware`` to your\n``MIDDLEWARE_CLASSES`` in ``settings.py``. It must be underneath the\n``AuthenticationMiddleware``, so that ``request.user`` exists.\n\nAutomatic Visitor Clean-Up\n++++++++++++++++++++++++++\n\nIf you want to have Django automatically clean past visitor information out\nyour database, put ``tracking.middleware.VisitorCleanUpMiddleware`` in your\n``MIDDLEWARE_CLASSES``.\n\nIP Banning\n----------\n\nAdd ``tracking.middleware.BannedIPMiddleware`` to your ``MIDDLEWARE_CLASSES``\nin ``settings.py``. I would recommend making this the very first item in\n``MIDDLEWARE_CLASSES`` so your banned users do not have to drill through any\nother middleware before Django realizes they don't belong on your site.\n\nVisitors on Page (template tag)\n-------------------------------\n\nMake sure that ``django.core.context_processors.request`` is somewhere in your\n``TEMPLATE_CONTEXT_PROCESSORS`` tuple. This context processor makes the\n``request`` object accessible to your templates. This application uses the\n``request`` object to determine what page the user is looking at in a template\ntag.\n\nActive Visitors Map\n===================\n\nIf you're interested in seeing where your visitors are at a given point in\ntime, you might enjoy the active visitor map feature. Be sure you have added a\nline to your main URLconf, as follows::\n\n from django.conf.urls.defaults import *\n\n urlpatterns = patterns('',\n ....\n (r'^tracking/', include('tracking.urls')),\n ....\n )\n\nNext, set a couple of settings in your ``settings.py``:\n\n* ``GOOGLE_MAPS_KEY``: Your very own Google Maps API key\n* ``TRACKING_USE_GEOIP``: set this to ``True`` if you want to see markers on\n the map\n* ``GEOIP_PATH``: set this to the absolute path on the filesystem of your\n ``GeoIP.dat`` or ``GeoIPCity.dat`` or whatever file. It's usually something\n like ``/usr/local/share/GeoIP.dat`` or ``/usr/share/GeoIP/GeoIP.dat``.\n* ``GEOIP_CACHE_TYPE``: The type of caching to use when dealing with GeoIP data:\n\n * ``0``: read database from filesystem, uses least memory.\n * ``1``: load database into memory, faster performance but uses more\n memory.\n * ``2``: check for updated database. If database has been updated, reload\n filehandle and/or memory cache.\n * ``4``: just cache the most frequently accessed index portion of the\n database, resulting in faster lookups than ``GEOIP_STANDARD``, but less\n memory usage than ``GEOIP_MEMORY_CACHE`` - useful for larger databases\n such as GeoIP Organization and GeoIP City. Note, for GeoIP Country,\n Region and Netspeed databases, ``GEOIP_INDEX_CACHE`` is equivalent to\n ``GEOIP_MEMORY_CACHE``. *default*\n\n* ``DEFAULT_TRACKING_TEMPLATE``: The template to use when generating the\n visitor map. Defaults to ``tracking/visitor_map.html``.\n\nWhen that's done, you should be able to go to ``/tracking/map/`` on your site\n(replacing ``tracking`` with whatever prefix you chose to use in your URLconf,\nobviously). The default template relies upon jQuery for its awesomeness, but\nyou're free to use whatever you would like.\n\nUsage\n=====\n\nTo display the number of active users there are in one of your templates, make\nsure you have ``{% load tracking_tags %}`` somewhere in your template and do\nsomething like this::\n\n {% visitors_on_site as visitors %}\n \n {{ visitors }} active user{{ visitors|pluralize }}\n
\n\nIf you also want to show how many people are looking at the same page::\n\n {% visitors_on_page as same_page %}\n \n {{ same_page }} of {{ visitors }} active user{{ visitors|pluralize }}\n {% ifequal same_page 1 %}is{% else %}are{% endifequal %} reading this page\n
\n\nIf you don't want particular areas of your site to be tracked, you may define a\nlist of prefixes in your ``settings.py`` using the ``NO_TRACKING_PREFIXES``. For\nexample, if you didn't want visits to the ``/family/`` section of your website,\nset ``NO_TRACKING_PREFIXES`` to ``['/family/']``.\n\nIf you don't want to count certain user-agents, such as Yahoo!'s Slurp and\nGoogle's Googlebot, you may add keywords to your visitor tracking in your\nDjango administration interface. Look for \"Untracked User-Agents\" and add a\nkeyword that distinguishes a particular user-agent. Any visitors with the\nkeyword in their user-agent string will not be tracked.\n\nBy default, active users include any visitors within the last 10 minutes. If\nyou would like to override that setting, just set ``TRACKING_TIMEOUT`` to however\nmany minutes you want in your ``settings.py``.\n\nFor automatic visitor clean-up, any records older than 24 hours are removed by\ndefault. If you would like to override that setting, set\n``TRACKING_CLEANUP_TIMEOUT`` to however many hours you want in your\n``settings.py``.",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/hordechief/codingsoho-tracking/",
"keywords": "django,tracking,visitors",
"license": "MIT License",
"maintainer": "Horde Chief",
"maintainer_email": "hordechief@qq.com",
"name": "codingsoho-tracking",
"package_url": "https://pypi.org/project/codingsoho-tracking/",
"platform": "",
"project_url": "https://pypi.org/project/codingsoho-tracking/",
"project_urls": {
"Homepage": "http://github.com/hordechief/codingsoho-tracking/"
},
"release_url": "https://pypi.org/project/codingsoho-tracking/0.4.3/",
"requires_dist": null,
"requires_python": "",
"summary": "Basic visitor tracking and blacklisting for Django",
"version": "0.4.3"
},
"last_serial": 4327459,
"releases": {
"0.4.1": [
{
"comment_text": "",
"digests": {
"md5": "28550f8dc2c2750237ee7e77bed949bc",
"sha256": "dbd296a26f00e8353178787e49952bb883f08859b922a719de508ed3bf97cf41"
},
"downloads": -1,
"filename": "codingsoho-tracking-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "28550f8dc2c2750237ee7e77bed949bc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 1916056,
"upload_time": "2018-10-01T08:13:44",
"url": "https://files.pythonhosted.org/packages/9b/c9/005e1581b823dc8f2da4ee08153bf5c422a79b3bb9b2bc09d2a79806c390/codingsoho-tracking-0.4.1.tar.gz"
}
],
"0.4.2": [
{
"comment_text": "",
"digests": {
"md5": "9d69aef7273ea485af022a0eded8fb05",
"sha256": "98d61b2d4e0f013d4d0f15b2164a4879a7d49e27235d17b59541a05d901d4cdf"
},
"downloads": -1,
"filename": "codingsoho-tracking-0.4.2.tar.gz",
"has_sig": false,
"md5_digest": "9d69aef7273ea485af022a0eded8fb05",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 1916097,
"upload_time": "2018-10-01T09:51:24",
"url": "https://files.pythonhosted.org/packages/b3/4b/fb1d9945ae2c6b3c3eb555bb8275ef92d33c20fc5210bd078b020bc38678/codingsoho-tracking-0.4.2.tar.gz"
}
],
"0.4.3": [
{
"comment_text": "",
"digests": {
"md5": "69d1505f501492e5353e11e89ddf1585",
"sha256": "fe1f77bd74341fb9d5c6bedb5b4c76e92b06a29bb00ca47ab60af507f8eda6f1"
},
"downloads": -1,
"filename": "codingsoho-tracking-0.4.3.tar.gz",
"has_sig": false,
"md5_digest": "69d1505f501492e5353e11e89ddf1585",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 1916107,
"upload_time": "2018-10-01T10:00:19",
"url": "https://files.pythonhosted.org/packages/24/58/87d9149fc5f56886328ea9bcfc56eb65ce8075abfb5484aa0a1d82d9a320/codingsoho-tracking-0.4.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "69d1505f501492e5353e11e89ddf1585",
"sha256": "fe1f77bd74341fb9d5c6bedb5b4c76e92b06a29bb00ca47ab60af507f8eda6f1"
},
"downloads": -1,
"filename": "codingsoho-tracking-0.4.3.tar.gz",
"has_sig": false,
"md5_digest": "69d1505f501492e5353e11e89ddf1585",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 1916107,
"upload_time": "2018-10-01T10:00:19",
"url": "https://files.pythonhosted.org/packages/24/58/87d9149fc5f56886328ea9bcfc56eb65ce8075abfb5484aa0a1d82d9a320/codingsoho-tracking-0.4.3.tar.gz"
}
]
}