Created
November 13, 2014 09:24
-
-
Save bmihelac/fda3aaf249f7c442e4ca to your computer and use it in GitHub Desktop.
Django reverse choose last
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from django.core.urlresolvers import reverse | |
>>> reverse('foo') | |
'/second/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls import patterns, url | |
def view_func(*args, **kwargs): | |
pass | |
urlpatterns = patterns( | |
'', | |
url(r'^first/$', view_func, name='foo'), | |
url(r'^second/$', view_func, name='foo'), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment