@never_cache
@permission_required("tags.manage_tags")
def tag_add(request):
    if request.method == "POST":
        form = forms.AddTagForm(request.POST, user=request.user)
        tag = form.save_if_valid()
        if tag is not None:
            messages.success(
                request, u"Tag '{0}' added.".format(
                    tag.name)
                )
            return redirect("manage_tags")
    else:
        pf = PinnedFilters(request.COOKIES)
        form = forms.AddTagForm(
            user=request.user,
            initial=pf.fill_form_querystring(request.GET).dict(),
            )
    return TemplateResponse(
        request,
        "manage/tag/add_tag.html",
        {
            "form": form,
            "hide_multiselect": 1,
            }
        )
Add a tag.
dataset/ETHPy150Open mozilla/moztrap/moztrap/view/manage/tags/views.py/tag_add