Commit 30e7c113 authored by Jason D Yeomans's avatar Jason D Yeomans
Browse files

Template work, building HTML page

parent b2790667
......@@ -12,6 +12,9 @@ https://docs.djangoproject.com/en/1.6/ref/settings/
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
print TEMPLATE_DIRS
......
......@@ -7,7 +7,7 @@ urlpatterns = patterns('',
# Examples:
# url(r'^$', 'django_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^$', include('roomlist.urls')),
url(r'^api/', include('api.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('roomlist.urls')),
)
......@@ -5,4 +5,5 @@ admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
url(r'^buildings/$', views.buildings, name='buildings'),
)
......@@ -10,3 +10,9 @@ def index(request):
context = RequestContext(request, {
})
return HttpResponse(template.render(context))
def buildings(request):
template = loader.get_template('buildings.html')
context = RequestContext(request, {
})
return HttpResponse(template.render(context))
body {
min-height: 2000px;
padding-top: 70px;
}
{% extends 'layouts/base.html' %}
{% block title %}
GMU RoomList • Homepage
{% endblock %}
{% block content %}
<div class="page-header" id="banner">
<div class="row">
<div class="col-lg-12 text-center">
<h1><strong>GMU</strong>ROOMLIST</h1>
<p class="lead">List of buildings in database:</p>
</div>
</div>
</div>
<div class="row">
</div>
{% endblock %}
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
</div>
</nav>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Project name</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="../navbar/">Default</a></li>
<li><a href="../navbar-static-top/">Static top</a></li>
<li class="active"><a href="./">Fixed top</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
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