Exemplo n.º 1
0
def edit_group(request, group_id):
    group = get_object_or_404(Group, pk=group_id)
    form = GroupForm(request.POST, instance=group)
    if not form.is_valid():
        raise FormException(form)
    form.save()
Exemplo n.º 2
0
def add_group(request):
    form = GroupForm(request.POST)
    if not form.is_valid():
        raise FormException(form)
    form.save()