Skip to content

Commit

Permalink
Hook up the new 'home' view and reference it from the templates.
Browse files Browse the repository at this point in the history
This means that no URL is hard-coded anywhere.
  • Loading branch information
akumria committed Apr 6, 2012
1 parent f938b4a commit defdbfc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions paas/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@

# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),

url(r'', include('world.urls')),
)
4 changes: 2 additions & 2 deletions templates/www/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
</div>

<div id="logo">
<a href="/" title="MyProject home"><img src="{% static "img/myproject-logo.png" %}" alt="MyProject" /></a>
<a href="{% url home %}" title="MyProject home"><img src="{% static "img/myproject-logo.png" %}" alt="MyProject" /></a>
</div>
</div>

{% block nav %}
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="{% url home %}">Home</a></li>
</ul>
</nav>
{% block subnav %}
Expand Down
5 changes: 5 additions & 0 deletions world/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.conf.urls.defaults import patterns, include, url

urlpatterns = patterns('world.views',
url(r'', 'home', name='home'),
)

0 comments on commit defdbfc

Please sign in to comment.