Home redirect to all ammibo list

This commit is contained in:
Felipe Martín 2015-06-18 00:14:26 +02:00
parent 2596fe12a2
commit ac35ce2b97
1 changed files with 3 additions and 9 deletions

View File

@ -1,17 +1,11 @@
# coding: utf-8
# django
from django.shortcuts import render
from django.views.generic.base import View
# amiibo
from amiibofindr.apps.amiibo.models import Amiibo
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
class HomeView(View):
template = 'home/home.html'
def get(self, request):
return render(request, self.template, {
'amiibo_list': Amiibo.objects.all()
})
return redirect(reverse('amiibo:collection', args=['all']))