Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
30e7c113
Commit
30e7c113
authored
Nov 16, 2014
by
Jason D Yeomans
Browse files
Template work, building HTML page
parent
b2790667
Changes
8
Hide whitespace changes
Inline
Side-by-side
roomlist/django_project/settings.py
View file @
30e7c113
...
...
@@ -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
...
...
roomlist/django_project/urls.py
View file @
30e7c113
...
...
@@ -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'
)),
)
roomlist/roomlist/urls.py
View file @
30e7c113
...
...
@@ -5,4 +5,5 @@ admin.autodiscover()
urlpatterns
=
patterns
(
''
,
url
(
r
'^$'
,
views
.
index
,
name
=
'index'
),
url
(
r
'^buildings/$'
,
views
.
buildings
,
name
=
'buildings'
),
)
roomlist/roomlist/views.py
View file @
30e7c113
...
...
@@ -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
))
roomlist/static/css/style.css
0 → 100644
View file @
30e7c113
body
{
min-height
:
2000px
;
padding-top
:
70px
;
}
roomlist/templates/buildings.html
0 → 100644
View file @
30e7c113
roomlist/templates/layouts/buildings.html
0 → 100644
View file @
30e7c113
{% 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 %}
roomlist/templates/layouts/navbar.html
View file @
30e7c113
<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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment