Commits

Bruno Renié committed 330fd60

Removed the django-batch-select dep (Django 1.4's prefetch_related)

  • Participants
  • Parent commits b273365

Comments (0)

Files changed (2)

File dotim/gallery/models.py

 from django.db import models
 from django.utils.translation import ugettext_lazy as _
 
-from batch_select.models import BatchManager
-
 
 class Album(models.Model):
     name = models.CharField(_('Name'), max_length=255)
     date = models.DateTimeField(_('Date'))
     description = models.TextField(_('Description'))
 
-    objects = BatchManager()
-
     def __unicode__(self):
         return u'%s' % self.name
 

File dotim/gallery/views.py

 
 
 class Albums(generic.ListView):
-    queryset = Album.objects.batch_select('pictures')
+    queryset = Album.objects.prefetch_related('pictures')
 albums = Albums.as_view()