Sep-07-2020, 04:14 AM
wow thank you! It doesn't give me the error now.
Here is my code now. It doesn't give me an error but how can I test that it's actually putting the data into the db? The db doesn't exist in any format I know of where I can view it. Is there a way to print out the contents?
Here is my code now. It doesn't give me an error but how can I test that it's actually putting the data into the db? The db doesn't exist in any format I know of where I can view it. Is there a way to print out the contents?
def auction(request): if request.method == "POST": title = request.POST.get("title") description = request.POST.get("description") price = request.POST.get("price") category = request.POST.get("category") new = NewPost.objects.create(title = title, description = description, price = price, category = category) new.save() return render(request, "auctions/auction.html") else: return render(request, "auctions/auction.html")