Ryan Wilcox avatar Ryan Wilcox committed 68e16d7

finally put in a base.html

Comments (0)

Files changed (3)

project_dashboard/projects/templates/projects/index.html

 {% extends "base.html" %}
 
+{% block content %}
+
 <h1>All our projects</h1>
 <ul>
   {% for project in projects %}
     <li><a href="/projects/{{ project.id }}/">{{ project.project_summary }}</a></li>
   {% endfor %}
-</ul>
+</ul>
+
+{% endblock %}

project_dashboard/settings.py

     # For the pattern I adopt here.
     # 
     os.path.join(SITE_ROOT, 'templates'),
-    os.path.join(SITE_ROOT, "projects", "templates")
+    os.path.join(SITE_ROOT, "projects", "templates"),
+    os.path.join(SITE_ROOT, 'templates', "project"),
 )
 
+LOGIN_REDIRECT_URL  = "/projects"
+
 ############################################
 # So we have a problem here: on my machine I might want to have a database named
 # "bob_development" instead of "bob_dev", or want to set my time zone to Hong Kong
     'django.contrib.comments',
     'south',
     'projects',
+    'attachments'
 )
+
+TEMPLATE_CONTEXT_PROCESSORS = (
+    'django.core.context_processors.auth',
+    'django.core.context_processors.i18n',
+    'django.core.context_processors.media',
+    'django.core.context_processors.request',
+)

project_dashboard/templates/project/base.html

+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+   "http://www.w3.org/TR/html4/strict.dtd">
+
+<html lang="en">
+<head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <title>{% block title %}{% endblock %}</title>
+</head>
+<body id="{% block body_id %}{% endblock %}">
+  <div id="header">
+    <h1>Welcome to the Wilcox Development Project Dashboard</h1>
+    <p id="username">
+      {% if user.is_authenticated %}
+        Current user: {{ user.username }}
+      {% else %}
+        <a href='/accounts/login'>(Log In)</a>
+      {% endif %}
+    </p>
+  </div>
+
+  <div id="body">
+    {% block body %}
+      <div>
+        {% block content_title %}{% endblock %}
+      </div>
+      <div class="content">
+        {% block content %}{% endblock %}
+      </div>
+    {% endblock %}
+  </div>
+</body>
+</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.