Skip to content

Commit

Permalink
Switched debug ON. Added created/modified fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Lobunets committed Feb 5, 2013
1 parent 7cbc388 commit f0139ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/reimagine/core/admin.py
Expand Up @@ -62,7 +62,7 @@ class CoreUserAdmin(UserAdmin):
form = UserChangeForm

# The fields to be used in displaying the User model.
list_display = ('email', 'is_staff', 'screen_name')
list_display = ('email', 'is_staff', 'screen_name', 'created', 'modified')
list_filter = ('is_staff', 'is_superuser', 'is_active', 'groups')
search_fields = ('email', 'screen_name')
ordering = ('email',)
Expand All @@ -72,7 +72,7 @@ class CoreUserAdmin(UserAdmin):
('Personal Info', {'fields': ('screen_name',)}),
('Permissions', {'fields': ('is_active', 'is_staff', 'is_superuser',
'groups', 'user_permissions',)}),
('Important dates', {'fields': ('last_login',)}),
('Important dates', {'fields': ('last_login', )}),
)
add_fieldsets = (
(None, {
Expand Down
6 changes: 6 additions & 0 deletions src/reimagine/core/models.py
@@ -1,9 +1,12 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _

from django.contrib.auth.models import (
BaseUserManager, AbstractBaseUser, PermissionsMixin
)

from model_utils import fields


class UserManager(BaseUserManager):
def create_user(self, email, screen_name, password=None):
Expand Down Expand Up @@ -58,6 +61,9 @@ class User(AbstractBaseUser, PermissionsMixin):
is_admin = models.BooleanField(default=False)
is_staff = models.BooleanField(default=False)

created = fields.AutoCreatedField(_('created'))
modified = fields.AutoLastModifiedField(_('modified'))

objects = UserManager()

def get_full_name(self):
Expand Down
2 changes: 1 addition & 1 deletion templates/django/settings_local.py.in
Expand Up @@ -3,7 +3,7 @@ This is an AUTOMATICALLY GENERATED file.
!!! DO NOT EDIT MANUALLY !!!
"""

DEBUG = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG

DATABASES = {
Expand Down

0 comments on commit f0139ca

Please sign in to comment.