var pcConfig = {
"iceServers": [
{
urls: 'stun:stun.l.google.com:19302'
},
{
urls: 'turn:numb.viagenie.ca:xxxx',
credential: 'xxxxxxxxxxxx',
username: 'xxxxxxxxxxxx'
}
]
};
peerConection = new PeerConnection(pcConfig);
def edit_profile_printing(request):
profile_data = get_object_or_404(PrintShop, user=request.user)
edit_form = PrintshopProfileForm(instance=profile_data)
if request.POST:
edit_form = PrintshopProfileForm(request.POST)
if edit_form.is_valid():
for key, value in edit_form.cleaned_data.items():
setattr(profile_data, key, value)
profile_data.save()
return redirect('/')
return render(request, 'profile/profile_printing.html', {'editForm':edit_form})_form
profile = edit_form.save(commit=False)
profile.user = request.user
profile.save()
edit_form.save()
def edit_profile_printing(request):
profile_data = get_object_or_404(PrintShop, user=request.user)
edit_form = PrintshopProfileForm(instance=profile_data)
if request.POST:
edit_form = PrintshopProfileForm(request.POST)
if edit_form.is_valid():
edit_form.save()
return redirect('/')
return render(request, 'profile/profile_printing.html', {'editForm':edit_form})_form
grequests.map(grequests.get(url) for u in range(count))
Response
href="{{ url 'Твой урл с въюхи обработчика' id-объекта}}?status=Сюда передаешь статус в зависимости от кнопки"
<a></a>