def close(request): thread = get_object_or_404(smodels.Thread, pk=request.POST.get('id')) if toggle_boolean_field(thread, 'closed'): return {'link':_('open'), 'msg':_('This topic is closed.')} else: return {'link':_('close'), 'msg':_('This topic is open.')}
def close(request): thread = get_object_or_404(smodels.Thread, pk=request.POST.get('id')) if toggle_boolean_field(thread, 'closed'): return {'link': _('open'), 'msg': _('This topic is closed.')} else: return {'link': _('close'), 'msg': _('This topic is open.')}
def sticky(request): thread = get_object_or_404(smodels.Thread, pk=request.POST.get('id')) if toggle_boolean_field(thread, 'sticky'): return {'link':_('unstick'), 'msg':_('This topic is sticky!')} else: return {'link':_('stick'), 'msg':_('This topic is not sticky.')}
def sticky(request): thread = get_object_or_404(smodels.Thread, pk=request.POST.get('id')) if toggle_boolean_field(thread, 'sticky'): return {'link': _('unstick'), 'msg': _('This topic is sticky!')} else: return {'link': _('stick'), 'msg': _('This topic is not sticky.')}