Rename 'AuditLog' to 'Auditlog' in class names

This commit is contained in:
Jan-Jelle Kester 2013-11-07 17:02:31 +01:00
parent 8f399a6a60
commit bd61008bd7
4 changed files with 10 additions and 10 deletions

View file

@ -4,7 +4,7 @@ from django.utils.functional import curry
from auditlog.models import LogEntry
class AuditLogMiddleware(object):
class AuditlogMiddleware(object):
"""
Middleware to couple the request's user to log items. This is accomplished by currying the signal receiver with the
user from the request (or None if the user is not authenticated).

View file

@ -48,7 +48,7 @@ class LogEntry(models.Model):
primary key, as well as the textual representation of the object when it was saved. It holds the action performed
and the fields that were changed in the transaction.
If AuditLogMiddleware is used, the actor will be set automatically. Keep in mind that editing / re-saving LogEntry
If AuditlogMiddleware is used, the actor will be set automatically. Keep in mind that editing / re-saving LogEntry
instances may set the actor to a wrong value - editing LogEntry instances is not recommended (and it should not be
necessary).
"""
@ -94,7 +94,7 @@ class LogEntry(models.Model):
return fstring.format(repr=self.object_repr)
class AuditLogHistoryField(generic.GenericRelation):
class AuditlogHistoryField(generic.GenericRelation):
"""
A subclass of django.contrib.contenttypes.generic.GenericRelation that sets some default variables. This makes it
easier to implement the audit log in models, and makes future changes easier.
@ -113,4 +113,4 @@ class AuditLogHistoryField(generic.GenericRelation):
kwargs['object_id_field'] = 'object_pk'
kwargs['content_type_field'] = 'content_type'
super(AuditLogHistoryField, self).__init__(**kwargs)
super(AuditlogHistoryField, self).__init__(**kwargs)

View file

@ -23,7 +23,7 @@ TEMPLATE_LOADERS = (
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'auditlog.middleware.AuditLogMiddleware',
'auditlog.middleware.AuditlogMiddleware',
)
ROOT_URLCONF = 'test_project.urls'

View file

@ -1,5 +1,5 @@
from django.db import models
from auditlog.models import AuditLogHistoryField
from auditlog.models import AuditlogHistoryField
from auditlog.registry import auditlog
@ -13,7 +13,7 @@ class SimpleModel(models.Model):
integer = models.IntegerField(blank=True, null=True)
datetime = models.DateTimeField(auto_now=True)
history = AuditLogHistoryField()
history = AuditlogHistoryField()
class AltPrimaryKeyModel(models.Model):
@ -28,7 +28,7 @@ class AltPrimaryKeyModel(models.Model):
integer = models.IntegerField(blank=True, null=True)
datetime = models.DateTimeField(auto_now=True)
history = AuditLogHistoryField(pk_indexable=False)
history = AuditlogHistoryField(pk_indexable=False)
class ProxyModel(SimpleModel):
@ -47,7 +47,7 @@ class RelatedModel(models.Model):
related = models.ForeignKey('self')
history = AuditLogHistoryField()
history = AuditlogHistoryField()
class ManyRelatedModel(models.Model):
@ -57,7 +57,7 @@ class ManyRelatedModel(models.Model):
related = models.ManyToManyField('self')
history = AuditLogHistoryField()
history = AuditlogHistoryField()
auditlog.register(SimpleModel)