Changeset 6238


Ignore:
Timestamp:
Sep 2, 2008, 11:03:46 PM (16 years ago)
Author:
RIck van der Zwet
Message:

Removed absolute URL calls and converted them to relative ones

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TODO

    r6234 r6238  
    1010* Fix dhcpd.conf template
    1111* Add ssh_keys
    12 * Check urls and response redirects; Make urls depend on urls.py instead of hardcoding them into
    13         views.py and the templates. See:
    14         http://www.djangoproject.com/documentation/url_dispatch/#reverse
     12
    1513* remove hardcoding in wllogic.py for 172.17 and higher as master ip
    1614* Interface cleanups:
     
    424015/08/08 * Make admin work with models.py
    434123/08/08 * Interlink add code; Generate ipaddresses and netmask for link works.
     4203/09/08 - RZ
     43* Check urls and response redirects; Make urls depend on urls.py instead of hardcoding them into
     44        views.py and the templates. See:
     45        http://www.djangoproject.com/documentation/url_dispatch/#reverse
    4446
    4547       
  • exodus/templates/exodus-template.html

    r6206 r6238  
    55WirelessLeiden Exodus
    66</TITLE>
    7 <link rel="stylesheet" href="/exodus/static/exodus.css" title="Default" type="text/css">
     7<link rel="stylesheet" href="{% url static path="exodus.css" %}" title="Default" type="text/css">
    88</HEAD>
    99<BODY>
     
    1111  <TR>
    1212    <td class="menu" valign="top">
    13           <A name="top"><img width="130" height="82" alt="logo" src="/exodus/static/logo.png" border=0></A><br>
    14           <img width="130" height="97" alt="foto" src="/exodus/static/foto.jpg"/><br>
    15           &nbsp;&nbsp;<A class="menu" href="/exodus">Exodus</a><br>
    16           &nbsp;&nbsp;<A class="menu" href="/exodus/nodelist">Node List</a><br>
    17           &nbsp;&nbsp;<A class="menu" href="/exodus/addlocation">Add Location</a><br>
    18           &nbsp;&nbsp;<A class="menu" href="/exodus/addnode">Add Node</a><br>
    19           &nbsp;&nbsp;<A class="menu" href="/exodus/addnic">Add NIC</a><br>
    20           &nbsp;&nbsp;<A class="menu" href="/exodus/addinterlink">Add Interlink</a><br>
    21           &nbsp;&nbsp;<A class="menu" href="/exodus/addomni">Add Omni</a><br>
     13          <A name="top"><img width="130" height="82" alt="logo" src="{% url static path="logo.png" %}" border=0></A><br>
     14          <img width="130" height="97" alt="foto" src="{% url static path="foto.jpg" %}"/><br>
     15          &nbsp;&nbsp;<A class="menu" href="{% url root %}">Exodus</a><br>
     16          &nbsp;&nbsp;<A class="menu" href="{% url nodelist %}">Node List</a><br>
     17          &nbsp;&nbsp;<A class="menu" href="{% url exodus.views.addlocation %}">Add Location</a><br>
     18          &nbsp;&nbsp;<A class="menu" href="{% url exodus.views.addnode %}">Add Node</a><br>
     19          &nbsp;&nbsp;<A class="menu" href="{% url exodus.views.addnic %}">Add NIC</a><br>
     20          &nbsp;&nbsp;<A class="menu" href="{% url exodus.views.addinterlink %}">Add Interlink</a><br>
     21          &nbsp;&nbsp;<A class="menu" href="{% url exodus.views.addomni %}">Add Omni</a><br>
    2222          &nbsp;<p>
    2323        </td>
  • exodus/templates/node-list.html

    r6217 r6238  
    1010                <tr>
    1111                <td class="list" ><a class="list"href=../{{ object.name }}/node/> {{ object.name }} </a><td>
    12             <td><a href=../{{ object.name }}/dhcpd.conf>dhcpd.conf</a></td>
    13             <td><a href=../{{ object.name }}/named.conf>named.conf</a></td>
    14             <td><a href=../{{ object.name }}/rc.node.local>rc.node.local</a></td>
    15             <td><a href=../{{ object.name }}/resolv.conf>resolv.conf</a></td>
     12            <td><a href="{% url exodus.views.conf_dhcpd_conf object.name %}">dhcpd.conf</a></td>
     13            <td><a href="{% url exodus.views.conf_named_conf object.name %}">named.conf</a></td>
     14            <td><a href="{% url exodus.views.conf_rc_node_local object.name %}">rc.node.local</a></td>
     15            <td><a href="{% url exodus.views.conf_resolv_conf object.name %}">resolv.conf</a></td>
    1616                </tr>
    1717
  • exodus/urls.py

    r6215 r6238  
    3333
    3434        # views
    35         (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html'}) ,
    36         (r'^nodelist/$', 'django.views.generic.list_detail.object_list', dict(node_dict, template_name='node-list.html')),
     35        url(r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html'}, "root") ,
     36        url(r'^nodelist/$', 'django.views.generic.list_detail.object_list', dict(node_dict, template_name='node-list.html'), "nodelist"),
    3737        (r'^(?P<slug>.+)/node/$', 'django.views.generic.list_detail.object_detail', dict(node_dict,slug_field='name',template_name='node-detail.html')),
    3838
     
    5151        (r'^addomni/$', 'exodus.views.addomni'),
    5252
    53         (r'^static/(.*)$', 'django.views.static.serve', {'document_root':
    54          settings.DJANGOROOT + '/exodus/static'}),
     53        url(r'^static/(?P<path>.*)$$', 'django.views.static.serve', {'document_root':
     54         settings.DJANGOROOT + '/exodus/static'}, "static"),
    5555)
Note: See TracChangeset for help on using the changeset viewer.