Untitled

mail@pastecode.io avatar
unknown
python
a month ago
336 B
1
Indexable
Never
@login_required
def izbranoy_add(request, pk):
    project = get_object_or_404(Project, id=pk)

    object, created = Izbranoy.objects.get_or_create(
        user=request.user,
        project=project
    )
    if created:
        messages.success(....)
        return HttpResponseRedirect()
    return HttpResponseRedirect()
Leave a Comment