how to update view code example
Example 1: updateview
class YourView(UpdateView):
model = YourModel
fields = ['your_fields']
template_name = 'your_template.html'
success_url = reverse_lazy('home')
Example 2: sql update views +1
$sqlviews = "UPDATE vendors SET views = views + 1
WHERE id = '$v_id'";
if ($conn->query($sqlviews) === TRUE) { }