Commits

marinho committed a324f0e

Fixing admin to support agnostic model class

Comments (0)

Files changed (2)

diario/__init__.py

 Blog application for Django projects.
 """
 
-VERSION = (0, 3, 3, 'kamalmaz')
+VERSION = (0, 3, 4, 'kamalmaz')
 
 def get_version():
     """
         affects the entries shown in the list view.
         """
         if request.user.is_superuser:
-            return Entry.objects.all()
-        return Entry.objects.filter(author=request.user)
+            return self.model.objects.all()
+        return self.model.objects.filter(author=request.user)
 
     def save_model(self, request, obj, form, change):
         """