summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhardythe12013-10-09 15:27:44 +0530
committerhardythe12013-10-09 15:27:44 +0530
commit3f0edc9409731e43349ff83403f402315956a04f (patch)
tree0c2645947ce48929cb2319554f23e5e5288dce12
parent1ce3a401fc6658e76ee9b0234094b116dddf14a0 (diff)
downloadSciPy2012-3f0edc9409731e43349ff83403f402315956a04f.tar.gz
SciPy2012-3f0edc9409731e43349ff83403f402315956a04f.tar.bz2
SciPy2012-3f0edc9409731e43349ff83403f402315956a04f.zip
resolving url issue
-rw-r--r--conference/urls.py23
-rwxr-xr-xscipy2012/urls.py7
-rw-r--r--templates/base.html10
-rw-r--r--templates/conference/tutorials.html2
4 files changed, 30 insertions, 12 deletions
diff --git a/conference/urls.py b/conference/urls.py
new file mode 100644
index 0000000..228cec9
--- /dev/null
+++ b/conference/urls.py
@@ -0,0 +1,23 @@
+from django.conf.urls import patterns, include, url
+from conference.views import *
+
+# Uncomment the next two lines to enable the admin:
+from django.contrib import admin
+admin.autodiscover()
+
+urlpatterns = patterns('',
+ # Examples:
+ # url(r'^$', 'scipy2012.views.home', name='home'),
+ # url(r'^scipy2012/', include('scipy2012.foo.urls')),
+
+ # Uncomment the admin/doc line below to enable admin documentation:
+ # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
+
+ # Uncomment the next line to enable the admin:
+ url(r'^$', home, name="home"),
+ url(r'^keynote/', keynote, name="keynote"),
+ url(r'^tutorials/', tutorials, name="tutorials"),
+ url(r'^talks/', talks, name="talks"),
+ url(r'^sponsors/', sponsors, name="sponsors"),
+ url(r'^details/(?P<talktutorial_id>\d+)/$', details, name="details"),
+)
diff --git a/scipy2012/urls.py b/scipy2012/urls.py
index 8ec55eb..58134e6 100755
--- a/scipy2012/urls.py
+++ b/scipy2012/urls.py
@@ -14,11 +14,6 @@ urlpatterns = patterns('',
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
+ url(r'^2012/', include('conference.urls', namespace='conference')),
url(r'^admin/', include(admin.site.urls)),
- url(r'^$', home),
- url(r'^keynote/', keynote),
- url(r'^tutorials/', tutorials),
- url(r'^talks/', talks),
- url(r'^sponsors/', sponsors),
- url(r'^details/(\d+)/$', details),
)
diff --git a/templates/base.html b/templates/base.html
index a7bed9a..acd4ebe 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -7,7 +7,7 @@
</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
-<link rel="stylesheet" href="{{ URL_ROOT }}/static/css/default.css" type="text/css" />
+<link rel="stylesheet" href="{{ STATIC_URL }}/css/default.css" type="text/css" />
</head>
<body>
<div id="header-wrapper">
@@ -22,13 +22,13 @@
<a href="#" accesskey="2" title="">Conference</a>
<ul>
<div class="arrow-up"></div>
- <li><a href="{{ URL_ROOT }}/keynote">Keynote</a></li>
- <li><a href="{{ URL_ROOT }}/tutorials">Tutorials</a></li>
- <li><a href="{{ URL_ROOT }}/talks">Talks</a></li>
+ <li><a href="{% url 'conference:keynote' %}">Keynote</a></li>
+ <li><a href="{% url 'conference:tutorials' %}">Tutorials</a></li>
+ <li><a href="{% url 'conference:talks' %}">Talks</a></li>
<li><a href="https://plus.google.com/photos/108547534465492743329/albums/5830648864137819041?banner=pwa" target=_blank>Image Gallery</a></li>
</ul>
</li>
- <li><a href="{{ URL_ROOT }}/sponsors" accesskey="3" title="">Sponsors</a></li>
+ <li><a href="{% url 'conference:sponsors' %}" accesskey="3" title="">Sponsors</a></li>
<li><a href="#" accesskey="4" title="">About</a></li>
</ul>
</div>
diff --git a/templates/conference/tutorials.html b/templates/conference/tutorials.html
index bf39387..81afba4 100644
--- a/templates/conference/tutorials.html
+++ b/templates/conference/tutorials.html
@@ -8,7 +8,7 @@
<th>Title
<th>Speaker
{% for tutorial in tutorials %}
-<tr><td><a href="{{ URL_ROOT }}/details/{{ tutorial.id }}">{{ tutorial.title }}<td>{{ tutorial.speaker }}
+<tr><td><a href="{% url 'conference:details' tutorial.id %}">{{ tutorial.title }}<td>{{ tutorial.speaker }}
{% endfor %}
</table>
{% endblock %}