I am trying to retrieve the top voted items in Django. Here's the relevant line of code:
originalList = [x[0] for x in list(Vote.objects.get_top(Item, endIdx))[startIdx:]]
The indexes are for pagination purposes. When I try to load the page in a browser, I get:
AttributeError at /items/top/
'Settings' object has no attribute 'DATABASE_ENGINE'
However, the attribute it should be looking for is not DATABASE_ENGINE, rather, it is in DATABASES['default']['ENGINE']
. How can this be fixed?