Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

How to use upwork client with Django? #17

@rajasimon

Description

@rajasimon

HI

I'm developing the application with Django framework. As you know that Django is not keeping the client instance across request. I can't find the way to make it work.

def access(request):
    client = upwork.Client(public_key, secret_key)
    url = client.auth.get_authorize_url()
    return HttpResponseRedirect(url)
def authorize(request):
    oauth_verifier = request.GET.get('oauth_verifier')
    oauth_access_token, oauth_access_token_secret = \
        client.auth.get_access_token(oauth_verifier)

Though this is not working because again I need to call the get_authorize_url. I don't like this behaviour because I wanted to use client instance wherever in the Django environment. Is there any way I can make it work with across request. Like Reddit Praw they have multi instance.

Please point me in the right direction...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions