As an example:
view.py
def view1( request ):
return HttpResponse( \"just a test...\" )
urls.py
urlpatterns = patter
As said by others, reverse
function and url
templatetags can (should) be used for this.
I would recommend to add a name to your url pattern
urlpatterns = patterns('',
url( r'^view1$', 'app1.view.view1', name='view1'),
)
and to reverse it thanks to this name
reverse('view1')
That would make your code easier to refactor