def get_post_category_form(request, pk): categories = Category.objects.filter(site=settings.SITE_ID).values_list("pk", "name") args = { "attr_name": "category", "form_obj": SingleChoiceFieldForm, "form_args": {"choices": categories}, "inital_fix": ("Category", "pk"), } return get_single_form(request, pk, template_name="ajax/single_field_form_inline.haml", **args)
def get_post_title_form(request, pk): args = {"attr_name": "title", "form_obj": SingleCharFieldForm} return get_single_form(request, pk, template_name="ajax/single_field_form_inline.haml", **args)
def get_post_parsed_content_form(request, pk): args = {"attr_name": "content", "form_obj": SingleTextareaForm} return get_single_form( request, pk, path_name="post-parsed-content", template_name="ajax/single_field_form.haml", **args )
def get_post_is_public_form(request, pk): args = {"attr_name": "is_public", "form_obj": SingleBooleanFieldForm} return get_single_form( request, pk, path_name="post-is-public", template_name="ajax/single_field_form_inline.haml", **args )