V
V
vfvnvsyevsky2015-02-28 01:41:00
Django
vfvnvsyevsky, 2015-02-28 01:41:00

How to pull variable from URL string in Django?

There is a line like:

127.0.0.1:8000/auth/login/?next=/profile

I'm trying to pull out net in the handler:
request.GET.get('next')
But it doesn't work. What is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav, 2015-02-28
@vfvnvsyevsky

Everything should work. Try to see what GET generally has (print request.GET).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question