How to check if something exists in a postgresql database using django?
You can use Entry.objects.filter(name=”name”, title=”title”).exists() This will return to you true/false values. When you use count the orm generates query which will be executed much longer than in exists method. The get method will raise an exception when object does not exists. request.POST is a dictionary so to check db with it you use, i.e.: … Read more