[Answered ]-Trying to apply CRUD functionality to python project

1👍

You didn’t pass in the context to the render function, the code should look like this:

def createListing(request):

    form = listingForm()
    context = {'form': form}

    return render(request,'accounts/create_listing.html', context)

Also a suggestion for your code is optimising the photos for your Listing model, here is a good material to watch: https://youtu.be/-0nYBqY9i5w

Leave a comment