-
Notifications
You must be signed in to change notification settings - Fork 640
dt.strftime('%S') #3
Comments
What version of Python are you using? |
Python 3.5.1 on windows I'm also currently doing the tutorial on Thinkster, and the upper change worked for the Login and Register Postman commands only, but did not work for Current User and Update User commands. I fixed the issue by making the following change: #dt = datetime.now() + timedelta(days=60)
|
In my mind, you use Windows. I fix this problem like this |
same for me, I had to do %S for it work, maybe create a note in the actual code snippet |
%S is not %s! It's wrong! |
%S signifies seconds yes? what does %s mean? |
Accorting to http://strftime.org/ %S means Second as a zero-padded decimal number. Example: 05 |
thanks for this, but still the fix is not yet committed in the repo. as of now. |
Are there any updates to this? Followed this tutorial https://thinkster.io/tutorials/django-json-api/authentication and I'm getting error after error |
I could runserver following hunterway55 comments: upgrading to django=1.10.5 and adding django-cors-headers==1.3.1, but the Postman register & login commands didn't work.
In apps/authentication/models.py
I replaced dt.strftime('%s') by dt.strftime('%S') and the Login & Register commands worked.
Token generation function is now:
Hope it helps someone.
The text was updated successfully, but these errors were encountered: