I'm making a browsable directory structure in Django, and I have made it using button forms and GET requests, however, I'm trying to achieve the same using links instead of buttons, and I'm confused with regex, infact I do not know a thing about it. I tried some stuff and other related answers from SO, but no avail.
Here is my url pattern (for the one working using buttons and I'd like to make it work with links as well):
url(r'^realTime/', views.view_real_time_index, name='view_real_time_index'),
What I want is to extract the path following the realTime/ in the suffix from the url.
And this is the template snippet I'm trying to work with:
{% for name,path in directory %}
<li>
<p>
<a href='/realTime/{{path}}'> {{name}} </a>
</p>
</li>
{% endfor %}
r'realTime/(?P<path>.*)$'should be fine to begin with.