Showing results for 
Search instead for 
Did you mean: 

Django + server API app logic with Strava

Mt. Kenya

Hi everyone,
I'm a beginner programmer. I am writing my master's thesis on "The motivational impact of the Strava social network on users' sports results."
I created an application in Django that processes tokens, gets athletes and the activities (+comments, kudos) of people who decided to take part in the study and saves them in a database (postgresql).
I experienced many difficulties when creating this application, first of all... the authorization code thanks to which I obtain access_token and refresh_token has a very short validity
(I think it's only a few dozen seconds).
Initially, I enrolled people in the database by texting each one individually and exchanging tokens, but after some time I started receiving "Bad Request" errors and I couldn't get their access_tokens, so their activities.
For this reason, I decided to deploy this application from the local version to the server - I chose Azure (it's free for students). Deployment caused me a lot of problems and finally, I can't cope with integration.
My new idea is to deploy only a fragment of the application, to handle the exchange of authorization code and tokens via redirect_uri and save them in the database. Then I will join tables and process the activities fetching.
Could you let me know if the whole process is logical for you and if this is how I should approach it? I'm doing it for the first time and I feel a bit like in a fog. Is there any documentation or design available that I could follow? I would like the entire application to be free because I am a student and I don't want to make money on it.
I am sending you a link to my repo, I would appreciate your help:
Best wishes, Michal T