addons-server/mkt/home/views.py

16 строки
438 B
Python
Исходник Обычный вид История

2012-04-06 02:48:54 +04:00
import jingo
2012-04-11 12:29:56 +04:00
import waffle
2012-04-06 02:48:54 +04:00
2012-04-11 12:29:56 +04:00
from mkt.developers.views import home as devhub_home
2012-04-08 04:27:18 +04:00
from mkt.webapps.models import Webapp
2012-04-06 02:48:54 +04:00
2012-04-11 12:29:56 +04:00
2012-04-06 02:48:54 +04:00
def home(request):
"""The home page."""
2012-04-11 12:29:56 +04:00
if not waffle.switch_is_active('unleash-consumer'):
return devhub_home
2012-04-08 04:27:18 +04:00
featured = Webapp.objects.all()
popular = Webapp.objects.all()
2012-04-06 02:48:54 +04:00
return jingo.render(request, 'home/home.html', {'featured': featured,
2012-04-11 12:29:56 +04:00
'popular': popular})