def METHOD_NAME(request, form_class=EntityForm, template_name="entities/add.html"):
    if has_perm(request.user,'entities.add_entity'):
        if request.method == "POST":
            form = form_class(request.POST, user=request.user)
            if form.is_valid():
                entity = form.save(commit=False)
                # update all permissions and save the model
                entity = update_perms_and_save(request, form, entity)
                entity.allow_user_view = form.cleaned_data['allow_user_view']
                entity.allow_member_view = form.cleaned_data['allow_member_view']
                entity.save()
                messages.add_message(request, messages.SUCCESS, _('Successfully added %(e)s' % { 'e': entity }))
                return HttpResponseRedirect(reverse('entity', args=[entity.pk]))
        else:
            form = form_class(user=request.user, 
                              initial={'allow_anonymous_view': False,
                                        'allow_user_view': False,
                                        'allow_member_view': False})
        return render_to_resp(request=request, template_name=template_name,
            context={'form':form})
    else:
        raise Http403