Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: ModelTrackerMiddleware() takes no arguments #4

Open
Chrescht opened this issue Jul 23, 2023 · 7 comments
Open

TypeError: ModelTrackerMiddleware() takes no arguments #4

Chrescht opened this issue Jul 23, 2023 · 7 comments

Comments

@Chrescht
Copy link

Hi,

trying to get the middleware to work, I am getting the following error:

Traceback (most recent call last):
wsgi.py, line 16, in
application = get_wsgi_application()
env/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
return WSGIHandler()
env/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 118, in init
self.load_middleware()
env/lib/python3.8/site-packages/django/core/handlers/base.py", line 61, in load_middleware
mw_instance = middleware(adapted_handler)
TypeError: ModelTrackerMiddleware() takes no arguments

Using Django 4.2.3 and python 3.8.10

@mkalioby
Copy link
Owner

mkalioby commented Jul 23, 2023

When do you get the error? During running the server or when you try accessing a view?

Can you share the MIDDLEWARE setting?

@Chrescht
Copy link
Author

I get it when accessing the server, the page doesn't matter.

Middleware setting? I added 'ModelTracker.middleware.ModelTrackerMiddleware', to my settings.py

@mkalioby
Copy link
Owner

I checked and it is working fine.

Which version of the django-model-tracker are you using?

@Chrescht
Copy link
Author

Version 2.0.3

By the way, I am more looking for a way to log to the db, I don't need any views or urls. Could I simply not include the urls?

@mkalioby
Copy link
Owner

For urls . Yes you can do that

I'll try a new project tomorrow and let you know

@mkalioby
Copy link
Owner

Hello,
I found the issue and did a new beta release. Please install it by

pip install django-model-tracker==2.0.4b1

and let me know if it fixed the issue so I can release it.

@Chrescht
Copy link
Author

Haven't tested all the way but looks good so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants