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

Sensors app views issues #131

Open
gideonmaina opened this issue Jun 19, 2023 · 2 comments
Open

Sensors app views issues #131

gideonmaina opened this issue Jun 19, 2023 · 2 comments

Comments

@gideonmaina
Copy link
Collaborator

Accessing views throws "object not callable" error on Django v4 upgrade from v1.

E.g. accessing this v1/data endpoint on a development instance will through this error; raised when calling a bool as a function is_authenticated() . Of course, removing the brackets works as expected. What baffles me is that this works in the production instance running on Django v1. @thepsalmist would you know anything about this?

@kilemensi
Copy link
Member

@gideonmaina Django deprecates and later remove functionality between major releases e.g. What you're describing sounds similar-ish to https://docs.djangoproject.com/en/4.2/releases/1.10/#using-user-is-authenticated-and-user-is-anonymous-as-methods which was deprecated in Django 1 and removed in Django 2.

If you're planning to upgrade the app, I'd suggest going from one point release to the next e.g. 1.10 to 1.11 to 2.0, etc., or from one LTS release to the next.

My feeling though, we need to rethink everything from scratch e.g. is the platform supports to be just a data store or as a streaming platform, what about security (especially on ingres), etc.

@gideonmaina
Copy link
Collaborator Author

Thanks @kilemensi. I have been using Django 4.2.1 for upgrading the app.

I totally agree we need to rethink the platform from scratch. I have also been trying to wrap my head around the decision to have 2 endpoints. I am aware some of the changes were made to fulfil a partner's requirement to ingest data from other sensor networks. The easiest way to prevent ingestion from anywhere is to enforce model validation using a list of approved nodes.

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