Skip to content

Commit 66faecd

Browse files
committed
Add static files and create a bit of an intro page
1 parent 836d17f commit 66faecd

File tree

5 files changed

+67
-1
lines changed

5 files changed

+67
-1
lines changed

dgentledjango/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
# Don't put anything in this directory yourself; store your static files
5757
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
5858
# Example: "/home/media/media.lawrence.com/static/"
59-
STATIC_ROOT = ''
59+
STATIC_ROOT = '/var/www/dgentledjango/static/'
6060

6161
# URL prefix for static files.
6262
# Example: "http://media.lawrence.com/static/"

intro/static/css/bootstrap.min.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/index.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Dgentle Django</title>
5+
<meta charset="utf-8">
6+
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
7+
</head>
8+
9+
<body>
10+
<div class="container-fluid">
11+
<div class="row-fluid">
12+
<div class="span2">
13+
<div class="well sidebar-nav">
14+
<ul class="nav nav-list">
15+
<li class="nav-header">Teachers</li>
16+
{% if teacher_list %}
17+
{% for teacher in teacher_list %}
18+
<li><a href="/teacher/{{ teacher.id }}/">{{ teacher.name }}</a></li>
19+
{% endfor %}
20+
{% else %}
21+
<li>No teachers in this class!</li>
22+
{% endif %}
23+
<li class="nav-header">Students</li>
24+
{% if student_list %}
25+
{% for student in student_list %}
26+
<li><a href="/student/{{ student.id }}/">{{ student.name }}</a></li>
27+
{% endfor %}
28+
{% else %}
29+
<li>No students in this class!</li>
30+
{% endif %}
31+
</ul>
32+
</div>
33+
</div> <!-- /span -->
34+
<div class="span6">
35+
<div class="hero-unit">
36+
<h1>Dgentle Django</h1>
37+
<p>Welcome to Dgentle Django! Our goal is to give an introduction to Django and get you started on your own websites.</p>
38+
</div>
39+
</div>
40+
</div>
41+
</div>
42+
</body>
43+
</html>

templates/student_detail.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% if student %}
2+
<fieldset>
3+
<legend>{{ student.name }}</legend>
4+
<label for="goal">Goal</label>
5+
<input type="text" value="{{ student.goal }}" />
6+
</fieldset>
7+
{% endif %}

templates/teacher_detail.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% if teacher %}
2+
<fieldset>
3+
<legend>{{ teacher.name }}</legend>
4+
<label for="number">Favorite Number</label>
5+
<input type="text" value="{{ teacher.favorite_number }}" />
6+
</fieldset>
7+
{% endif %}

0 commit comments

Comments
 (0)