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

Fixed Outstanding tokens stamp 2 rows. #18

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
venv
__pycache__
__pycache__/
*.py[cod]
*.py[cod]
7 changes: 5 additions & 2 deletions authentication/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ class LoginSerializer(serializers.ModelSerializer):
def get_tokens(self, obj):
user = User.objects.get(email=obj['email'])


token = RefreshToken.for_user(user)

return {
'refresh': user.tokens()['refresh'],
'access': user.tokens()['access']
'refresh': str(token),
'access' : str(token.access_token)
}

class Meta:
Expand Down
Binary file modified db.sqlite3
Binary file not shown.
4 changes: 2 additions & 2 deletions income/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.apps import AppConfig


class ExpensesConfig(AppConfig):
name = 'expenses'
class IncomeConfig(AppConfig):
name = 'income'
2 changes: 2 additions & 0 deletions incomeexpensesapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,5 @@
EMAIL_PORT = 587
EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
23 changes: 15 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
asgiref==3.2.7
asgiref==3.7.2
autopep8==1.5.4
cachetools==4.1.1
certifi==2020.4.5.1
chardet==3.0.4
coreapi==2.3.3
coreschema==0.0.4
Django==3.0.7
distlib==0.3.8
Django==3.2.20
django-cors-headers==3.5.0
djangorestframework==3.11.0
djangorestframework-simplejwt==4.4.0
djangorestframework==3.11.2
djangorestframework-simplejwt==5.3.1
drf-yasg==1.17.1
facebook-sdk==3.1.0
Faker==4.1.0
filelock==3.13.1
future==0.18.2
google-api-core==1.22.2
google-api-python-client==1.12.1
Expand All @@ -27,23 +29,28 @@ Jinja2==2.11.2
MarkupSafe==1.1.1
oauthlib==3.1.0
packaging==20.4
platformdirs==4.1.0
protobuf==3.13.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.6.0
PyJWT==1.7.1
PyJWT==2.8.0
pyparsing==2.4.7
python-dateutil==2.8.1
python-twitter==3.5
pytz==2020.1
PyYAML==6.0.1
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.6
ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.0
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
six==1.15.0
speedtest-cli==2.1.3
sqlparse==0.3.1
text-unidecode==1.3
toml==0.10.1
toml==0.10.2
typing_extensions==4.9.0
uritemplate==3.0.1
urllib3==1.25.9
virtualenv==20.25.0