Skip to content

Commit

Permalink
Rename to pinax-webanalytics and updated to latest standards
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Feb 23, 2016
1 parent d35f314 commit fed0153
Show file tree
Hide file tree
Showing 41 changed files with 296 additions and 508 deletions.
7 changes: 5 additions & 2 deletions .coveragerc
@@ -1,4 +1,7 @@
[run]
source = metron
omit = metron/tests/*
source = pinax
omit = pinax/webanalytics/tests/*,pinax/webanalytics/admin.py
branch = 1

[report]
omit = pinax/webanalytics/tests/*,pinax/webanalytics/admin.py
14 changes: 9 additions & 5 deletions .gitignore
@@ -1,7 +1,11 @@
*.pyc
docs/_build/
.tox
.coverage
*.egg
build
dist
.coverage
.tox
.idea
MANIFEST
*.pyc
*.egg-info
*.egg
docs/_build/
htmlcov/
17 changes: 9 additions & 8 deletions .travis.yml
@@ -1,22 +1,23 @@
sudo: false
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
env:
- DJANGO=1.6
- DJANGO=1.7
- DJANGO=1.8
- DJANGO=1.9
- DJANGO=master
matrix:
exclude:
- python: "2.6"
env: DJANGO=1.7
- python: "2.6"
- python: "3.3"
env: DJANGO=1.9
- python: "3.3"
env: DJANGO=master
- python: "3.4"
env: DJANGO=1.6
- python: "3.5"
env: DJANGO=1.7
install:
- pip install tox coveralls
script:
Expand Down
36 changes: 18 additions & 18 deletions CONTRIBUTING.md
Expand Up @@ -45,16 +45,16 @@ a message that will link the commit message to the issue and auto-close it
if appropriate.

Add ability to travel back in time

You need to be driving 88 miles per hour to generate 1.21 gigawatts of
power to properly use this feature.

Fixes #88


## Coding style

When writing code to be included in django-user-accounts keep our style in mind:
When writing code to be included in pinax-webanalytics keep our style in mind:

* Follow [PEP8](http://www.python.org/dev/peps/pep-0008/) there are some
cases where we do not follow PEP8. It is an excellent starting point.
Expand Down Expand Up @@ -85,51 +85,51 @@ Here is an example of these rules applied:
# first set of imports are stdlib imports
# non-from imports go first then from style import in their own group
import csv

# second set of imports are Django imports with contrib in their own
# group.
from django.core.urlresolvers import reverse
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _

from django.contrib.auth.models import User

# third set of imports are external apps (if applicable)
from tagging.fields import TagField

# fourth set of imports are local apps
from .fields import MarkupField


class Task(models.Model):
"""
A model for storing a task.
"""

creator = models.ForeignKey(User)
created = models.DateTimeField(default=timezone.now)
modified = models.DateTimeField(default=timezone.now)

objects = models.Manager()

class Meta:
verbose_name = _("task")
verbose_name_plural = _("tasks")

def __unicode__(self):
return self.summary

def save(self, **kwargs):
self.modified = datetime.now()
super(Task, self).save(**kwargs)

def get_absolute_url(self):
return reverse("task_detail", kwargs={"task_id": self.pk})

# custom methods


class TaskComment(models.Model):
# ... you get the point ...
pass
Expand Down
4 changes: 1 addition & 3 deletions LICENSE
@@ -1,6 +1,4 @@
# The MIT License (MIT)
#
# Copyright (c) 2014 James Tauber and contributors
# Copyright (c) 2012-2016 James Tauber and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
@@ -1,2 +1,5 @@
include AUTHORS
include LICENSE
include README.rst
recursive-include metron/templates *.html
recursive-include pinax/webanalytics/static *
recursive-include pinax/webanalytics/templates *
15 changes: 15 additions & 0 deletions Makefile
@@ -0,0 +1,15 @@
all: init docs test

init:
python setup.py develop
pip install detox coverage mkdocs

test:
coverage erase
detox
coverage html

docs:
mkdocs build

.PHONY: docs
130 changes: 0 additions & 130 deletions docs/Makefile

This file was deleted.

34 changes: 18 additions & 16 deletions docs/changelog.rst → docs/changelog.md
@@ -1,40 +1,42 @@
.. _changelog:
# ChangeLog

ChangeLog
=========
## 2.0

1.3
---
- renamed to `pinax-webanalytics`

### BI

- template fragments now reside in `pinax/webanalytics/`
- settings prefixes changed from `METRON_` to `PINAX_WEBANALYTICS_`
- `request.metron_site_id` changed to `request.pwa_site_id`, but still defaults to `settings.SITE_ID` if not on `request` object
- the session key name now defaults to `_pwa_activity` instead of `_metron_activity`

## 1.3

- site ID keys in METRON_SETTINGS can reference the value stored in
``request.metron_site_id`` (useful for multi-tenancy setups)

1.2
---
## 1.2

- Upgraded mixpanel


1.1
---
## 1.1

- ``SITE_ID`` is now always treated as an int on lookup so the keys in
``METRON_SETTINGS`` must be ints
- analytics template tag now bails out silently if ``user`` or ``request`` are
missing from context

1.0
---

## 1.0

- same as 0.2

0.2
---
## 0.2

- added activity tracking
- added adwords conversion tracking (per page template tag)

0.1
---
## 0.1

- initial release
23 changes: 0 additions & 23 deletions docs/conf.py

This file was deleted.

7 changes: 7 additions & 0 deletions docs/index.md
@@ -0,0 +1,7 @@
# pinax-webanalytics

Provides a site with analytics and metrics integration.

## Development

The source repository can be found at https://github.com/pinax/pinax-webanalytics

0 comments on commit fed0153

Please sign in to comment.