I am using django-oscar for my development. I have created a new app as per my requirement
views.py
class MediaImportView(TemplateView):
template_name = 'lookup/import_media_file.html'
def get(self, request):
ctx = {}
return render(self.template_name, ctx, request, using=request)
getting the error as below.
InvalidTemplateEngineError at /import_media_file
Could not find config for '<WSGIRequest: GET '/import_media_file'>' in settings.TEMPLATES
From the documentation, the
using
argument takes:Instead of passing the name of a template engine, you are passing a
request
object, hence the error. In addition, all your other arguments are wrong as well - the signature of this function is:So the first argument needs to be a
request
, the second a template name, and the third the context. Something like this: