All Projects → zhebrak → Django Statsy

zhebrak / Django Statsy

Licence: mit
Statistics for your Django project

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Statsy

Hsreplay.net
🔶 Unleash your Potential!
Stars: ✭ 132 (+106.25%)
Mutual labels:  statistics, django
Webterminal
ssh rdp vnc telnet sftp bastion/jump web putty xshell terminal jumpserver audit realtime monitor rz/sz 堡垒机 云桌面 linux devops sftp websocket file management rz/sz otp 自动化运维 审计 录像 文件管理 sftp上传 实时监控 录像回放 网页版rz/sz上传下载/动态口令 django
Stars: ✭ 1,124 (+1656.25%)
Mutual labels:  django
Matlabstan
Matlab interface to Stan, a package for Bayesian inference
Stars: ✭ 59 (-7.81%)
Mutual labels:  statistics
Djaoapp
User login, billing, access control as part of a session proxy
Stars: ✭ 61 (-4.69%)
Mutual labels:  django
Data Science Best Resources
Carefully curated resource links for data science in one place
Stars: ✭ 1,104 (+1625%)
Mutual labels:  statistics
Lagom
📦 Autowiring dependency injection container for python 3
Stars: ✭ 61 (-4.69%)
Mutual labels:  django
Django minio
Django app to use Minio Server as file storage.
Stars: ✭ 59 (-7.81%)
Mutual labels:  django
Mrdoc
online document system developed based on python. It is suitable for individuals and small teams to manage documents, wiki, knowledge and notes. like gitbook.
Stars: ✭ 1,129 (+1664.06%)
Mutual labels:  django
Best Of Web Python
🏆 A ranked list of awesome python libraries for web development. Updated weekly.
Stars: ✭ 1,118 (+1646.88%)
Mutual labels:  django
Django Chinese Docs 18
📖 [译] django 中文文档协作翻译计划
Stars: ✭ 61 (-4.69%)
Mutual labels:  django
Openmx
Repository for the OpenMx Structural Equation Modeling package
Stars: ✭ 60 (-6.25%)
Mutual labels:  statistics
Django Auth Tutorial Example
Django Authentication Video Tutorial
Stars: ✭ 60 (-6.25%)
Mutual labels:  django
Django React
This a simple Django and React demo application
Stars: ✭ 63 (-1.56%)
Mutual labels:  django
Stream Statistics
streaming statistical calculations for node
Stars: ✭ 59 (-7.81%)
Mutual labels:  statistics
Sapl
Sistema de Apoio ao Processo Legislativo
Stars: ✭ 63 (-1.56%)
Mutual labels:  django
Nsloger
A forum based on Django
Stars: ✭ 59 (-7.81%)
Mutual labels:  django
Django Anymail
Django email backends and webhooks for Amazon SES, Mailgun, Mailjet, Postmark, SendGrid, Sendinblue, SparkPost and more
Stars: ✭ 1,109 (+1632.81%)
Mutual labels:  django
Django Taggit Labels
Clickable label widget for django-taggit
Stars: ✭ 62 (-3.12%)
Mutual labels:  django
Django Qsessions
Extended session backends for Django (Sessions store IP, User Agent, and foreign key to User)
Stars: ✭ 64 (+0%)
Mutual labels:  django
Taggit Selectize
Auto-complete/auto-suggestion for django-taggit (django-taggit + selectize.js)
Stars: ✭ 63 (-1.56%)
Mutual labels:  django

Django Statsy

Build Status PyPI version

Statsy is an application for collecting and displaying statistics in your Django project.

Basic Usage

View decorator:

@statsy.watch
def index(request):
    ...
@statsy.watch(group='index', event='page_view')
def index(request):
    ...

Inside the view:

def like(request):
  statsy.send(
    group='post', event='like', user=request.user,
    value=17, content_object=post
  )
  ...

CBV Mixin:

class AboutView(WatchMixin, TemplateView):
    template_name = 'example/about.html'

    watch_group = 'info'
    watch_event = 'page_view'
    ...

From the template:

{% load statsy %}

{% statsy %}

...

var statsy = new Statsy()

statsy.send({
  'group': 'post',
  'event': 'subscription'
});

Installation

pip install django-statsy
# settings.py

INSTALLED_APPS = (
  ...

  'statsy',
)

If you want to display collected statistics you will also have to add Statsy's URLs to your project's URLs.

# urls.py
  ...

  url(r'^stats/', include('statsy.urls')),
  ...

Dashboard

Default out of the box graphs.

group_overview

Configuration

There are some settings you may want to change (default values are specified).

# settings.py

# By default Statsy caches lookups for a group and event
STATSY_CACHE_TIMEOUT = 60 * 15  # in seconds

# Statsy can work in async mode with Celery up and running
STATSY_ASYNC = False

# Full path to Celery application instance (e.g. 'example.celery_app.app')
CELERY_APP = None

# Permission to view stats pages
STATSY_VIEW_PERMISSION = 'statsy.stats_view'

Collect Options

All are optional.

# categorizing options
'group'
'event'

# some additional info about the stats object
'label'

# user associated with the action
# collected by default in @watch
'user'

# object of the action
'content_object'

# value can be <int>, <float> or <str>/<unicode>/etc.
'value'

# where did it happen
# collected by default in @watch
'url'

# how long did it take <int>
# collected by default in @watch
'duration'

# JSON for an extra data
'extra'

Extending

If you want to add your custom stats page to Statsy you'll have to register it manually in "stats.py".

# stats.py
import statsy

def some_awesome_stats(request):
    return render_to_response('app/awesome_stats.html')

statsy.site.register(some_awesome_stats)

You can also specify a category, a name or a permission

statsy.site.register(
    some_awesome_stats,
    category='Awesome stats',
    name='Most awesome',
    permission='user.view_awesome_stats'
)

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].