Make sure that URLConf points to the desired view function and write something like:
from django.http import HttpResponse from my_models import MyModel def myview(request, number): my_model = MyModel(my_field = number) my_model.save() return HttpResponse()
An empty HttpResponse at the end returns a 200 OK status code, so the browser or other server that connects to your endpoint knows that the request has been completed.
source share