Commit d668651c authored by Olivier Girardot's avatar Olivier Girardot
Browse files

finished critical urls refactoring

parent ea0bc654
......@@ -28,7 +28,7 @@ $(document).ready(function(){
{%block content%}
<h2>{% trans "New Violation" %}</h2>
<form id='addForm' name="addForm" enctype="multipart/form-data" action="{% root_url %}/add/" method="post">
<form id='addForm' name="addForm" enctype="multipart/form-data" action="{% url add_violation %}" method="post">
{% for field in form %}
{% if field.label = 'Resource' %}<div id="show_optionals">{% trans "Provide optional details" %}</div><div id="optional">{%endif%}
<div class="fieldWrapper">
......
......@@ -8,8 +8,8 @@
<meta name="keywords" content="internet network neutrality" />
<title>{% block title %}[!] Respect My Net {% endblock %}</title>
<meta name="robots" content="archive,index,follow" />
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="/atom/" />
<link rel="alternate" type="application/rss+xml" title="RSS feed" href="/rss/" />
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="{% url atom_output %}" />
<link rel="alternate" type="application/rss+xml" title="RSS feed" href="{% url rss_output %}" />
<meta http-equiv="content-language" content="{{LANGUAGE_CODE}}" />
{% block rss %}
{% endblock %}
......@@ -21,7 +21,7 @@
<div id="wrapper">
<div id="header-container">
<div id="header">
<h1><a href="/">Respect My Net <span>{% trans "name and shame operators restricting access to the Internet" %}</span></a></h1>
<h1><a href="{% homepage %}">Respect My Net <span>{% trans "name and shame operators restricting access to the Internet" %}</span></a></h1>
<div id="user"><p>
{% if user.is_authenticated %}
......@@ -37,8 +37,8 @@
</p></div>
<ul id="nav">
<li><a {% if request.path == '/' %}id="current" {% endif %}href="{%root_url%}/">{% trans "Home" %}</a></li>
<li><a {% if request.path == '/list/' or '/view' in request.path %}id="current" {% endif %}href="{%root_url%}/list">{% trans "Cases" %}</a></li>
<li><a {% if request.path == '/' %}id="current" {% endif %}href="{% url homepage %}">{% trans "Home" %}</a></li>
<li><a {% if request.path == '/list/' or '/view' in request.path %}id="current" {% endif %}href="{% url list_violations %}">{% trans "Cases" %}</a></li>
<li><a {% if request.path == '/about/' %}id="current" {% endif %}href="{%root_url%}/about">{% trans "What is Net Neutrality?" %}</a></li>
<li><a {% if request.path == '/start/' %}id="current" {% endif %}href="{%root_url%}/start">{% trans "Start Monitoring" %}</a></li>
<li><a {% if request.path == '/contact/' %}id="current" {% endif %}href="{%root_url%}/contact">{% trans "Contact" %}</a></li>
......
......@@ -92,7 +92,7 @@ $(document).ready(function() {
<h4>{% trans "Attachments" %}</h4>
<ul>
{%for a in c.attachment_set.all%}
<li><a href="/attach/{{a.id}}">{{a.name}}</a></li>
<li><a href="{% url attach a.id %}">{{a.name}}</a></li>
{%endfor%}
</ul>
</div>
......
......@@ -23,7 +23,7 @@ urlpatterns = patterns('',
name="ajax_call"),
url(r'^add/$',
view=bt.add,
name="add"),
name="add_violation"),
# violation cannonical url and redirections
url(r'^(?P<id>[0-9]*)$',
redirect_to,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment