[Django]-Uploading image in django: getting "global name context is not defined" error

6👍

If its not defined, it’s not defined. You’d have to import Context from django.template.

At the top of your file, type in

from django.template import Context

You can’t magically hope that all variables are defined… would you think you could use PictureUploadForm if you had not imported it or otherwise defined it?

Leave a comment