Ask Your Question
0

Where do I find the horizon login url view?

asked 2013-03-27 12:21:37 -0500

gabrielcw gravatar image

updated 2013-03-27 15:42:58 -0500

Razique gravatar image

Hi there, I am looking at the horizon's template code at "horizon/templates/auth/_login.html" and there's a form action that redirects to a url named login, as:

:{% block form_action %}{% url login %}{% endblock %}

I have some django knowledge, but I'm having a hard time to find the urls.py that have the named URL login, and hence the corresponding python view of the url.

Thanks,

PS: the code is from git master.

edit retag flag offensive close delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-03-27 14:45:23 -0500

updated 2013-03-27 16:26:17 -0500

Hey,

That comes from djang-openstack-auth:

A good way to find out where specific urls are defined is by using django's url reverse

>>> from django.core.urlresolvers import reverse, resolve
>>> func, args, kwargs = resolve(reverse('login'))
>>> func.__module__
'openstack_auth.views'

Then you can look up for that module.

edit flag offensive delete publish link more

Comments

Great, thanks for the tip!

gabrielcw ( 2013-03-27 15:05:06 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2013-03-27 12:21:37 -0500

Seen: 217 times

Last updated: Mar 27 '13