Adam Knight avatar Adam Knight committed b2958df

Updated to HTML5. Resolved lookup issue with sections.

Comments (0)

Files changed (5)

 	'django.contrib.humanize',
 	'django.contrib.comments',
 	'sitepoet',
-	'sitepoet.drupal_support',
+#	'sitepoet.drupal_support',
 	'tagging',
 	'threadedcomments',
 )

sitepoet/templates/story.html

     <h2>
         <a href="{{object.get_absolute_url}}">{{object.title}}</a>
     </h2>
-    <p class="byline">
+    <div class="byline">
         By <span class="author">{{object.user.username}}</span> on <span class="date">{{object.date_published|date}}</span>
-    </p>
-    <p class="teaser">
+    </div>
+    <div class="teaser">
         {{object.formatted_teaser}}
-    </p>
+    </div>
 {% if not options.teasers %}
-    <p class="body">
+    <div class="body">
         {{object.formatted_content}}
-    </p>
+    </div>
 	<p class="post-info">
 		{% load tagging_tags %}
 		{% tags_for_object object as tags %}
+		{% if tags.count %}
 		<p /><span class="tags"><span class="post-item-key">Tags:</span> <span class="post-item-value">{% for tag in tags %}<a href="{% url tag tag.name %}">{{tag}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</span></span></p>
+		{% endif %}
 	</p>
 {% endif %}
-</div>
+</div>

sitepoet/templates/story_detail.html

 {% extends "base.html" %}
 {% block content %}
-{% load threadedcomments_tags %}
 {% include "story.html" %}
 
-{% if object.show_comments %}
-<div id="comments">
-{% get_comment_list for object as comment_list %}
-{% for comment in comment_list|annotate_tree %}
-{% include "comment.html" %}
-{% endfor %}
-</div>
-{% endif %}
-
-{% if object.allow_commenting %}
-<div id="newcomment">
-{% render_comment_form for object %}
-</div>
-{% endif %}
-
 {% endblock %}

sitepoet/views.py

 	# Fetch a story
 	try:
 		story = Story.published.get(
-			section__name = section,
+			section__slug = section,
 			date_published__year = int(year),
 			date_published__month = int(month),
 			date_published__day = int(day),
 def story_archive(request, section=None, year=None, month=None, day=None, teasers=False):
 	# If there's a section, try and load it then filter the stories by it
 	if section:
-		obj = get_object_or_404(Section, name=section)
+		obj = get_object_or_404(Section, slug=section)
 		stories = Story.published.filter(section=obj)
 	else:
 		stories = Story.published.all()

templates/base.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<html>
 <head>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 	<title>{{site.name}}{% if title %} - {{title}}{% endif %}</title>
-	<style>
+	<style type="text/css">
 	* {
 		font-family: Helvetica, Arial, sans-serif;
 	}
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.