[cmsiki-svn] SF.net SVN: cmsiki: [6] trunk/cmsiki
Status: Pre-Alpha
Brought to you by:
cnu
From: <cn...@us...> - 2007-03-24 12:19:54
|
Revision: 6 http://cmsiki.svn.sourceforge.net/cmsiki/?rev=6&view=rev Author: cnu Date: 2007-03-24 05:03:56 -0700 (Sat, 24 Mar 2007) Log Message: ----------- Created templates and changed urls to handle month as number format Modified Paths: -------------- trunk/cmsiki/apps/story/models.py trunk/cmsiki/settings.py trunk/cmsiki/templates/story/story_archive.html trunk/cmsiki/templates/story/story_archive_day.html trunk/cmsiki/templates/story/story_archive_month.html trunk/cmsiki/templates/story/story_archive_year.html trunk/cmsiki/templates/story/story_detail.html trunk/cmsiki/urls.py Added Paths: ----------- trunk/cmsiki/static/ trunk/cmsiki/static/css/ trunk/cmsiki/static/css/style.css trunk/cmsiki/static/images/ trunk/cmsiki/static/images/add_comment.gif trunk/cmsiki/static/images/bg_arrow_right.gif trunk/cmsiki/static/images/bg_arrow_right_2.gif trunk/cmsiki/static/images/bg_blockquote.gif trunk/cmsiki/static/images/bg_body.gif trunk/cmsiki/static/images/bg_comment_bottom.gif trunk/cmsiki/static/images/bg_header.gif trunk/cmsiki/static/images/bg_header_alt.gif trunk/cmsiki/static/images/bg_narrowcol.gif trunk/cmsiki/static/images/bg_narrowcol_bottom.gif trunk/cmsiki/static/images/bg_narrowcol_top.gif trunk/cmsiki/static/images/bg_page_bottom.gif trunk/cmsiki/static/images/bg_page_top.gif trunk/cmsiki/static/images/bg_tab_left.gif trunk/cmsiki/static/images/bg_tab_right.gif trunk/cmsiki/static/images/bg_ul_li.gif trunk/cmsiki/static/images/feed_icon.png trunk/cmsiki/static/images/user_comment.gif trunk/cmsiki/templates/base.html Modified: trunk/cmsiki/apps/story/models.py =================================================================== --- trunk/cmsiki/apps/story/models.py 2007-03-22 19:41:51 UTC (rev 5) +++ trunk/cmsiki/apps/story/models.py 2007-03-24 12:03:56 UTC (rev 6) @@ -34,4 +34,4 @@ search_fields = ('title','body') def get_absolute_url(self): - return '/%s/%s/' % (self.pub_date.strftime("%Y/%b/%d").lower(), self.slug) + return '/%s/%s/' % (self.pub_date.strftime("%Y/%m/%d").lower(), self.slug) Modified: trunk/cmsiki/settings.py =================================================================== --- trunk/cmsiki/settings.py 2007-03-22 19:41:51 UTC (rev 5) +++ trunk/cmsiki/settings.py 2007-03-24 12:03:56 UTC (rev 6) @@ -29,11 +29,11 @@ # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' +MEDIA_ROOT = '/home/cnu/projects/python/django/cmsiki/static' # URL that handles the media served from MEDIA_ROOT. # Example: "http://media.lawrence.com" -MEDIA_URL = '' +MEDIA_URL = 'http://localhost:8000/static/' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. Added: trunk/cmsiki/static/css/style.css =================================================================== --- trunk/cmsiki/static/css/style.css (rev 0) +++ trunk/cmsiki/static/css/style.css 2007-03-24 12:03:56 UTC (rev 6) @@ -0,0 +1,402 @@ +/* +Theme Name: Digg 3 Columns +Theme URI: http://www.wpdesigner.com +Description: Digg-like 3 Columns Wordpress theme created by Small Potato (WPDesigner.com) +Version: 1.0.1 +Author: Small Potato +Author URI: http://www.wpdesigner.com/ + + This theme is released under Creative Commons Attribution 2.5 License. + +*/ + +body, h1, h2, h3, h4, h5, h6, address, blockquote, dd, dl, hr, p, form{ + margin: 0; + padding: 0; +} + +body{ + font-family: Arial, Helvetica, Georgia, Sans-Serif; + font-size: 12px; + text-align: center; + vertical-align: top; + background: #666 url(../images/bg_body.gif); + color: #fff; +} + +h1, h2, h3, h4, h5, h6{ + font-family: Arial, Helvetica, Georgia, Sans-Serif; + font-size: 16px; +} + +a{ + text-decoration: underline; + color: #105cb6; +} + +a:hover{ text-decoration: none; } + +a img{ border: 0; } + +abbr, acronym{ border: 0; } + +address, dl, p{ padding: 10px 0 0; } + +blockquote{ + margin: 10px 10px 0; + background: #fffada url(../images/bg_blockquote.gif) no-repeat 5px 7px; + color: #736926; +} + +blockquote p{ + padding: 10px 10px 10px 20px; +} + +blockquote blockquote{ + margin: 10px 20px; + background: #fff; + color: #333; +} + +blockquote blockquote p{ padding: 10px; } + +code{ + background: #f9f9f9; +} + +dt{ + font-weight: bold; +} + +dd{ + padding: 0 0 5px 15px; +} + +hr{ + clear: both; + margin: 15px 0 5px; + width: 100%; + border: 0; + height: 1px; + text-align: left; + background: url(../images/bg_comment_bottom.gif) no-repeat; +} + +small{ + font-size: 10px; +} + +input, textarea{ + font-family: Arial, Helvetica, Georgia, sans-serif; + font-size: 12px; + padding: 2px; +} + +input#author, input#email, input#url, textarea#comment{ + border: 1px solid #cbb945; + background-color: #fffadb; + padding: 3px; +} + +input#author, input#email, input#url{ + margin: 0 5px 0 0; +} + +#container, #header, #menu, #menu ul li, #menu ul li a, #pagetitle, h1, #syndication, .pagewrapper, .page, .wrapper, .narrowcolumnwrapper, .narrowcolumn, .content, .post, .entry, .browse, sidebar{ + text-align: left; + vertical-align: top; +} + +#container{ + margin: 0 auto; + width: 904px; + padding: 10px 0 0; +} + +#header{ + margin: 0 0 10px; + float: left; + width: 904px; + height: 250px; + background: url(../images/bg_header.gif) no-repeat left bottom; + color: #333; +} + +#menu ul{ + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +#menu ul li{ + float: left; + margin: 0 5px 0 0; + font-size: 14px; + font-weight: bold; + background: url(../images/bg_tab_right.gif) no-repeat right top; + color: #325b0a; +} + +#menu ul li a{ + display: block; + padding: 14px 20px 10px; + text-decoration: none; + background: url(../images/bg_tab_left.gif) no-repeat left top; + color: #325b0a; +} + +#menu ul li a:hover{ + text-decoration: underline; +} + +#pagetitle{ + clear: both; + width: 904px; + height: 155px; +} + +#pagetitle h1{ + padding: 36px 28px 0; + font-size: 24px; + font-weight: bold; + letter-spacing: 1px; + text-transform: uppercase; + color: #fff; +} + +#pagetitle h1 a{ + text-decoration: none; + color: #fff; +} + +#syndication{ + float: left; + padding: 15px 31px 0; + color: #999; +} + +#syndication a{ color: #666; } + +#syndication a.feed{ + padding: 0 0 0 19px; + background: url(../images/feed_icon.png) no-repeat 0 1px; +} + +#searchbox{ + float: right; + padding: 10px 31px 0; +} + +#searchbox input#s{ + border: 1px solid #ddd; + padding: 3px; + background: #fff; +} + +#searchbox input#searchsubmit{ height: 24px; } + +.pagewrapper{ + margin: 0 0 10px; + float: left; + width: 904px; + background: #fff url(../images/bg_page_bottom.gif) no-repeat left bottom; + color: #333; +} + +.page{ + float: left; + padding: 0 5px 5px; + background: url(../images/bg_page_top.gif) no-repeat; +} + +.wrapper{ /* This wrapper class appears only on Page and Single Post pages. */ + float: left; + width: 500px; +} + +.narrowcolumnwrapper{ + margin: 5px 0 0; + float: left; + width: 500px; + background: #fff url(../images/bg_narrowcol.gif) repeat-y; +} + +.narrowcolumn{ + float: left; + width: 500px; + background: url(../images/bg_narrowcol_bottom.gif) no-repeat left bottom; +} + +.content{ + float: left; + width: 500px; + background: url(../images/bg_narrowcol_top.gif) no-repeat left top; +} + +.post{ + padding: 9px 16px 15px; + line-height: 18px; +} + +.post h2{ + padding: 0 0 2px; + font-size: 16px; + font-weight: bold; + line-height: 27px; +} + +.post h2 a{ + text-decoration: none; + color: #105cb6; + border-bottom: 1px solid #75abea; +} + +.post img{ + padding: 4px; + border: 1px solid #ddd; + background: #fff; +} + +.post img.alignleft{ + float: left; + margin: 5px 10px 0 0; +} + +.post img.alignright{ + float: right; + margin: 5px 0 0 10px; +} + +.post img.wp-smiley{ + padding: 0; + border: 0; + background: none; +} + +.entry{} + +.entry h1, .entry h2, .entry h3, .entry h4, .entry h5, .entry h6{ + padding: 9px 0 0; +} + +.entry h1{ + font-size: 20px; + line-height: 30px; +} + +.entry h2{ line-height: 18px; } + +.entry h3{ font-size: 14px; } + +.entry h4{ font-size: 12px; } + +.entry h5{ font-size: 11px; } + +.entry h6{ font-size: 10px; } + +.postinfo{ + font-size: 11px; + color: #999; +} + +.postinfo a{ + color: #578cca; +} + +.postdate{ color: #a12a2a; } + +.browse{ + border-top: 1px solid #bdbdbd; + padding: 15px 16px; + line-height: 18px; +} + +.sidebar, .obar{ + margin: 0 0 0 5px; + float: right; + width: 192px; + line-height: 18px; +} + +.obar{ + margin: 0 5px 0 0; + float: left; +} + +.sidebar ul, .obar ul{ + margin: 0; + padding: 0; + list-style: none; +} + +.sidebar ul li, .obar ul li{ + margin: 5px 0 0; + padding: 9px 16px 15px; + background: url(../images/bg_ul_li.gif) no-repeat left top; +} + +.sidebar ul li.widget_search, .obar ul li{ + padding: 15px 16px; +} + +.sidebar ul li h2, .obar ul li h2{ + font-size: 16px; + font-weight: bold; + line-height: 27px; + color: #8dab3b; +} + +.sidebar ul ul li, .obar ul ul li{ + margin: 0; + padding: 6px 0 3px; + background: none; +} + +.sidebar ul ul ul, .obar ul ul ul{ padding: 3px 0 0; } + +.sidebar ul ul ul li, .obar ul ul ul li{ + padding: 6px 0px 3px 15px; + background: url(../images/bg_arrow_right.gif) no-repeat 0px 8px; +} + +.sidebar ul ul ul ul li, .obar ul ul ul li{ + background: url(../images/bg_arrow_right_2.gif) no-repeat 0px 8px; +} + +/* COMMENTS TEMPLATE */ + +.post h3#comments, .post h3#respond{ + padding: 0 0 2px 19px; + line-height: 27px; + background: url(../images/user_comment.gif) no-repeat 0 6px; + color: #e45b00; +} + +.post h3#respond{ + background: url(../images/add_comment.gif) no-repeat 0 6px; + color: #333; +} + +ol.commentlist{ + margin: 0 0 11px; + padding:0; + list-style: none; +} + +ol.commentlist li{ + padding: 13px 0; + background: url(../images/bg_comment_bottom.gif) no-repeat left bottom; +} + +ol.commentlist li .commentmetadata{ + font-size: 11px; + color: #546477; +} + +ol.commentlist li .commentmetadata a{ + color: #546477; +} + +form#commentform small{ + font-size: 11px; +} \ No newline at end of file Added: trunk/cmsiki/static/images/add_comment.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/add_comment.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_arrow_right.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_arrow_right.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_arrow_right_2.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_arrow_right_2.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_blockquote.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_blockquote.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_body.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_body.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_comment_bottom.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_comment_bottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_header.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_header.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_header_alt.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_header_alt.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_narrowcol.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_narrowcol.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_narrowcol_bottom.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_narrowcol_bottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_narrowcol_top.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_narrowcol_top.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_page_bottom.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_page_bottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_page_top.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_page_top.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_tab_left.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_tab_left.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_tab_right.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_tab_right.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/bg_ul_li.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/bg_ul_li.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/feed_icon.png =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/feed_icon.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/static/images/user_comment.gif =================================================================== (Binary files differ) Property changes on: trunk/cmsiki/static/images/user_comment.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/cmsiki/templates/base.html =================================================================== --- trunk/cmsiki/templates/base.html (rev 0) +++ trunk/cmsiki/templates/base.html 2007-03-24 12:03:56 UTC (rev 6) @@ -0,0 +1,222 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>cmsiki - {% block title %}{% endblock %}</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + + <link rel="stylesheet" href="/static/css/style.css" + type="text/css" media="screen" /> + + <!-- <link rel="alternate" type="application/rss+xml" title="RSS + 2.0" href="http://localhost/wordpress/?feed=rss2" /> + <link rel="alternate" type="text/xml" title="RSS .92" + href="http://localhost/wordpress/?feed=rss" /> + <link rel="alternate" type="application/atom+xml" title="Atom 0.3" + href="http://localhost/wordpress/?feed=atom" /> --> + </head> + <body> + <div id="container" > + <div id="header"> + <div id="menu"> + <ul> + <li><a href="http://localhost:8000/" + title="home">Home</a></li> + <li><a href="http://localhost:8000/about" + title="About">About</a></li> + </ul> + </div> + + <div id="pagetitle"> + <h1><a href="http://localhost:8000/" title="test">cmsiki</a></h1> + </div> + + <div id="syndication"> + <a href="http://localhost/wordpress/?feed=rss2" + title="Syndicate this site using RSS" + class="feed">Entries <abbr title="Really Simple + Syndication">RSS</abbr></a> + </div> + <div id="searchbox"> + <form method="get" id="searchform" action="http://localhost/wordpress/"> + <div> + <input value="" name="s" id="s" type="text" /> + <input id="searchsubmit" value="Search" type="submit" /> + </div> + </form> + </div> + </div> + + <div class="pagewrapper"> + <div class="page"> + + <!-- Start Obar --> + + <div class="obar"> + <ul> + + + <li class="pagenav"> + <h2>Pages</h2> + {% block pages %} + <ul> + <li class="page_item"> + <a href="http://localhost/wordpress/?page_id=2" + title="About">About</a> + </li> + </ul> + {% endblock %} + </li> + <li> + <h2>Categories</h2> + {% block categories %} + <ul> + <li><a href="http://localhost/wordpress/?cat=2" + title="View all posts filed under foo">foo</a> (1) + </li> + <li><a href="http://localhost/wordpress/?cat=3" + title="View all posts filed under foo">bar</a> (1) + </li> + <li><a href="http://localhost/wordpress/?cat=1" + title="View all posts filed under baz">baz</a> (3) + </li> + </ul> + {% endblock %} + </li> + + <li> + <h2>Month Archives</h2> + {% block montharchives %} + <ul> + <li><a href="http://localhost:8000/2007/03" + title="March 2007">March 2007</a> + </li> + <li><a href="http://localhost:8000/2007/02" + title="February 2007">February 2007</a> + </li> + </ul> + {% endblock %} + </li> + <li> + <h2>Year Archives</h2> + {% block yeararchives %} + <ul> + <li><a href="http://localhost:8000/2007" + title="2007">2007</a> + </li> + </ul> + {% endblock %} + </li> + </ul> + </div> + + <!-- End Obar --> + + <div class="narrowcolumnwrapper"> + <div class="narrowcolumn"> + {% block content %} + <div class="content"> + {% block post %} + <div class="post"> + + <h2><a href="http://localhost/wordpress/?p=4" rel="bookmark" title="New Digg theme">New Digg theme</a></h2> + + <div class="postinfo"> + Posted on <span class="postdate">March 23rd, + 2007</span> by srinivasanr + | <a + href="http://localhost/wordpress/wp-admin/post.php?action=edit&post=4">Edit</a> + </div> + + <div class="entry"> + + <p><span>I am trying out this new Digg theme which I + found over + at <a + href="http://www.wpdesigner.com/">http://www.wpdesigner.com/</a></span></p> + <p>This site has over 40 free downloadable + theme. The task is now to port this over to cmsiki + </p> + + <p class="postinfo"> + Filed + under: <a href="http://localhost/wordpress/?cat=1" + title="View all posts in Uncategorized" + rel="category + tag">Uncategorized</a>, + <a href="http://localhost/wordpress/?cat=2" + title="View all posts in cmsiki" + rel="category tag">cmsiki</a>, + <a href="http://localhost/wordpress/?cat=3" + title="View all posts in themes" rel="category + tag">themes</a> | + <a + href="http://localhost/wordpress/?p=4#respond" + title="Comment on New Digg theme">No Comments + »</a> + </p> + </div> + </div> + {% endblock %} + </div><!-- End content --> + {% endblock %} + </div> + </div><!-- End narrowcolumnwrapper and narrowcolumn classes --> + + <!-- Start Sidebar --> + + <div class="sidebar"> + <ul> + + + + <li id="linkcat-1"> + <h2>Blogroll</h2> + {% block blogroll %} + <ul> + <li><a href="http://zed1.com/journalized/">Mike</a></li> + <li><a href="http://blogs.linux.ie/xeer/">Donncha</a></li> + <li><a href="http://boren.nu/">Ryan</a></li> + <li><a href="http://www.alexking.org/">Alex</a></li> + <li><a href="http://zengun.org/weblog/">Michel</a></li> + <li><a href="http://dougal.gunters.org/">Dougal</a></li> + <li><a href="http://photomatt.net/">Matt</a></li> + </ul> + {% endblock %} + </li> + + + <li> + <h2>Meta</h2> + {% block meta %} + <ul> + <li><a href="http://localhost:8000/admin/">Admin</a></li> + <li><a + href="http://localhost/wordpress/wp-login.php?action=logout"> + Logout</a></li> + <li><a href="http://validator.w3.org/check/referer" + title="This page validates as XHTML 1.0 + Transitional"> + Valid <abbr title="eXtensible HyperText Markup + Language">XHTML</abbr></a></li> + <li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li> + <li><a href="http://wordpress.org/" title="Powered + by WordPress, state-of-the-art semantic personal + publishing platform."> WordPress</a></li> + <li><a href="http://www.wpdesigner.com/" title="Theme by WPDesigner">WPDesigner</a></li> + </ul> + {% endblock %} + </li> + + </ul> + </div> + + <!-- End Sidebar --> + </div> + </div><!-- End pagewrapper and page classes --> + + </div><!-- End container id --> + + + </body> +</html> Modified: trunk/cmsiki/templates/story/story_archive.html =================================================================== --- trunk/cmsiki/templates/story/story_archive.html 2007-03-22 19:41:51 UTC (rev 5) +++ trunk/cmsiki/templates/story/story_archive.html 2007-03-24 12:03:56 UTC (rev 6) @@ -1,7 +1,15 @@ -<h1>Latest entries</h1> +{% extends "base.html" %} +{% block title %}Home{% endblock %} -{% for story in latest %} +{% block post %} + {% for story in latest %} + <div class="post"> <h2><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h2> + <div class="postinfo">Posted on <span class="postdate">{{ story.pub_date|date:"F j, Y" }}</span> by <strong>{{ story.author }}</strong></div> + {{ story.body }} - <p class="date small">Posted by <strong>{{ story.author }}</strong> on {{ story.pub_date|date:"F j, Y" }} </p> -{% endfor %} \ No newline at end of file + + </div> +{% endfor %} +</div> +{% endblock %} Modified: trunk/cmsiki/templates/story/story_archive_day.html =================================================================== --- trunk/cmsiki/templates/story/story_archive_day.html 2007-03-22 19:41:51 UTC (rev 5) +++ trunk/cmsiki/templates/story/story_archive_day.html 2007-03-24 12:03:56 UTC (rev 6) @@ -1,9 +1,16 @@ -<h1>{{ day|date:"F j" }} archive</h1> +{% extends "base.html" %} +{% block title %}{{ day|date:"F j" }} archive{% endblock %} +{% block content %} +<div class="content"> + {% for story in object_list %} + <div class="post"> + <h2><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h2> + <div class="postinfo">Posted on <span class="postdate">{{ story.pub_date|date:"F j, Y" }}</span> by <strong>{{ story.author }}</strong></div> -{% for story in object_list %} -<h2><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h2> -<p class="small date">{{ story.pub_date|date:"F j, Y" }}</p> -{{ story.body }} + {{ story.body }} -{% endfor %} + </div> + {% endfor %} +</div> +{% endblock content%} Modified: trunk/cmsiki/templates/story/story_archive_month.html =================================================================== --- trunk/cmsiki/templates/story/story_archive_month.html 2007-03-22 19:41:51 UTC (rev 5) +++ trunk/cmsiki/templates/story/story_archive_month.html 2007-03-24 12:03:56 UTC (rev 6) @@ -1,9 +1,16 @@ -<h1>{{ month|date:"F" }} archive</h1> +{% extends "base.html" %} +{% block title %}{{ month|date:"F" }} month archive{% endblock %} +{% block content %} +<div class="content"> -{% for story in object_list %} -<h2><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h2> -<p class="small date">{{ story.pub_date|date:"F j, Y" }}</p> -{{ story.body }} + {% for story in object_list %} + <div class="post"> + <h2><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h2> + <div class="postinfo">Posted on <span class="postdate">{{ story.pub_date|date:"F j, Y" }}</span> by <strong>{{ story.author }}</strong></div> -{% endfor %} + {{ story.body }} + </div> + {% endfor %} +</div> +{% endblock %} Modified: trunk/cmsiki/templates/story/story_archive_year.html =================================================================== --- trunk/cmsiki/templates/story/story_archive_year.html 2007-03-22 19:41:51 UTC (rev 5) +++ trunk/cmsiki/templates/story/story_archive_year.html 2007-03-24 12:03:56 UTC (rev 6) @@ -1,7 +1,13 @@ -<h1>{{ year }} archive</h1> - -<ul class="linklist"> -{% for date in date_list %} -<li><a href="{{ date|date:"M"|lower }}/">{{ date|date:"F" }}</a></li> -{% endfor %} -</ul> \ No newline at end of file +{% extends "base.html" %} +{% block title %}Year archive{% endblock %} +{% block post %} +<div class="post"> + + <ul class="linklist"> + {% for date in date_list %} + <li><a href="{{ date|date:"m" }}/">{{ date|date:"F" }}</a></li> + {% endfor %} + </ul> + +</div> +{% endblock %} Modified: trunk/cmsiki/templates/story/story_detail.html =================================================================== --- trunk/cmsiki/templates/story/story_detail.html 2007-03-22 19:41:51 UTC (rev 5) +++ trunk/cmsiki/templates/story/story_detail.html 2007-03-24 12:03:56 UTC (rev 6) @@ -1,3 +1,17 @@ -<h1>{{ object.title }}</h1> -{{ object.body }} -<p class="date small">Posted by <strong>{{ object.author }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p> \ No newline at end of file +{% extends "base.html" %} +{% block title %}{{ object.title }}{% endblock %} + +{% block post %} +<div class="post"> + <h2><a href="{{ object.get_absolute_url }}">{{ object.title }}</a></h2> + <div class="postinfo"> + <div class="postinfo">Posted on <span class="postdate">{{ object.pub_date|date:"F j, Y" }}</span> by <strong>{{ object.author }}</strong></div> + + </div> + <div class="entry"> + + {{ object.body }} + + </div> +</div> +{% endblock %} Modified: trunk/cmsiki/urls.py =================================================================== --- trunk/cmsiki/urls.py 2007-03-22 19:41:51 UTC (rev 5) +++ trunk/cmsiki/urls.py 2007-03-24 12:03:56 UTC (rev 6) @@ -1,5 +1,6 @@ from django.conf.urls.defaults import * from cmsiki.apps.story.models import Story +from django.conf import settings info_dict = { 'queryset': Story.objects.all(), @@ -13,9 +14,15 @@ # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), - (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[-\w]+)/$', 'object_detail', dict(info_dict, slug_field='slug')), - (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/$', 'archive_day', info_dict), - (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/$', 'archive_month', info_dict), - (r'^(?P<year>\d{4})/$', 'archive_year', info_dict), - (r'^/?$', 'archive_index', info_dict), -) \ No newline at end of file +# (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[-\w]+)/$', 'object_detail', dict(info_dict, slug_field='slug')), + (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/$', 'object_detail', dict(info_dict, month_format='%m', slug_field='slug')), + (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{1,2})/$', 'archive_day', dict(info_dict, month_format='%m')), + (r'^(?P<year>\d{4})/(?P<month>\d{2})/$', 'archive_month', dict(info_dict, month_format='%m')), + (r'^(?P<year>\d{4})/$', 'archive_year', info_dict), + (r'^/?$', 'archive_index', info_dict), +) + +if settings.DEBUG: + urlpatterns += patterns('', + (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/cnu/projects/python/django/cmsiki/static/', 'show_indexes':True}), + ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |