Anonymous avatar Anonymous committed 4da945c

ANother fixes for urls

Comments (0)

Files changed (2)

templates/mediatr/item_detail.html

 {% block stream %}
 {% if object.stream %}
 <div id="stream-meta">
-<h1><a href="{% url stream_page slug=object.stream.slug %}">{{ object.stream.name }}</a></h1>
+<h1><a href="{{ object.stream.get_absolute_url }}">{{ object.stream.name }}</a></h1>
 <p>{{ object.stream.description|safe }}</p>
 </div>
 {% endif %}
-<dic id="stream-item">
+<div id="stream-item">
     {% if object.is_image %}
-    <a href="{% url stream_item slug=object.slug %}"><img src="{{ object.file.url }}" alt="{{ object.name }}" /></a>
-    <h2 class="stream-item-title"><a href="{% url stream_item slug=object.slug %}">{{ object.name }}</a></h2>
+    <a href="{{ object.get_absolute_url }}"><img src="{{ object.file.url }}" alt="{{ object.name }}" /></a>
+    <h2 class="stream-item-title"><a href="{{ object.get_absolute_url }}">{{ object.name }}</a></h2>
     <p class="stream-item-descr">{{ object.text|safe }}</p>
     {% else %}
-    <h2 class="stream-item-title"><a href="{% url stream_item slug=object.slug %}">{{ object.name }}</a></h2>
+    <h2 class="stream-item-title"><a href="{{ object.get_absolute_url }}">{{ object.name }}</a></h2>
     <p class="stream-item-descr">{{ object.text|safe }}</p>
     <p class="stream-item-attach"><a href="{{ object.file.url }}">Download enclosure.</a></p>
     {% endif %}

templates/mediatr/item_list.html

 {% extends "base.html" %}
 {% block stream %}
 <div id="stream-meta">
-<h1><a href="{% url stream_page slug=stream.slug %}">{{ stream.name }}</a></h1>
+<h1><a href="{{ stream.get_absolute_url }}">{{ stream.name }}</a></h1>
 <p>{{ stream.description|safe }}</p>
 </div>
 <ul id="stream-items">
 {% for i in object_list %}
     <li>
     {% if i.is_image %}
-    <a href="{% url stream_item slug=i.slug %}"><img src="{{ i.file.url }}" alt="{{ i.name }}" /></a>
-    <h2 class="stream-item-title"><a href="{% url stream_item slug=i.slug %}">{{ i.name }}</a></h2>
+    <a href="{{ i.get_absolute_url }}"><img src="{{ i.file.url }}" alt="{{ i.name }}" /></a>
+    <h2 class="stream-item-title"><a href="{{ i.get_absolute_url }}">{{ i.name }}</a></h2>
     <p class="stream-item-descr">{{ i.text|safe }}</p>
     {% else %}
-    <h2 class="stream-item-title"><a href="{% url stream_item slug=i.slug %}">{{ i.name }}</a></h2>
+    <h2 class="stream-item-title"><a href="{{ i.get_absolute_url }}">{{ i.name }}</a></h2>
     <p class="stream-item-descr">{{ i.text|safe }}</p>
     <p class="stream-item-attach"><a href="{{ i.file.url }}">Download enclosure.</a></p>
     {% endif %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.