@anonymous_csrf
@mobile_template('questions/{mobile/}marketplace_category.html')
def marketplace_category(request, category_slug, template=None):
 try:
  category_name = MARKETPLACE_CATEGORIES[category_slug]
 except KeyError:
  raise Http404
 error_message = None
 if (request.method == 'GET'):
  form = MarketplaceAaqForm(request.user)
 else:
  form = MarketplaceAaqForm(request.user, request.POST)
  if form.is_valid():
   try:
    form.submit_ticket()
    return HttpResponseRedirect(reverse('questions.marketplace_aaq_success'))
   except ZendeskError:
    error_message = ZENDESK_ERROR_MESSAGE
 return render(request, template, {'category': category_name, 'category_slug': category_slug, 'categories': MARKETPLACE_CATEGORIES, 'form': form, 'error_message': error_message})

@ anonymous_csrf @ mobile_template ( 'questions/{mobile/}marketplace_category.html' ) def marketplace_category ( request , category_slug , template = None ) : try : category_name = MARKETPLACE_CATEGORIES [ category_slug ] except KeyError : raise Http404 error_message = None if ( request . method == 'GET' ) : form = MarketplaceAaqForm ( request . user ) else : form = MarketplaceAaqForm ( request . user , request . POST ) if form . is_valid ( ) : try : form . submit_ticket ( ) return HttpResponseRedirect ( reverse ( 'questions.marketplace_aaq_success' ) ) except ZendeskError : error_message = ZENDESK_ERROR_MESSAGE return render ( request , template , { 'category' : category_name , 'category_slug' : category_slug , 'categories' : MARKETPLACE_CATEGORIES , 'form' : form , 'error_message' : error_message } )
aaq category page .