slice at 6 popular apps
This commit is contained in:
Родитель
a24e516199
Коммит
3ca675188b
|
@ -10,7 +10,7 @@
|
|||
<a href="{{ product.get_url_path() }}">
|
||||
{# TODO: Replace previews with promo graphics (bug 744648). #}
|
||||
{% set previews = product.previews %}
|
||||
{% if preview %}
|
||||
{% if previews.exists() %}
|
||||
{% set preview = previews.order_by('-created')[0].image_url if feature else
|
||||
previews.order_by('-created')[0].thumbnail_url %}
|
||||
{% endif %}
|
||||
|
|
|
@ -3,7 +3,6 @@ import jingo
|
|||
from django.shortcuts import get_object_or_404, redirect
|
||||
|
||||
import amo
|
||||
from amo.utils import paginate
|
||||
from addons.models import Category
|
||||
|
||||
from mkt.search.views import _app_search
|
||||
|
@ -24,7 +23,7 @@ def _landing(request, category=None):
|
|||
return jingo.render(request, 'browse/landing.html', {
|
||||
'category': category,
|
||||
'featured': featured[:6],
|
||||
'popular': paginate(request, popular, count=6)
|
||||
'popular': popular[:6]
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import jingo
|
||||
import waffle
|
||||
|
||||
from amo.utils import paginate
|
||||
|
||||
from mkt.developers.views import home as devhub_home
|
||||
from mkt.webapps.models import Webapp
|
||||
|
||||
|
@ -12,7 +10,7 @@ def home(request):
|
|||
if not waffle.switch_is_active('unleash-consumer'):
|
||||
return devhub_home
|
||||
featured = Webapp.featured('home')[:6]
|
||||
popular = paginate(request, Webapp.popular(), count=6)
|
||||
popular = Webapp.popular()[:6]
|
||||
return jingo.render(request, 'home/home.html', {
|
||||
'featured': featured,
|
||||
'popular': popular
|
||||
|
|
Загрузка…
Ссылка в новой задаче