This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Installation

  1. pip install django-search-statistic
  2. Add search_statistic to settings.INSTALLED_APPS
  3. Add ‘search_statistic.middleware.CollectStatisticMiddleware’ to settings.MIDDLEWARE_CLASSES
  4. python manage.py migrate search_statistic

Usage

If you want specify content_type and object_pk (default only path is stored) you must add to your views: from search_statistic.utils.visits import visit_object

def some_view(request):

obj = SomeModel.objects.get(pk=pk)

visit_object(request, obj)

Settings

All settings stored in settings.SEARCH_STATISTIC. Default value is:

{

‘REDIS_CACHE_SIZE’: 1,

‘REDIS_PREFIX’: ‘django-search-statistic’,

‘REDIS_SETTINGS’: {

‘db’: 1

},

‘REMOVE_ON_STATUS’: [400, 403, 404, 405],

‘default_query_confirm’: False,

}

Options REDIS_* are using only where redis are installed. If REDIS_CACHE_SIZE <= 0 - search queries will storing in redis infinitely. If REDIS_CACHE_SIZE == 1 - redis isn’t using If REDIS_CACHE_SIZE >= 2 - search queries and visits are storing in cache, but after REDIS_CACHE_SIZE objects in cache they will be saved in DB

If response status code in REMOVE_ON_STATUS all visits with path == current request.path are deleteing.

Release History

Release History

0.0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-search-statistic-0.0.2.tar.gz (15.7 kB) Copy SHA256 Checksum SHA256 Source Oct 1, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting