@check_simple_wiki_locale
@mobile_template('products/{mobile/}product.html')
def product_landing(request, template, slug):
 product = get_object_or_404(Product, slug=slug)
 if request.is_ajax():
  topic_list = list()
  for t in Topic.objects.filter(product=product, visible=True):
   topic_list.append({'id': t.id, 'title': t.title})
  return HttpResponse(json.dumps({'topics': topic_list}), content_type='application/json')
 if (slug == 'firefox'):
  latest_version = product_details.firefox_versions['LATEST_FIREFOX_VERSION']
 else:
  versions = product.versions.filter(default=True)
  if versions:
   latest_version = versions[0].min_version
  else:
   latest_version = 0
 return render(request, template, {'product': product, 'products': Product.objects.filter(visible=True), 'topics': topics_for(product=product, parent=None), 'search_params': {'product': slug}, 'latest_version': latest_version})

@ check_simple_wiki_locale @ mobile_template ( 'products/{mobile/}product.html' ) def product_landing ( request , template , slug ) : product = get_object_or_404 ( Product , slug = slug ) if request . is_ajax ( ) : topic_list = list ( ) for t in Topic . objects . filter ( product = product , visible = True ) : topic_list . append ( { 'id' : t . id , 'title' : t . title } ) return HttpResponse ( json . dumps ( { 'topics' : topic_list } ) , content_type = 'application/json' ) if ( slug == 'firefox' ) : latest_version = product_details . firefox_versions [ 'LATEST_FIREFOX_VERSION' ] else : versions = product . versions . filter ( default = True ) if versions : latest_version = versions [ 0 ] . min_version else : latest_version = 0 return render ( request , template , { 'product' : product , 'products' : Product . objects . filter ( visible = True ) , 'topics' : topics_for ( product = product , parent = None ) , 'search_params' : { 'product' : slug } , 'latest_version' : latest_version } )
the product landing page .