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

Update old dependencies #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

sebastian-correa
Copy link

Closes #22 and #24.

Updating the dependencies brought some problems, that are fixed in 28b016e.

Problem 1

Trying to authenticate against the API errored out. I checked the django logs (/var/log/django/django.log) and there was an error with decoding and enconding the token.

jwt.encode returns a str since version 2.0, as seen in the changelog. The line

return token.decode('utf-8')

in models.py raised an AttributeError because token is a str.

Also, jwt.decode now needs an explicit declaration of the algorithm to use in order to work correctly.

Problem 2

The gunicorn config file had to be changed to a .py file.

Problem 3

app_name variable was added in django applications.

Also change pyscopg2 to psycopg-binary.
Add app_name to files. New django versions demand this pattern.
Fix credential authentication in backends.
Change gunicorn conf file extension to .py and references in Dockerfile.
@sebastian-correa sebastian-correa self-assigned this Dec 3, 2021
@kris621294
Copy link

5bcb07b

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

Successfully merging this pull request may close these issues.

Gunicorn configuration file extension is wrong
2 participants