I've made a basic application with the Django framework and PythonAnywhere is not liking my code for some reason.
When I ran the autoconfiguration for manual setup, I got an error that Django rest framework was required and the setup exited prematurely. The error was:
ModuleNotFoundError: No module named 'rest_framework'
I got into the venv and finished setup, though there were a few issues here and there. I manually installed djangorestframework from Github so that anything would show up, but I am still getting an unknown error that I have traced back to the routers.py file. The content of the error can be found on:
nebrethar.pythonanywhere.com
A sample of my routers.py file is as follows:
def get_routes(self, viewset):
known_actions = list(flatten([route.mapping.values() for
route in self.routes if isinstance(route, Route)]))
extra_actions = *****viewset.get_extra_actions()*****
not_allowed = [
action.__name__ for action in extra_actions
if action.__name__ in known_actions
]
I have starred out the section that causes the error. Most of the fixes I've run into have been installing packages but I've been stumped.