Commits

Ivan Zakrevsky committed 1bf97ff

native manager, improved admin

  • Participants
  • Parent commits 2b4c46a

Comments (0)

Files changed (2)

File imaging/admin.py

 
 class ImageAdmin(admin.ModelAdmin):
     exclude = ['ordering', 'content_type', 'object_id']
-    list_display = ('name', 'title')
+    list_display = ('id', 'name', 'title', 'content_type', 'object_id', 'content_object', )
     
     def has_change_permission(self, request, obj=None):
         opts = self.opts

File imaging/models.py

 from django.conf import settings
-from django.contrib.contenttypes.models import ContentType, ContentTypeManager
+from django.contrib.contenttypes.models import ContentType
 from django.contrib.contenttypes import generic
 from django.db import models
 
     object_id = models.PositiveIntegerField(null=True, blank=True)
     content_object = generic.GenericForeignKey('content_type', 'object_id')
 
-    objects = ContentTypeManager()
-
     class Meta:
         ordering = ('ordering', 'name')
         permissions = (