Permalink
Browse files

Improve doc, demo app. Closes #3.

Note the requirement for the request context processor. Update the demo
app. Bump the version.
  • Loading branch information...
1 parent 936b2d5 commit 3adc9b4a7e257c82057b4e9f06c7d50770722476 John Hensley committed Apr 26, 2012
Showing with 36 additions and 36 deletions.
  1. +1 −1 LICENSE.txt
  2. +5 −3 README.rst
  3. +2 −3 peavy/__init__.py
  4. +2 −1 peavy_demo/requirements.txt
  5. +9 −10 peavy_demo/settings.py
  6. +17 −18 setup.py
View
@@ -1,4 +1,4 @@
-Copyright (c) 2011 Fairview Computing LLC
+Copyright (c) 2011-2012 Fairview Computing LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
View
@@ -158,19 +158,21 @@ Configuration
5. Add ``peavy.middleware.RequestLoggingMiddleware`` to MIDDLEWARE_CLASSES.
-6. Run ``manage.py migrate`` to create the database tables, or if you're really
+6. Add ``django.core.context_processors.request`` to TEMPLATE_CONTEXT_PROCESSORS.
+
+7. Run ``manage.py migrate`` to create the database tables, or if you're really
logging to a second database and have disabled South migrations for peavy,
run ``manage.py syncdb``.
The last two steps can be skipped if you don't want the UI.
-7. If desired, add ``peavy.urls`` to your URL configuration to get the UI::
+8. If desired, add ``peavy.urls`` to your URL configuration to get the UI::
urlpatterns += patterns('',
(r'^peavy/', include('peavy.urls', namespace='peavy')),
)
-8. Run ``manage.py collectstatic`` to copy peavy's media into place.
+9. Run ``manage.py collectstatic`` to copy peavy's media into place.
Demo Application
----------------
View
@@ -1,9 +1,8 @@
"""
django-peavy makes it easy to collect and monitor Django application logging.
"""
-VERSION = (0, 8, 3)
+VERSION = (0, 8, 4)
+
def get_version():
return '.'.join((str(d) for d in VERSION))
-
-
@@ -1,2 +1,3 @@
django-peavy
-psycopg2==2.4.1 # 2.4.2 causes trouble with Django 1.3(.1) unit tests
+South==0.7.3
+psycopg2>=2.4.3
View
@@ -47,10 +47,10 @@
'format': '[%(asctime)s %(name)s %(levelname)s] %(message)s'
},
'basic': {
- 'format': '[%(asctime)s %(uuid)s %(user)s %(name)s %(levelname)s] %(message)s'
+ 'format': '[%(asctime)s %(uuid)s %(user_pk)s:%(username)s %(name)s %(levelname)s] %(message)s'
},
'meta': {
- 'format': '[%(asctime)s %(client_ip)s %(uuid)s %(user)s %(name)s %(levelname)s] %(message)s'
+ 'format': '[%(asctime)s %(client_ip)s %(uuid)s %(user_pk)s:%(username)s %(name)s %(levelname)s] %(message)s'
},
},
'filters': {
@@ -63,12 +63,12 @@
},
'handlers': {
'null': {
- 'level':'DEBUG',
- 'class':'django.utils.log.NullHandler',
+ 'level': 'DEBUG',
+ 'class': 'django.utils.log.NullHandler',
},
'console': {
- 'level':'DEBUG',
- 'class':'logging.StreamHandler',
+ 'level': 'DEBUG',
+ 'class': 'logging.StreamHandler',
'filters': ['basic', 'meta'],
'formatter': 'basic'
},
@@ -89,7 +89,7 @@
'django': {
'handlers': ['null'],
'propagate': True,
- 'level':'INFO',
+ 'level': 'INFO',
},
'django.request': {
'handlers': ['peavy', 'mail_admins'],
@@ -98,11 +98,11 @@
},
'peavy': {
'handlers': ['console', 'peavy'],
- 'level':'DEBUG',
+ 'level': 'DEBUG',
},
'peavy_demo': {
'handlers': ['console', 'peavy'],
- 'level':'DEBUG',
+ 'level': 'DEBUG',
},
}
}
@@ -133,4 +133,3 @@
TEMPLATE_DEBUG = True
TIME_ZONE = 'America/New_York'
USE_I18N = True
-
View
@@ -1,15 +1,14 @@
-import sys
-from setuptools import setup, find_packages
+from setuptools import setup
peavy = __import__('peavy')
with open('README.rst') as file:
long_description = file.read()
setup(
- author = 'Fairview Computing LLC',
- author_email = 'john@fairviewcomputing.com',
- classifiers = [
+ author='Fairview Computing LLC',
+ author_email='john@fairviewcomputing.com',
+ classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
@@ -19,35 +18,35 @@
'Programming Language :: Python',
'Topic :: System :: Logging',
],
- description = peavy.__doc__,
+ description=peavy.__doc__,
long_description=long_description,
download_url='http://github.com/fairview/django-peavy/downloads',
- install_requires = [
+ install_requires=[
'Django>=1.3',
- 'South>=0.7.2'
+ 'South>=0.7.3'
],
- license = "MIT License",
- name = 'django-peavy',
- packages = [
+ license="MIT License",
+ name='django-peavy',
+ packages=[
'peavy',
'peavy.migrations',
'peavy.templatetags',
],
- package_data = {
+ package_data={
'peavy': [
'README.rst',
'LICENSE.txt',
'templates/*/*.html',
'static/*/*/*',
],
},
- tests_require = [
+ tests_require=[
'Django>=1.3',
- 'South>=0.7.2',
- 'psycopg2==2.4.1', # 2.4.2 causes trouble with Django 1.3(.1) unit tests
+ 'South==0.7.3',
+ 'psycopg2>=2.4.3', # 2.4.2 causes trouble with Django 1.3(.1) unit tests
],
test_suite='tests.main',
- url = 'http://github.com/fairview/django-peavy',
- version = peavy.get_version(),
- zip_safe = True,
+ url='http://github.com/fairview/django-peavy',
+ version=peavy.get_version(),
+ zip_safe=True,
)

0 comments on commit 3adc9b4

Please sign in to comment.