cmsiki-svn Mailing List for CMSiki
Status: Pre-Alpha
Brought to you by:
cnu
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
(20) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: <cn...@us...> - 2007-04-15 19:31:00
|
Revision: 26
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=26&view=rev
Author: cnu
Date: 2007-04-15 12:30:58 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
Added getRecentChanges function to cmsikireplace module
Modified Paths:
--------------
trunk/cmsiki/cmsikireplace.py
Modified: trunk/cmsiki/cmsikireplace.py
===================================================================
--- trunk/cmsiki/cmsikireplace.py 2007-04-15 16:59:49 UTC (rev 25)
+++ trunk/cmsiki/cmsikireplace.py 2007-04-15 19:30:58 UTC (rev 26)
@@ -181,6 +181,47 @@
return str(page_string_info)
+def getRecentChanges(tag):
+ '''Returns a list of all the changed pages till the given date.'''
+ date_pattern = re.compile(r':\d+@')
+ wiki_pattern = re.compile('@[a-zA-Z]+\]')
+ date_match = date_pattern.findall(tag)[0]
+ date = date_match[1:-1]
+ wiki_match = wiki_pattern.findall(tag)[0]
+ wiki_name = wiki_match[1:-1]
+ try:
+ wiki = wikirpc(wiki_name)
+ except WikiNameError:
+ return ''
+ srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
+ try:
+ recent_changes = srcwiki.getRecentChanges(date)
+ table_begin = '''
+ <table class="recentchanges">
+ <tr>
+ <th>Name</th>
+ <th>Author</th>
+ <th>Version</th>
+ <th>Last Modified</th>
+ </tr>'''
+ except httplib.socket.error:
+ recent_changes = ''
+ table_begin = ''
+ row_pages = []
+ for page in recent_changes:
+ row = '''<tr>
+ <td>%s</td>
+ <td>%s</td>
+ <td>%s</td>
+ <td>%s</td>
+ </tr>''' %(page['name'], page['author'], page['version'], page['lastModified'])
+ row_pages.append(row)
+ table_middle = "\n".join(row_pages)
+ table_end = "</table>"
+ table = table_begin + table_middle + table_end
+ return table
+
+
def getLink(tag):
'''Returns the URL of the page in a particular wiki.'''
page_pattern = re.compile(':\w+@')
@@ -197,6 +238,8 @@
return "<a href=\"%s\">%s</a>" %(wikiurl, page_name)
+
+
dict_func = {'getPage':getPage,
'getPageHTML':getPageHTML,
'getPageInfo':getPageInfo,
@@ -204,7 +247,7 @@
'getPageVersion':getPageVersion,
'getPageInfoVersion':getPageInfoVersion,
'getPageHTMLVersion':getPageHTMLVersion,
-
+ 'getRecentChanges':getRecentChanges,
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-04-15 16:59:52
|
Revision: 25
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=25&view=rev
Author: cnu
Date: 2007-04-15 09:59:49 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
Implemented getPageVersion, getPageInfoVersion, getPageHTMLVersion to
cmsikireplace.
Moved ordering of sites app in admin page.
Modified Paths:
--------------
trunk/cmsiki/cmsikireplace.py
trunk/cmsiki/settings.py
Modified: trunk/cmsiki/cmsikireplace.py
===================================================================
--- trunk/cmsiki/cmsikireplace.py 2007-04-04 17:57:21 UTC (rev 24)
+++ trunk/cmsiki/cmsikireplace.py 2007-04-15 16:59:49 UTC (rev 25)
@@ -58,9 +58,36 @@
page_html_content = ''
page_html_content = page_html_content.replace('<a class="nonexistent" href="/','<a class="nonexistent" href="%s' %(wiki['url']))
return page_html_content.replace('<a href="/','<a href="%s' %(wiki['url']))
-
+
+def getPageHTMLVersion(tag):
+ '''Returns the page contents as rendered HTML during that particular version.
+
+ tag is of the following format [getPageHTMLVersion:PageName,version@WikiName].'''
+ page_pattern = re.compile(r':\w+,\d+@')
+ wiki_pattern = re.compile('@[a-zA-Z]+\]')
+ page_match = page_pattern.findall(tag)[0]
+ page_version_name = page_match[1:-1]
+ page_name = page_version_name.split(',')[0]
+ version = int(page_version_name.split(',')[1])
+ wiki_match = wiki_pattern.findall(tag)[0]
+ wiki_name = wiki_match[1:-1]
+ try:
+ wiki = wikirpc(wiki_name)
+ except WikiNameError:
+ return ''
+ srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
+ try:
+ page_html_content = srcwiki.getPageHTMLVersion(page_name,version)
+ except httplib.socket.error:
+ page_html_content = ''
+ page_html_content = page_html_content.replace('<a class="nonexistent" href="/','<a class="nonexistent" href="%s' %(wiki['url']))
+ return page_html_content.replace('<a href="/','<a href="%s' %(wiki['url']))
+
+
def getPage(tag):
- '''Returns the page contents from the wiki as WikiText.'''
+ '''Returns the page contents from the wiki as WikiText.
+
+ tag is of the following format [getPage:PageName@WikiName].'''
page_pattern = re.compile(':\w+@')
wiki_pattern = re.compile('@[a-zA-Z]+\]')
page_match = page_pattern.findall(tag)[0]
@@ -78,6 +105,33 @@
page_content = ''
return page_content.replace('\n','<br/>')
+
+def getPageVersion(tag):
+ '''Returns the page contents as raw text during that particular version.
+
+ tag is of the following format [getPageVersion:PageName,version@WikiName].'''
+ page_pattern = re.compile(r':\w+,\d+@')
+ wiki_pattern = re.compile('@[a-zA-Z]+\]')
+ page_match = page_pattern.findall(tag)[0]
+ page_version_name = page_match[1:-1]
+ page_name = page_version_name.split(',')[0]
+ version = int(page_version_name.split(',')[1])
+ wiki_match = wiki_pattern.findall(tag)[0]
+ wiki_name = wiki_match[1:-1]
+ try:
+ wiki = wikirpc(wiki_name)
+ except WikiNameError:
+ return ''
+ srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
+ try:
+ page_content = srcwiki.getPageVersion(page_name,version)
+ except httplib.socket.error:
+ page_content = ''
+ return page_content.replace('\n','<br/>')
+
+
+
+
def getPageInfo(tag):
'''Return the page contents from the wiki as WikiText.'''
page_pattern = re.compile(':\w+@')
@@ -100,6 +154,33 @@
%(page_info['name'], page_info['author'], page_info['version'])
return str(page_string_info)
+def getPageInfoVersion(tag):
+ '''Returns the page info during that particular version.
+
+ tag is of the following format [getPageInfoVersion:PageName,version@WikiName].'''
+ page_pattern = re.compile(r':\w+,\d+@')
+ wiki_pattern = re.compile('@[a-zA-Z]+\]')
+ page_match = page_pattern.findall(tag)[0]
+ page_version_name = page_match[1:-1]
+ page_name = page_version_name.split(',')[0]
+ version = int(page_version_name.split(',')[1])
+ wiki_match = wiki_pattern.findall(tag)[0]
+ wiki_name = wiki_match[1:-1]
+ try:
+ wiki = wikirpc(wiki_name)
+ except WikiNameError:
+ return ''
+ srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
+ try:
+ page_info = srcwiki.getPageInfoVersion(page_name,version)
+ except httplib.socket.error:
+ page_info = ''
+ # return the wiki page info in a string format
+ page_string_info = 'PageName: %s <br/>\nAuthor: %s <br/>\nVersion: %s \n' \
+ %(page_info['name'], page_info['author'], page_info['version'])
+ return str(page_string_info)
+
+
def getLink(tag):
'''Returns the URL of the page in a particular wiki.'''
page_pattern = re.compile(':\w+@')
@@ -117,16 +198,20 @@
dict_func = {'getPage':getPage,
- 'getPageHTML':getPageHTML,
- 'getPageInfo':getPageInfo,
- 'getLink':getLink,
+ 'getPageHTML':getPageHTML,
+ 'getPageInfo':getPageInfo,
+ 'getLink':getLink,
+ 'getPageVersion':getPageVersion,
+ 'getPageInfoVersion':getPageInfoVersion,
+ 'getPageHTMLVersion':getPageHTMLVersion,
+
}
def tagreplace(originaltext):
'''Replace the originaltext with text from wiki.'''
wikireplacelist = []
- tagpattern = re.compile('\[[a-zA-Z]+:\w+@[a-zA-Z]+\]')
+ tagpattern = re.compile(r'\[[a-zA-Z]+:\w+@[a-zA-Z]+\]|\[[a-zA-Z]+:\w+,\d+@[a-zA-Z]+\]')
tagmatches = tagpattern.findall(originaltext) # find list of all import tags
methodpattern = re.compile('\[[a-zA-Z]+')
for tag in tagmatches:
Modified: trunk/cmsiki/settings.py
===================================================================
--- trunk/cmsiki/settings.py 2007-04-04 17:57:21 UTC (rev 24)
+++ trunk/cmsiki/settings.py 2007-04-15 16:59:49 UTC (rev 25)
@@ -69,12 +69,12 @@
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
- 'django.contrib.sites',
'django.contrib.admin',
'cmsiki.apps.page',
'cmsiki.apps.story',
'django.contrib.comments',
'cmsiki.apps.blogroll',
+ 'django.contrib.sites',
)
# Comments: to get the URL of the current page a template variable
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-04-04 17:57:22
|
Revision: 24
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=24&view=rev
Author: cnu
Date: 2007-04-04 10:57:21 -0700 (Wed, 04 Apr 2007)
Log Message:
-----------
Added doc strings to models
rearranged apps in admin interface
added getLink markup tag to cmsikireplace
Modified Paths:
--------------
trunk/cmsiki/apps/blogroll/models.py
trunk/cmsiki/apps/page/models.py
trunk/cmsiki/apps/story/models.py
trunk/cmsiki/cmsikireplace.py
trunk/cmsiki/settings.py
Modified: trunk/cmsiki/apps/blogroll/models.py
===================================================================
--- trunk/cmsiki/apps/blogroll/models.py 2007-04-02 18:07:33 UTC (rev 23)
+++ trunk/cmsiki/apps/blogroll/models.py 2007-04-04 17:57:21 UTC (rev 24)
@@ -3,6 +3,7 @@
# Create your models here.
class Blog(models.Model):
+ '''To create a list of links to weblogs and other related websites.'''
name = models.CharField(maxlength=50)
url = models.URLField(verify_exists=False)
description = models.CharField(maxlength=100, blank=True)
Modified: trunk/cmsiki/apps/page/models.py
===================================================================
--- trunk/cmsiki/apps/page/models.py 2007-04-02 18:07:33 UTC (rev 23)
+++ trunk/cmsiki/apps/page/models.py 2007-04-04 17:57:21 UTC (rev 24)
@@ -20,6 +20,7 @@
class Page(models.Model):
+ '''The Page model allows a way to create permanent pages in the website which can be accessed by using the slug field.'''
title = models.CharField(maxlength=150)
body = models.TextField()
slug = models.SlugField(prepopulate_from=('title',))
Modified: trunk/cmsiki/apps/story/models.py
===================================================================
--- trunk/cmsiki/apps/story/models.py 2007-04-02 18:07:33 UTC (rev 23)
+++ trunk/cmsiki/apps/story/models.py 2007-04-04 17:57:21 UTC (rev 24)
@@ -5,6 +5,7 @@
# Create your models here.
class Category(models.Model):
+ '''To categorise the stories under a single category. Will be accessed by the slug field.'''
name = models.CharField(maxlength=50)
description = models.CharField(maxlength=200)
slug = models.SlugField(prepopulate_from=('name',))
@@ -16,6 +17,9 @@
list_display = ('name', 'description', 'slug')
class Story(models.Model):
+ '''A model for creating news articles in the website.
+
+ This is sorted by reverse chronological order and belongs to a single Category. Accessible using the date published and the slug field.'''
title = models.CharField(maxlength=150)
body = models.TextField()
category = models.ForeignKey(Category)
Modified: trunk/cmsiki/cmsikireplace.py
===================================================================
--- trunk/cmsiki/cmsikireplace.py 2007-04-02 18:07:33 UTC (rev 23)
+++ trunk/cmsiki/cmsikireplace.py 2007-04-04 17:57:21 UTC (rev 24)
@@ -100,10 +100,26 @@
%(page_info['name'], page_info['author'], page_info['version'])
return str(page_string_info)
+def getLink(tag):
+ '''Returns the URL of the page in a particular wiki.'''
+ page_pattern = re.compile(':\w+@')
+ wiki_pattern = re.compile('@[a-zA-Z]+\]')
+ page_match = page_pattern.findall(tag)[0]
+ page_name = page_match[1:-1]
+ wiki_match = wiki_pattern.findall(tag)[0]
+ wiki_name = wiki_match[1:-1]
+ try:
+ wiki = wikirpc(wiki_name)
+ except WikiNameError:
+ return ''
+ wikiurl = wiki['url'] + page_name
+ return "<a href=\"%s\">%s</a>" %(wikiurl, page_name)
+
dict_func = {'getPage':getPage,
'getPageHTML':getPageHTML,
- 'getPageInfo':getPageInfo
+ 'getPageInfo':getPageInfo,
+ 'getLink':getLink,
}
Modified: trunk/cmsiki/settings.py
===================================================================
--- trunk/cmsiki/settings.py 2007-04-02 18:07:33 UTC (rev 23)
+++ trunk/cmsiki/settings.py 2007-04-04 17:57:21 UTC (rev 24)
@@ -71,9 +71,9 @@
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
+ 'cmsiki.apps.page',
+ 'cmsiki.apps.story',
'django.contrib.comments',
- 'cmsiki.apps.story',
- 'cmsiki.apps.page',
'cmsiki.apps.blogroll',
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-04-02 18:07:35
|
Revision: 23
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=23&view=rev
Author: cnu
Date: 2007-04-02 11:07:33 -0700 (Mon, 02 Apr 2007)
Log Message:
-----------
cmsikireplace returns html <br/> instead of \n.
removed published boolean field from story
added automatic permanent pages creation in template's top nav bar.
Modified Paths:
--------------
trunk/cmsiki/apps/story/models.py
trunk/cmsiki/cmsikireplace.py
trunk/cmsiki/templates/base.html
Modified: trunk/cmsiki/apps/story/models.py
===================================================================
--- trunk/cmsiki/apps/story/models.py 2007-04-02 17:29:06 UTC (rev 22)
+++ trunk/cmsiki/apps/story/models.py 2007-04-02 18:07:33 UTC (rev 23)
@@ -23,7 +23,6 @@
author = models.ForeignKey(User)
pub_date = models.DateTimeField('Publish Date')
datetime = models.DateTimeField(auto_now_add=True,editable=False)
- published = models.BooleanField()
def __str__(self):
return self.title
@@ -32,8 +31,8 @@
ordering = ['-pub_date']
class Admin:
- list_display = ('title','category','author','pub_date','published')
- list_filter = ('pub_date','author','published')
+ list_display = ('title','category','author','pub_date')
+ list_filter = ('pub_date','author')
search_fields = ('title','body')
js = ('js/tiny_mce/tiny_mce.js', 'js/textareas.js')
Modified: trunk/cmsiki/cmsikireplace.py
===================================================================
--- trunk/cmsiki/cmsikireplace.py 2007-04-02 17:29:06 UTC (rev 22)
+++ trunk/cmsiki/cmsikireplace.py 2007-04-02 18:07:33 UTC (rev 23)
@@ -24,6 +24,7 @@
'url':'http://nrcfosshelpline.in/chennaipy/',
'xmlrpc':'http://nrcfosshelpline.in/chennaipy/?action=xmlrpc2'}
]
+
class WikiNameError(Exception):
def __init__(self, value):
self.value = value
@@ -74,8 +75,8 @@
try:
page_content = srcwiki.getPage(page_name)
except httplib.socket.error:
- page_content = ''
- return page_content
+ page_content = ''
+ return page_content.replace('\n','<br/>')
def getPageInfo(tag):
'''Return the page contents from the wiki as WikiText.'''
@@ -95,7 +96,7 @@
except httplib.socket.error:
page_info = ''
# return the wiki page info in a string format
- page_string_info = 'PageName: %s \nAuthor: %s \nVersion: %s \n' \
+ page_string_info = 'PageName: %s <br/>\nAuthor: %s <br/>\nVersion: %s \n' \
%(page_info['name'], page_info['author'], page_info['version'])
return str(page_string_info)
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-04-02 17:29:06 UTC (rev 22)
+++ trunk/cmsiki/templates/base.html 2007-04-02 18:07:33 UTC (rev 23)
@@ -22,8 +22,12 @@
<ul>
<li><a href="http://localhost:8000/"
title="home">Home</a></li>
- <li><a href="http://localhost:8000/about"
- title="About">About</a></li>
+ {% for page in pages %}
+ <li class="page_item">
+ <a href="{{ page.get_absolute_url }}"
+ title="{{ page.title }}">{{ page.title }}</a>
+ </li>
+ {% endfor %}
</ul>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-04-02 17:29:07
|
Revision: 22
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=22&view=rev
Author: cnu
Date: 2007-04-02 10:29:06 -0700 (Mon, 02 Apr 2007)
Log Message:
-----------
Changed urls field in blogroll to not check for existence
Removed RSS and Search fields in base.html
Modified Paths:
--------------
trunk/cmsiki/apps/blogroll/models.py
trunk/cmsiki/templates/base.html
Modified: trunk/cmsiki/apps/blogroll/models.py
===================================================================
--- trunk/cmsiki/apps/blogroll/models.py 2007-04-02 17:20:59 UTC (rev 21)
+++ trunk/cmsiki/apps/blogroll/models.py 2007-04-02 17:29:06 UTC (rev 22)
@@ -4,7 +4,7 @@
class Blog(models.Model):
name = models.CharField(maxlength=50)
- url = models.URLField()
+ url = models.URLField(verify_exists=False)
description = models.CharField(maxlength=100, blank=True)
def __str__(self):
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-04-02 17:20:59 UTC (rev 21)
+++ trunk/cmsiki/templates/base.html 2007-04-02 17:29:06 UTC (rev 22)
@@ -31,7 +31,7 @@
<h1><a href="http://localhost:8000/" title="test">cmsiki</a></h1>
</div>
- <div id="syndication">
+<!-- <div id="syndication">
<a href="http://localhost/wordpress/?feed=rss2"
title="Syndicate this site using RSS"
class="feed">Entries <abbr title="Really Simple
@@ -45,6 +45,7 @@
</div>
</form>
</div>
+-->
</div>
<div class="pagewrapper">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-04-02 17:21:03
|
Revision: 21
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=21&view=rev
Author: cnu
Date: 2007-04-02 10:20:59 -0700 (Mon, 02 Apr 2007)
Log Message:
-----------
Added tiny mce editor to story and pages.
http://www.dehora.net/journal/2006/05/using_tinymce_in_djangos_admin.html
removed unwanted links from sidebar in base.html
Modified Paths:
--------------
trunk/cmsiki/apps/page/models.py
trunk/cmsiki/apps/story/models.py
trunk/cmsiki/templates/base.html
Modified: trunk/cmsiki/apps/page/models.py
===================================================================
--- trunk/cmsiki/apps/page/models.py 2007-03-31 07:50:31 UTC (rev 20)
+++ trunk/cmsiki/apps/page/models.py 2007-04-02 17:20:59 UTC (rev 21)
@@ -38,6 +38,7 @@
list_display = ('title','author','weight','last_modified')
list_filter = ('author', 'last_modified')
search_fields = ('title','body')
+ js = ('js/tiny_mce/tiny_mce.js', 'js/textareas.js')
def get_absolute_url(self):
'''Return the absolute URL of the page.'''
Modified: trunk/cmsiki/apps/story/models.py
===================================================================
--- trunk/cmsiki/apps/story/models.py 2007-03-31 07:50:31 UTC (rev 20)
+++ trunk/cmsiki/apps/story/models.py 2007-04-02 17:20:59 UTC (rev 21)
@@ -35,6 +35,7 @@
list_display = ('title','category','author','pub_date','published')
list_filter = ('pub_date','author','published')
search_fields = ('title','body')
+ js = ('js/tiny_mce/tiny_mce.js', 'js/textareas.js')
def get_absolute_url(self):
'''Return the absolute url of the story.'''
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-03-31 07:50:31 UTC (rev 20)
+++ trunk/cmsiki/templates/base.html 2007-04-02 17:20:59 UTC (rev 21)
@@ -176,19 +176,11 @@
{% 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>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-31 07:50:33
|
Revision: 20
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=20&view=rev
Author: cnu
Date: 2007-03-31 00:50:31 -0700 (Sat, 31 Mar 2007)
Log Message:
-----------
Corrected category links in templates to show slug
Modified Paths:
--------------
trunk/cmsiki/templates/story/category_detail.html
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_detail.html
Modified: trunk/cmsiki/templates/story/category_detail.html
===================================================================
--- trunk/cmsiki/templates/story/category_detail.html 2007-03-29 21:30:26 UTC (rev 19)
+++ trunk/cmsiki/templates/story/category_detail.html 2007-03-31 07:50:31 UTC (rev 20)
@@ -19,7 +19,7 @@
{{ story.replaced_body }}
<div class="postinfo">
- Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a> |
+ Posted under category <a href="/category/{{ story.category.slug }}">{{ story.category }}</a> |
<a href="{{ story.get_absolute_url }}">{{ comment_count }} Comments</a>
</div>
</div>
Modified: trunk/cmsiki/templates/story/story_archive.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive.html 2007-03-29 21:30:26 UTC (rev 19)
+++ trunk/cmsiki/templates/story/story_archive.html 2007-03-31 07:50:31 UTC (rev 20)
@@ -12,7 +12,7 @@
{{ story.replaced_body }}
<div class="postinfo">
- Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a> |
+ Posted under category <a href="/category/{{ story.category.slug }}">{{ story.category }}</a> |
<a href="{{ story.get_absolute_url }}">{{ comment_count }} Comments</a>
</div>
</div>
Modified: trunk/cmsiki/templates/story/story_archive_day.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_day.html 2007-03-29 21:30:26 UTC (rev 19)
+++ trunk/cmsiki/templates/story/story_archive_day.html 2007-03-31 07:50:31 UTC (rev 20)
@@ -12,7 +12,7 @@
{{ story.replaced_body }}
<div class="postinfo">
- Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a> |
+ Posted under category <a href="/category/{{ story.category.slug }}">{{ story.category }}</a> |
<a href="{{ story.get_absolute_url }}">{{ comment_count }} Comments</a>
</div>
</div>
Modified: trunk/cmsiki/templates/story/story_archive_month.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_month.html 2007-03-29 21:30:26 UTC (rev 19)
+++ trunk/cmsiki/templates/story/story_archive_month.html 2007-03-31 07:50:31 UTC (rev 20)
@@ -13,7 +13,7 @@
{{ story.replaced_body }}
<div class="postinfo">
- Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a> |
+ Posted under category <a href="/category/{{ story.category.slug }}">{{ story.category }}</a> |
<a href="{{ story.get_absolute_url }}">{{ comment_count }} Comments</a>
</div>
Modified: trunk/cmsiki/templates/story/story_detail.html
===================================================================
--- trunk/cmsiki/templates/story/story_detail.html 2007-03-29 21:30:26 UTC (rev 19)
+++ trunk/cmsiki/templates/story/story_detail.html 2007-03-31 07:50:31 UTC (rev 20)
@@ -25,7 +25,7 @@
{{ object.replaced_body }}
</div>
- <div class="postinfo">Posted under category <a href="/category/{{ object.category }}">{{ object.category }}</a>.</div>
+ <div class="postinfo">Posted under category <a href="/category/{{ object.category.slug }}">{{ object.category }}</a>.</div>
{{ category }}
<!-- </div> -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-29 21:30:28
|
Revision: 19
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=19&view=rev
Author: cnu
Date: 2007-03-29 14:30:26 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Fixed typo in comment form button
Modified Paths:
--------------
trunk/cmsiki/templates/comments/freeform.html
Modified: trunk/cmsiki/templates/comments/freeform.html
===================================================================
--- trunk/cmsiki/templates/comments/freeform.html 2007-03-29 21:00:34 UTC (rev 18)
+++ trunk/cmsiki/templates/comments/freeform.html 2007-03-29 21:30:26 UTC (rev 19)
@@ -5,7 +5,7 @@
<input type="hidden" name="options" value="{{ options }}" />
<input type="hidden" name="target" value="{{ target }}" />
<input type="hidden" name="gonzo" value="{{ hash }}" />
- <p><input type="submit" name="post" value="Preview comment" /></p>
+ <p><input type="submit" name="post" value="Post comment" /></p>
</form>
{% endif %}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-29 21:00:36
|
Revision: 18
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=18&view=rev
Author: cnu
Date: 2007-03-29 14:00:34 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Added blogroll
Modified Paths:
--------------
trunk/cmsiki/settings.py
trunk/cmsiki/templates/base.html
trunk/cmsiki/urls.py
Added Paths:
-----------
trunk/cmsiki/apps/blogroll/
trunk/cmsiki/apps/blogroll/__init__.py
trunk/cmsiki/apps/blogroll/models.py
trunk/cmsiki/apps/blogroll/views.py
Added: trunk/cmsiki/apps/blogroll/__init__.py
===================================================================
Added: trunk/cmsiki/apps/blogroll/models.py
===================================================================
--- trunk/cmsiki/apps/blogroll/models.py (rev 0)
+++ trunk/cmsiki/apps/blogroll/models.py 2007-03-29 21:00:34 UTC (rev 18)
@@ -0,0 +1,14 @@
+from django.db import models
+
+# Create your models here.
+
+class Blog(models.Model):
+ name = models.CharField(maxlength=50)
+ url = models.URLField()
+ description = models.CharField(maxlength=100, blank=True)
+
+ def __str__(self):
+ return self.name
+
+ class Admin:
+ list_display = ('name','url')
Added: trunk/cmsiki/apps/blogroll/views.py
===================================================================
--- trunk/cmsiki/apps/blogroll/views.py (rev 0)
+++ trunk/cmsiki/apps/blogroll/views.py 2007-03-29 21:00:34 UTC (rev 18)
@@ -0,0 +1 @@
+# Create your views here.
Modified: trunk/cmsiki/settings.py
===================================================================
--- trunk/cmsiki/settings.py 2007-03-29 20:45:06 UTC (rev 17)
+++ trunk/cmsiki/settings.py 2007-03-29 21:00:34 UTC (rev 18)
@@ -74,6 +74,7 @@
'django.contrib.comments',
'cmsiki.apps.story',
'cmsiki.apps.page',
+ 'cmsiki.apps.blogroll',
)
# Comments: to get the URL of the current page a template variable
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-03-29 20:45:06 UTC (rev 17)
+++ trunk/cmsiki/templates/base.html 2007-03-29 21:00:34 UTC (rev 18)
@@ -163,13 +163,9 @@
<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>
+ {% for blog in blogroll %}
+ <li><a href="{{ blog.url }}">{{ blog.name }}</a></li>
+ {% endfor %}
</ul>
{% endblock %}
</li>
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-29 20:45:06 UTC (rev 17)
+++ trunk/cmsiki/urls.py 2007-03-29 21:00:34 UTC (rev 18)
@@ -1,6 +1,7 @@
from django.conf.urls.defaults import *
from cmsiki.apps.story.models import *
from cmsiki.apps.page.models import *
+from cmsiki.apps.blogroll.models import *
from django.conf import settings
info_dict = {
@@ -11,6 +12,7 @@
'pages':Page.objects.all(),
'month_archives':Story.objects.dates('pub_date','month'),
'year_archives':Story.objects.dates('pub_date','year'),
+ 'blogroll':Blog.objects.all(),
},
}
@@ -21,6 +23,7 @@
'pages':Page.objects.all(),
'month_archives':Story.objects.dates('pub_date','month'),
'year_archives':Story.objects.dates('pub_date','year'),
+ 'blogroll':Blog.objects.all(),
},
}
@@ -31,6 +34,7 @@
'pages':Page.objects.all(),
'month_archives':Story.objects.dates('pub_date','month'),
'year_archives':Story.objects.dates('pub_date','year'),
+ 'blogroll':Blog.objects.all(),
},
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-29 20:45:15
|
Revision: 17
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=17&view=rev
Author: cnu
Date: 2007-03-29 13:45:06 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Added list of month and year archives to the side bar.
Using template tags http://www.rossp.org/blog/2006/jun/23/building-blog-django-4/
Modified Paths:
--------------
trunk/cmsiki/templates/base.html
trunk/cmsiki/urls.py
Added Paths:
-----------
trunk/cmsiki/apps/story/templatetags/
trunk/cmsiki/apps/story/templatetags/__init__.py
trunk/cmsiki/apps/story/templatetags/story_months.py
trunk/cmsiki/apps/story/templatetags/story_years.py
Added: trunk/cmsiki/apps/story/templatetags/__init__.py
===================================================================
Added: trunk/cmsiki/apps/story/templatetags/story_months.py
===================================================================
--- trunk/cmsiki/apps/story/templatetags/story_months.py (rev 0)
+++ trunk/cmsiki/apps/story/templatetags/story_months.py 2007-03-29 20:45:06 UTC (rev 17)
@@ -0,0 +1,17 @@
+from cmsiki.apps.story.models import Story
+from django.template import Library,Node
+
+register = Library()
+
+def build_month_list(parser, token):
+ """
+ {% get_month_list %}
+ """
+ return MonthMenuObject()
+
+class MonthMenuObject(Node):
+ def render(self, context):
+ context['story_months'] = Story.objects.dates("pub_date", "month")
+ return ''
+
+register.tag('get_month_list', build_month_list)
Added: trunk/cmsiki/apps/story/templatetags/story_years.py
===================================================================
--- trunk/cmsiki/apps/story/templatetags/story_years.py (rev 0)
+++ trunk/cmsiki/apps/story/templatetags/story_years.py 2007-03-29 20:45:06 UTC (rev 17)
@@ -0,0 +1,17 @@
+from cmsiki.apps.story.models import Story
+from django.template import Library,Node
+
+register = Library()
+
+def build_year_list(parser, token):
+ """
+ {% get_year_list %}
+ """
+ return YearMenuObject()
+
+class YearMenuObject(Node):
+ def render(self, context):
+ context['story_years'] = Story.objects.dates("pub_date", "year")
+ return ''
+
+register.tag('get_year_list', build_year_list)
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-03-27 20:19:28 UTC (rev 16)
+++ trunk/cmsiki/templates/base.html 2007-03-29 20:45:06 UTC (rev 17)
@@ -86,12 +86,12 @@
<h2>Month Archives</h2>
{% block montharchives %}
<ul>
- <li><a href="http://localhost:8000/2007/03"
- title="March 2007">March 2007</a>
+ {% load story_months %}{% get_month_list %}
+ {% for month in story_months %}
+ <li><a href="/{{ month|date:"Y/m/" }}"
+ title="{{ month|date:"F Y" }}">{{ month|date:"F Y" }}</a>
</li>
- <li><a href="http://localhost:8000/2007/02"
- title="February 2007">February 2007</a>
- </li>
+ {% endfor %}
</ul>
{% endblock %}
</li>
@@ -99,14 +99,17 @@
<h2>Year Archives</h2>
{% block yeararchives %}
<ul>
- <li><a href="http://localhost:8000/2007"
- title="2007">2007</a>
+ {% load story_years %}{% get_year_list %}
+ {% for year in story_years %}
+ <li><a href="/{{ year|date:"Y/" }}"
+ title="{{ year|date:"Y" }}">{{ year|date:"Y" }}</a>
</li>
+ {% endfor %}
</ul>
- {% endblock %}
- </li>
- </ul>
- </div>
+ {% endblock %}
+ </li>
+ </ul>
+ </div>
<!-- End Obar -->
@@ -128,12 +131,7 @@
<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>This is the base HTML. If this shows up in any place, then something is wrong with the templates.
</p>
<p class="postinfo">
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-27 20:19:28 UTC (rev 16)
+++ trunk/cmsiki/urls.py 2007-03-29 20:45:06 UTC (rev 17)
@@ -9,6 +9,8 @@
'extra_context':{
'categories':Category.objects.all(),
'pages':Page.objects.all(),
+ 'month_archives':Story.objects.dates('pub_date','month'),
+ 'year_archives':Story.objects.dates('pub_date','year'),
},
}
@@ -17,6 +19,8 @@
'extra_context':{
'categories':Category.objects.all(),
'pages':Page.objects.all(),
+ 'month_archives':Story.objects.dates('pub_date','month'),
+ 'year_archives':Story.objects.dates('pub_date','year'),
},
}
@@ -25,6 +29,8 @@
'extra_context':{
'categories':Category.objects.all(),
'pages':Page.objects.all(),
+ 'month_archives':Story.objects.dates('pub_date','month'),
+ 'year_archives':Story.objects.dates('pub_date','year'),
},
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-28 01:25:05
|
Revision: 15
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=15&view=rev
Author: cnu
Date: 2007-03-27 12:14:07 -0700 (Tue, 27 Mar 2007)
Log Message:
-----------
added comments to category pages
added category list page
Modified Paths:
--------------
trunk/cmsiki/templates/story/category_detail.html
trunk/cmsiki/templates/story/story_archive.html
trunk/cmsiki/urls.py
Added Paths:
-----------
trunk/cmsiki/templates/story/category_list.html
Modified: trunk/cmsiki/templates/story/category_detail.html
===================================================================
--- trunk/cmsiki/templates/story/category_detail.html 2007-03-27 19:00:54 UTC (rev 14)
+++ trunk/cmsiki/templates/story/category_detail.html 2007-03-27 19:14:07 UTC (rev 15)
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
+{% load comments.comments %}
{% block title %}{{ object.name }}Category{% endblock %}
{% block post %}
@@ -12,15 +12,18 @@
{% else %}
{% for story in object.story_set.all %}
-
+{% get_free_comment_count for story.story story.id as comment_count %}
<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.replaced_body }}
- <div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
+ <div class="postinfo">
+ Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a> |
+ <a href="{{ story.get_absolute_url }}">{{ comment_count }} Comments</a>
+ </div>
</div>
{% endfor %}
-</div>
+
{% endifequal %}
{% endblock %}
Added: trunk/cmsiki/templates/story/category_list.html
===================================================================
--- trunk/cmsiki/templates/story/category_list.html (rev 0)
+++ trunk/cmsiki/templates/story/category_list.html 2007-03-27 19:14:07 UTC (rev 15)
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+
+{% block title %}Categories{% endblock %}
+
+{% block post %}
+<div class="post">
+ <h2>List of Categories</h2>
+ <ul class="linklist">
+ {% for object in object_list %}
+ <li><a href="{{ object }}/">{{ object }}</a> ({{ object.story_set.count }})</li>
+ {% endfor %}
+ </ul>
+
+</div>
+{% endblock %}
+
+
Modified: trunk/cmsiki/templates/story/story_archive.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive.html 2007-03-27 19:00:54 UTC (rev 14)
+++ trunk/cmsiki/templates/story/story_archive.html 2007-03-27 19:14:07 UTC (rev 15)
@@ -17,5 +17,4 @@
</div>
</div>
{% endfor %}
-</div>
{% endblock %}
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-27 19:00:54 UTC (rev 14)
+++ trunk/cmsiki/urls.py 2007-03-27 19:14:07 UTC (rev 15)
@@ -37,6 +37,7 @@
)
urlpatterns += patterns('django.views.generic.list_detail',
+ (r'^category/$', 'object_list', dict(category_detail_info)),
(r'^category/(?P<slug>[-\w]+)/$', 'object_detail', dict(category_detail_info, slug_field='slug')),
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-27 20:19:29
|
Revision: 16
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=16&view=rev
Author: cnu
Date: 2007-03-27 13:19:28 -0700 (Tue, 27 Mar 2007)
Log Message:
-----------
Added permanent Pages
Modified Paths:
--------------
trunk/cmsiki/apps/story/models.py
trunk/cmsiki/settings.py
trunk/cmsiki/templates/base.html
trunk/cmsiki/urls.py
Added Paths:
-----------
trunk/cmsiki/apps/page/
trunk/cmsiki/apps/page/__init__.py
trunk/cmsiki/apps/page/models.py
trunk/cmsiki/apps/page/views.py
trunk/cmsiki/templates/page/
trunk/cmsiki/templates/page/page_detail.html
Added: trunk/cmsiki/apps/page/__init__.py
===================================================================
Added: trunk/cmsiki/apps/page/models.py
===================================================================
--- trunk/cmsiki/apps/page/models.py (rev 0)
+++ trunk/cmsiki/apps/page/models.py 2007-03-27 20:19:28 UTC (rev 16)
@@ -0,0 +1,48 @@
+from django.db import models
+from django.contrib.auth.models import User
+import cmsikireplace
+
+# Create your models here.
+WEIGHT_CHOICES = (
+ (0, 0),
+ (1, 1),
+ (2, 2),
+ (3, 3),
+ (4, 4),
+ (5, 5),
+ (6, 6),
+ (7, 7),
+ (8, 8),
+ (9, 9),
+ (10,10),
+)
+
+
+
+class Page(models.Model):
+ title = models.CharField(maxlength=150)
+ body = models.TextField()
+ slug = models.SlugField(prepopulate_from=('title',))
+ weight = models.IntegerField(choices=WEIGHT_CHOICES)
+ author = models.ForeignKey(User)
+ datetime = models.DateTimeField(auto_now_add=True, editable=False)
+ last_modified = models.DateTimeField(auto_now=True, editable=False)
+
+ def __str__(self):
+ return self.title
+
+ class Meta:
+ ordering = ['weight']
+
+ class Admin:
+ list_display = ('title','author','weight','last_modified')
+ list_filter = ('author', 'last_modified')
+ search_fields = ('title','body')
+
+ def get_absolute_url(self):
+ '''Return the absolute URL of the page.'''
+ return '/%s/' % (self.slug)
+
+ def replaced_body(self):
+ '''Replace the tags in the body from the data in the wiki.'''
+ return cmsikireplace.tagreplace(self.body)
Added: trunk/cmsiki/apps/page/views.py
===================================================================
--- trunk/cmsiki/apps/page/views.py (rev 0)
+++ trunk/cmsiki/apps/page/views.py 2007-03-27 20:19:28 UTC (rev 16)
@@ -0,0 +1 @@
+# Create your views here.
Modified: trunk/cmsiki/apps/story/models.py
===================================================================
--- trunk/cmsiki/apps/story/models.py 2007-03-27 19:14:07 UTC (rev 15)
+++ trunk/cmsiki/apps/story/models.py 2007-03-27 20:19:28 UTC (rev 16)
@@ -1,7 +1,7 @@
from django.db import models
from django.contrib.auth.models import User
import cmsikireplace
-import re
+
# Create your models here.
class Category(models.Model):
Modified: trunk/cmsiki/settings.py
===================================================================
--- trunk/cmsiki/settings.py 2007-03-27 19:14:07 UTC (rev 15)
+++ trunk/cmsiki/settings.py 2007-03-27 20:19:28 UTC (rev 16)
@@ -73,6 +73,7 @@
'django.contrib.admin',
'django.contrib.comments',
'cmsiki.apps.story',
+ 'cmsiki.apps.page',
)
# Comments: to get the URL of the current page a template variable
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-03-27 19:14:07 UTC (rev 15)
+++ trunk/cmsiki/templates/base.html 2007-03-27 20:19:28 UTC (rev 16)
@@ -60,10 +60,12 @@
<h2>Pages</h2>
{% block pages %}
<ul>
+ {% for page in pages %}
<li class="page_item">
- <a href="http://localhost/wordpress/?page_id=2"
- title="About">About</a>
+ <a href="{{ page.get_absolute_url }}"
+ title="{{ page.title }}">{{ page.title }}</a>
</li>
+ {% endfor %}
</ul>
{% endblock %}
</li>
Added: trunk/cmsiki/templates/page/page_detail.html
===================================================================
--- trunk/cmsiki/templates/page/page_detail.html (rev 0)
+++ trunk/cmsiki/templates/page/page_detail.html 2007-03-27 20:19:28 UTC (rev 16)
@@ -0,0 +1,12 @@
+{% 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">Last Edited on <span class="postdate">{{ object.last_modified|date:"F j, Y" }}</span> by <strong>{{ object.author }}</strong></div>
+ {{ object.replaced_body }}
+
+</div>
+{% endblock %}
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-27 19:14:07 UTC (rev 15)
+++ trunk/cmsiki/urls.py 2007-03-27 20:19:28 UTC (rev 16)
@@ -1,5 +1,6 @@
from django.conf.urls.defaults import *
from cmsiki.apps.story.models import *
+from cmsiki.apps.page.models import *
from django.conf import settings
info_dict = {
@@ -7,6 +8,7 @@
'date_field': 'pub_date',
'extra_context':{
'categories':Category.objects.all(),
+ 'pages':Page.objects.all(),
},
}
@@ -14,15 +16,26 @@
'queryset':Category.objects.all(),
'extra_context':{
'categories':Category.objects.all(),
+ 'pages':Page.objects.all(),
},
}
-
+
+page_detail_info = {
+ 'queryset': Page.objects.all(),
+ 'extra_context':{
+ 'categories':Category.objects.all(),
+ 'pages':Page.objects.all(),
+ },
+}
+
+# Comments
urlpatterns = patterns('',
(r'^comments/', include('django.contrib.comments.urls.comments')),
# (r'^comments/posted/', 'views.my_post_free_comment'),
)
+# Stories
urlpatterns += patterns('django.views.generic.date_based',
# Example:
# (r'^cmsiki/', include('cmsiki.apps.foo.urls.foo')),
@@ -36,12 +49,18 @@
(r'^/?$', 'archive_index', dict(info_dict)),
)
+# Categories
urlpatterns += patterns('django.views.generic.list_detail',
(r'^category/$', 'object_list', dict(category_detail_info)),
(r'^category/(?P<slug>[-\w]+)/$', 'object_detail', dict(category_detail_info, slug_field='slug')),
)
+# Pages
+urlpatterns += patterns('django.views.generic.list_detail',
+ (r'^(?P<slug>[-\w]+)/$', 'object_detail', dict(page_detail_info, slug_field='slug')),
+)
+
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.
|
|
From: <cn...@us...> - 2007-03-27 19:01:18
|
Revision: 14
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=14&view=rev
Author: cnu
Date: 2007-03-27 12:00:54 -0700 (Tue, 27 Mar 2007)
Log Message:
-----------
Added comments to stories
Modified Paths:
--------------
trunk/cmsiki/settings.py
trunk/cmsiki/templates/base.html
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_detail.html
trunk/cmsiki/urls.py
Added Paths:
-----------
trunk/cmsiki/templates/comments/
trunk/cmsiki/templates/comments/free_preview.html
trunk/cmsiki/templates/comments/freeform.html
trunk/cmsiki/templates/comments/posted.html
Modified: trunk/cmsiki/settings.py
===================================================================
--- trunk/cmsiki/settings.py 2007-03-27 16:50:59 UTC (rev 13)
+++ trunk/cmsiki/settings.py 2007-03-27 19:00:54 UTC (rev 14)
@@ -69,7 +69,14 @@
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
- #'django.contrib.sites',
+ 'django.contrib.sites',
'django.contrib.admin',
+ 'django.contrib.comments',
'cmsiki.apps.story',
)
+
+# Comments: to get the URL of the current page a template variable
+## from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
+## TEMPLATE_CONTEXT_PROCESSORS += (
+## 'django.core.context_processors.request',
+## )
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-03-27 16:50:59 UTC (rev 13)
+++ trunk/cmsiki/templates/base.html 2007-03-27 19:00:54 UTC (rev 14)
@@ -143,6 +143,8 @@
»</a>
</p>
</div>
+ {% block comments %}
+ {% endblock %}
</div>
{% endblock %}
</div><!-- End content -->
Added: trunk/cmsiki/templates/comments/free_preview.html
===================================================================
--- trunk/cmsiki/templates/comments/free_preview.html (rev 0)
+++ trunk/cmsiki/templates/comments/free_preview.html 2007-03-27 19:00:54 UTC (rev 14)
@@ -0,0 +1,45 @@
+{% extends "base.html" %}
+{% block post %}
+<div class="post">
+ <h3>Preview your comment</h3>
+
+ <form action="../postfree/" method="post">
+ {% if comment_form.has_errors %}
+ <p><strong style="color: red;">Please correct the following errors.</strong></p>
+ {% else %}
+ <div class="comment">
+ {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }}
+ <p class="date small">Posted by <strong>{{ comment.person_name }}</strong></p>
+ </div>
+
+ <p><input type="submit" name="post" value="Post public comment" /></p>
+
+ <h3>Or edit it again</h3>
+ {% endif %}
+
+ {% if comment_form.person_name.errors %}
+ {{ comment_form.person_name.html_error_list }}
+ {% endif %}
+
+ <p><label for="id_person_name">Your name:</label> {{ comment_form.person_name }}</p>
+
+ {% if comment_form.comment.errors %}
+ {{ comment_form.comment.html_error_list }}
+ {% endif %}
+
+ <p>
+ <label for="id_comment">Comment:</label>
+ <br />
+ {{ comment_form.comment }}
+ </p>
+
+ <input type="hidden" name="options" value="{{ options }}" />
+ <input type="hidden" name="target" value="{{ target }}" />
+ <input type="hidden" name="gonzo" value="{{ hash }}" />
+
+ <p>
+ <input type="submit" name="preview" value="Preview revised comment" />
+ </p>
+ </form>
+</div>
+{% endblock %}
Added: trunk/cmsiki/templates/comments/freeform.html
===================================================================
--- trunk/cmsiki/templates/comments/freeform.html (rev 0)
+++ trunk/cmsiki/templates/comments/freeform.html 2007-03-27 19:00:54 UTC (rev 14)
@@ -0,0 +1,11 @@
+{% if display_form %}
+ <form action="/comments/postfree/" method="post">
+ <p>Your name: <input type="text" id="id_person_name" name="person_name" /></p>
+ <p>Comment:<br /><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
+ <input type="hidden" name="options" value="{{ options }}" />
+ <input type="hidden" name="target" value="{{ target }}" />
+ <input type="hidden" name="gonzo" value="{{ hash }}" />
+ <p><input type="submit" name="post" value="Preview comment" /></p>
+ </form>
+{% endif %}
+
Added: trunk/cmsiki/templates/comments/posted.html
===================================================================
--- trunk/cmsiki/templates/comments/posted.html (rev 0)
+++ trunk/cmsiki/templates/comments/posted.html 2007-03-27 19:00:54 UTC (rev 14)
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+{% block post %}
+<div class="post">
+ <h1>Comment posted successfully</h1>
+
+ <p>Thanks for contributing.</p>
+
+ {% if object %}
+ <ul>
+ <li><a href="{{ object.get_absolute_url }}">View your comment</a></li>
+ </ul>
+ {% endif %}
+</div>
+{% endblock %}
Modified: trunk/cmsiki/templates/story/story_archive.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive.html 2007-03-27 16:50:59 UTC (rev 13)
+++ trunk/cmsiki/templates/story/story_archive.html 2007-03-27 19:00:54 UTC (rev 14)
@@ -1,16 +1,21 @@
{% extends "base.html" %}
+{% load comments.comments %}
{% block title %}Home{% endblock %}
{% 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.replaced_body }}
- <div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
+{% for story in latest %}
+{% get_free_comment_count for story.story story.id as comment_count %}
+<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.replaced_body }}
+ <div class="postinfo">
+ Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a> |
+ <a href="{{ story.get_absolute_url }}">{{ comment_count }} Comments</a>
</div>
+</div>
{% endfor %}
</div>
{% endblock %}
Modified: trunk/cmsiki/templates/story/story_archive_day.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_day.html 2007-03-27 16:50:59 UTC (rev 13)
+++ trunk/cmsiki/templates/story/story_archive_day.html 2007-03-27 19:00:54 UTC (rev 14)
@@ -1,16 +1,20 @@
{% extends "base.html" %}
+{% load comments.comments %}
{% block title %}{{ day|date:"F j" }} archive{% endblock %}
{% block content %}
<div class="content">
{% for story in object_list %}
+ {% get_free_comment_count for story.story story.id as comment_count %}
<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.replaced_body }}
- <div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
-
+ <div class="postinfo">
+ Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a> |
+ <a href="{{ story.get_absolute_url }}">{{ comment_count }} Comments</a>
+ </div>
</div>
{% endfor %}
</div>
Modified: trunk/cmsiki/templates/story/story_archive_month.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_month.html 2007-03-27 16:50:59 UTC (rev 13)
+++ trunk/cmsiki/templates/story/story_archive_month.html 2007-03-27 19:00:54 UTC (rev 14)
@@ -1,16 +1,22 @@
{% extends "base.html" %}
+{% load comments.comments %}
{% block title %}{{ month|date:"F" }} month archive{% endblock %}
{% block content %}
<div class="content">
{% for story in object_list %}
+ {% get_free_comment_count for story.story story.id as comment_count %}
<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.replaced_body }}
- <div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
+ <div class="postinfo">
+ Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a> |
+ <a href="{{ story.get_absolute_url }}">{{ comment_count }} Comments</a>
+ </div>
+
</div>
{% endfor %}
<div class="paginatelinks">
Modified: trunk/cmsiki/templates/story/story_detail.html
===================================================================
--- trunk/cmsiki/templates/story/story_detail.html 2007-03-27 16:50:59 UTC (rev 13)
+++ trunk/cmsiki/templates/story/story_detail.html 2007-03-27 19:00:54 UTC (rev 14)
@@ -1,4 +1,6 @@
{% extends "base.html" %}
+{% load comments.comments %}
+
{% block title %}{{ object.title }}{% endblock %}
{% block categories %}
@@ -25,5 +27,28 @@
</div>
<div class="postinfo">Posted under category <a href="/category/{{ object.category }}">{{ object.category }}</a>.</div>
{{ category }}
+<!-- </div> -->
+
+{% get_free_comment_count for story.story object.id as comment_count %}
+{% get_free_comment_list for story.story object.id as comment_list %}
+
+{% block comments %}
+<!--<div class="post">-->
+<h3 id="comments">{{ comment_count }} comments to this post</h3>
+<ol class="commentlist">
+{% for comment in comment_list %}
+ <li class="comment_{% cycle odd,even %}" id="c{{ comment.id }}">
+ <div class="commentmetadata"><a href="#c{{ comment.id }}">#{{ forloop.counter }}</a>
+ <b>{{ comment.person_name }}</b> commented, on {{ comment.submit_date|date:"F j, Y" }} at {{ comment.submit_date|date:"P" }}:
+ </div>
+ {{ comment.comment|escape|urlizetrunc:40|linebreaks }}
+ </li>
+{% endfor %}
+</ol>
+
+<h3 id="respond">Post a comment</h3>
+{% free_comment_form for story.story object.id %}
+
+{% endblock comments %}
</div>
{% endblock %}
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-27 16:50:59 UTC (rev 13)
+++ trunk/cmsiki/urls.py 2007-03-27 19:00:54 UTC (rev 14)
@@ -17,8 +17,13 @@
},
}
+urlpatterns = patterns('',
+ (r'^comments/', include('django.contrib.comments.urls.comments')),
+# (r'^comments/posted/', 'views.my_post_free_comment'),
-urlpatterns = patterns('django.views.generic.date_based',
+)
+
+urlpatterns += patterns('django.views.generic.date_based',
# Example:
# (r'^cmsiki/', include('cmsiki.apps.foo.urls.foo')),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-27 16:51:25
|
Revision: 13
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=13&view=rev
Author: cnu
Date: 2007-03-27 09:50:59 -0700 (Tue, 27 Mar 2007)
Log Message:
-----------
Added slug field to category model
Category detail view added.
moved category list in sidebar to base.html
changed regex in cmsikireplace
Modified Paths:
--------------
trunk/cmsiki/apps/story/models.py
trunk/cmsiki/cmsikireplace.py
trunk/cmsiki/settings.py
trunk/cmsiki/templates/base.html
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_detail.html
trunk/cmsiki/urls.py
Added Paths:
-----------
trunk/cmsiki/templates/story/category_detail.html
Modified: trunk/cmsiki/apps/story/models.py
===================================================================
--- trunk/cmsiki/apps/story/models.py 2007-03-24 20:03:22 UTC (rev 12)
+++ trunk/cmsiki/apps/story/models.py 2007-03-27 16:50:59 UTC (rev 13)
@@ -1,17 +1,19 @@
from django.db import models
from django.contrib.auth.models import User
import cmsikireplace
+import re
# Create your models here.
class Category(models.Model):
name = models.CharField(maxlength=50)
description = models.CharField(maxlength=200)
+ slug = models.SlugField(prepopulate_from=('name',))
def __str__(self):
return self.name
class Admin:
- list_display = ('name', 'description')
+ list_display = ('name', 'description', 'slug')
class Story(models.Model):
title = models.CharField(maxlength=150)
Modified: trunk/cmsiki/cmsikireplace.py
===================================================================
--- trunk/cmsiki/cmsikireplace.py 2007-03-24 20:03:22 UTC (rev 12)
+++ trunk/cmsiki/cmsikireplace.py 2007-03-27 16:50:59 UTC (rev 13)
@@ -40,7 +40,7 @@
def getPageHTML(tag):
'''Return the page contents from the wiki as HTML.'''
- page_pattern = re.compile(':[a-zA-Z_0-9]+@')
+ page_pattern = re.compile(':\w+@')
wiki_pattern = re.compile('@[a-zA-Z]+\]')
page_match = page_pattern.findall(tag)[0]
page_name = page_match[1:-1]
@@ -60,7 +60,7 @@
def getPage(tag):
'''Returns the page contents from the wiki as WikiText.'''
- page_pattern = re.compile(':[a-zA-Z_0-9]+@')
+ page_pattern = re.compile(':\w+@')
wiki_pattern = re.compile('@[a-zA-Z]+\]')
page_match = page_pattern.findall(tag)[0]
page_name = page_match[1:-1]
@@ -79,7 +79,7 @@
def getPageInfo(tag):
'''Return the page contents from the wiki as WikiText.'''
- page_pattern = re.compile(':[a-zA-Z_0-9]+@')
+ page_pattern = re.compile(':\w+@')
wiki_pattern = re.compile('@[a-zA-Z]+\]')
page_match = page_pattern.findall(tag)[0]
page_name = page_match[1:-1]
Modified: trunk/cmsiki/settings.py
===================================================================
--- trunk/cmsiki/settings.py 2007-03-24 20:03:22 UTC (rev 12)
+++ trunk/cmsiki/settings.py 2007-03-27 16:50:59 UTC (rev 13)
@@ -18,7 +18,7 @@
# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
-TIME_ZONE = 'America/Calcutta'
+TIME_ZONE = 'Asia/Calcutta'
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-03-24 20:03:22 UTC (rev 12)
+++ trunk/cmsiki/templates/base.html 2007-03-27 16:50:59 UTC (rev 13)
@@ -71,15 +71,11 @@
<h2>Categories</h2>
{% block categories %}
<ul>
- <li><a href="http://localhost/wordpress/?cat=2"
- title="View all posts filed under foo">foo</a> (1)
+ {% for category in categories %}
+ <li><a href="/category/{{ category.slug }}"
+ title="View all posts filed under {{ category }}">{{ category.name }}</a>
</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>
+ {% endfor %}
</ul>
{% endblock %}
</li>
Added: trunk/cmsiki/templates/story/category_detail.html
===================================================================
--- trunk/cmsiki/templates/story/category_detail.html (rev 0)
+++ trunk/cmsiki/templates/story/category_detail.html 2007-03-27 16:50:59 UTC (rev 13)
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+
+{% block title %}{{ object.name }}Category{% endblock %}
+
+{% block post %}
+
+{% ifequal object.story_set.count 0 %}
+<div class="post">
+No posts under this category
+</div>
+
+{% else %}
+
+{% for story in object.story_set.all %}
+
+<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.replaced_body }}
+ <div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
+</div>
+{% endfor %}
+</div>
+{% endifequal %}
+{% endblock %}
Modified: trunk/cmsiki/templates/story/story_archive.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive.html 2007-03-24 20:03:22 UTC (rev 12)
+++ trunk/cmsiki/templates/story/story_archive.html 2007-03-27 16:50:59 UTC (rev 13)
@@ -1,15 +1,6 @@
{% extends "base.html" %}
{% block title %}Home{% endblock %}
-{% block categories %}
-<ul>
- {% for category in categories %}
- <li><a href="/category/{{ category }}"
- title="View all posts filed under {{ category }}">{{ category }}</a>
- </li>
- {% endfor %}
-</ul>
-{% endblock %}
{% block post %}
{% for story in latest %}
Modified: trunk/cmsiki/templates/story/story_archive_day.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_day.html 2007-03-24 20:03:22 UTC (rev 12)
+++ trunk/cmsiki/templates/story/story_archive_day.html 2007-03-27 16:50:59 UTC (rev 13)
@@ -1,16 +1,6 @@
{% extends "base.html" %}
{% block title %}{{ day|date:"F j" }} archive{% endblock %}
-{% block categories %}
-<ul>
- {% for category in categories %}
- <li><a href="/category/{{ category }}"
- title="View all posts filed under {{ category }}">{{ category }}</a>
- </li>
- {% endfor %}
-</ul>
-{% endblock %}
-
{% block content %}
<div class="content">
{% for story in object_list %}
Modified: trunk/cmsiki/templates/story/story_archive_month.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_month.html 2007-03-24 20:03:22 UTC (rev 12)
+++ trunk/cmsiki/templates/story/story_archive_month.html 2007-03-27 16:50:59 UTC (rev 13)
@@ -1,16 +1,6 @@
{% extends "base.html" %}
{% block title %}{{ month|date:"F" }} month archive{% endblock %}
-{% block categories %}
-<ul>
- {% for category in categories %}
- <li><a href="/category/{{ category }}"
- title="View all posts filed under {{ category }}">{{ category }}</a>
- </li>
- {% endfor %}
-</ul>
-{% endblock %}
-
{% block content %}
<div class="content">
Modified: trunk/cmsiki/templates/story/story_detail.html
===================================================================
--- trunk/cmsiki/templates/story/story_detail.html 2007-03-24 20:03:22 UTC (rev 12)
+++ trunk/cmsiki/templates/story/story_detail.html 2007-03-27 16:50:59 UTC (rev 13)
@@ -4,8 +4,8 @@
{% block categories %}
<ul>
{% for category in categories %}
- <li><a href="/category/{{ category }}"
- title="View all posts filed under {{ category }}">{{ category }}</a>
+ <li><a href="/category/{{ category.slug }}"
+ title="View all posts filed under {{ category }}">{{ category.name }}</a>
</li>
{% endfor %}
</ul>
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-24 20:03:22 UTC (rev 12)
+++ trunk/cmsiki/urls.py 2007-03-27 16:50:59 UTC (rev 13)
@@ -10,6 +10,13 @@
},
}
+category_detail_info = {
+ 'queryset':Category.objects.all(),
+ 'extra_context':{
+ 'categories':Category.objects.all(),
+ },
+}
+
urlpatterns = patterns('django.views.generic.date_based',
# Example:
@@ -24,6 +31,11 @@
(r'^/?$', 'archive_index', dict(info_dict)),
)
+urlpatterns += patterns('django.views.generic.list_detail',
+ (r'^category/(?P<slug>[-\w]+)/$', 'object_detail', dict(category_detail_info, slug_field='slug')),
+)
+
+
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.
|
|
From: <cn...@us...> - 2007-03-24 20:05:10
|
Revision: 11
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=11&view=rev
Author: cnu
Date: 2007-03-24 12:49:05 -0700 (Sat, 24 Mar 2007)
Log Message:
-----------
Added method replaced_body to the story model.
Changed template to show replace_body instead of story.body
Introduced Exception handling in cmsikireplace
Modified Paths:
--------------
trunk/cmsiki/apps/story/models.py
trunk/cmsiki/cmsikireplace.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_detail.html
Modified: trunk/cmsiki/apps/story/models.py
===================================================================
--- trunk/cmsiki/apps/story/models.py 2007-03-24 17:20:10 UTC (rev 10)
+++ trunk/cmsiki/apps/story/models.py 2007-03-24 19:49:05 UTC (rev 11)
@@ -1,5 +1,6 @@
from django.db import models
from django.contrib.auth.models import User
+import cmsikireplace
# Create your models here.
class Category(models.Model):
@@ -34,4 +35,9 @@
search_fields = ('title','body')
def get_absolute_url(self):
+ '''Return the absolute url of the story.'''
return '/%s/%s/' % (self.pub_date.strftime("%Y/%m/%d").lower(), self.slug)
+
+ def replaced_body(self):
+ '''Replace the tags in the body from the data in the wiki.'''
+ return cmsikireplace.tagreplace(self.body)
Modified: trunk/cmsiki/cmsikireplace.py
===================================================================
--- trunk/cmsiki/cmsikireplace.py 2007-03-24 17:20:10 UTC (rev 10)
+++ trunk/cmsiki/cmsikireplace.py 2007-03-24 19:49:05 UTC (rev 11)
@@ -12,6 +12,7 @@
import re
import xmlrpclib
+import httplib
# List of wiki and its various information.
# Must change to get the list dynamically from a django database.
@@ -23,51 +24,76 @@
'url':'http://nrcfosshelpline.in/chennaipy/',
'xmlrpc':'http://nrcfosshelpline.in/chennaipy/?action=xmlrpc2'}
]
-
+class WikiNameError(Exception):
+ def __init__(self, value):
+ self.value = value
+ def __str__(self):
+ return repr(self.value)
+
def wikirpc(wikiname):
'''Return the wiki dictionary for the given wikiname.'''
for wiki in wikilist:
if wiki['name'] == wikiname:
return wiki
+ raise WikiNameError('No wiki found')
def getPageHTML(tag):
'''Return the page contents from the wiki as HTML.'''
- page_pattern = re.compile(':[a-zA-Z]+@')
+ page_pattern = re.compile(':[a-zA-Z_0-9]+@')
wiki_pattern = re.compile('@[a-zA-Z]+\]')
page_match = page_pattern.findall(tag)[0]
page_name = page_match[1:-1]
wiki_match = wiki_pattern.findall(tag)[0]
wiki_name = wiki_match[1:-1]
- wiki = wikirpc(wiki_name)
+ try:
+ wiki = wikirpc(wiki_name)
+ except WikiNameError:
+ return ''
srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
- page_html_content = srcwiki.getPageHTML(page_name)
+ try:
+ page_html_content = srcwiki.getPageHTML(page_name)
+ except httplib.socket.error:
+ page_html_content = ''
+ page_html_content = page_html_content.replace('<a class="nonexistent" href="/','<a class="nonexistent" href="%s' %(wiki['url']))
return page_html_content.replace('<a href="/','<a href="%s' %(wiki['url']))
def getPage(tag):
'''Returns the page contents from the wiki as WikiText.'''
- page_pattern = re.compile(':[a-zA-Z]+@')
+ page_pattern = re.compile(':[a-zA-Z_0-9]+@')
wiki_pattern = re.compile('@[a-zA-Z]+\]')
page_match = page_pattern.findall(tag)[0]
page_name = page_match[1:-1]
wiki_match = wiki_pattern.findall(tag)[0]
wiki_name = wiki_match[1:-1]
- wiki = wikirpc(wiki_name)
+ try:
+ wiki = wikirpc(wiki_name)
+ except WikiNameError:
+ return ''
srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
- page_content = srcwiki.getPage(page_name)
+ try:
+ page_content = srcwiki.getPage(page_name)
+ except httplib.socket.error:
+ page_content = ''
return page_content
def getPageInfo(tag):
'''Return the page contents from the wiki as WikiText.'''
- page_pattern = re.compile(':[a-zA-Z]+@')
+ page_pattern = re.compile(':[a-zA-Z_0-9]+@')
wiki_pattern = re.compile('@[a-zA-Z]+\]')
page_match = page_pattern.findall(tag)[0]
page_name = page_match[1:-1]
wiki_match = wiki_pattern.findall(tag)[0]
wiki_name = wiki_match[1:-1]
- wiki = wikirpc(wiki_name)
+ try:
+ wiki = wikirpc(wiki_name)
+ except WikiNameError:
+ return ''
srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
- page_info = srcwiki.getPageInfo(page_name)
+ try:
+ page_info = srcwiki.getPageInfo(page_name)
+ except httplib.socket.error:
+ page_info = ''
# return the wiki page info in a string format
page_string_info = 'PageName: %s \nAuthor: %s \nVersion: %s \n' \
%(page_info['name'], page_info['author'], page_info['version'])
@@ -89,8 +115,11 @@
for tag in tagmatches:
wikireplace = {}
methodmatch = methodpattern.findall(tag)[0][1:] # Find the method in a tag
- # Must decide which method is better.
- wikipage = dict_func[methodmatch](tag)
+ # Must decide which method is better.
+ try:
+ wikipage = dict_func[methodmatch](tag)
+ except KeyError:
+ wikipage = ''
# wikipage = eval(methodmatch)(tag)
wikireplacelist.append(dict({'tag':tag,'page':wikipage}))
for item in wikireplacelist:
Modified: trunk/cmsiki/templates/story/story_archive.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive.html 2007-03-24 17:20:10 UTC (rev 10)
+++ trunk/cmsiki/templates/story/story_archive.html 2007-03-24 19:49:05 UTC (rev 11)
@@ -17,7 +17,7 @@
<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 }}
+ {{ story.replaced_body }}
<div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
</div>
{% endfor %}
Modified: trunk/cmsiki/templates/story/story_archive_day.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_day.html 2007-03-24 17:20:10 UTC (rev 10)
+++ trunk/cmsiki/templates/story/story_archive_day.html 2007-03-24 19:49:05 UTC (rev 11)
@@ -18,7 +18,7 @@
<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 }}
+ {{ story.replaced_body }}
<div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
</div>
Modified: trunk/cmsiki/templates/story/story_archive_month.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_month.html 2007-03-24 17:20:10 UTC (rev 10)
+++ trunk/cmsiki/templates/story/story_archive_month.html 2007-03-24 19:49:05 UTC (rev 11)
@@ -19,7 +19,7 @@
<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 }}
+ {{ story.replaced_body }}
<div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
</div>
{% endfor %}
Modified: trunk/cmsiki/templates/story/story_detail.html
===================================================================
--- trunk/cmsiki/templates/story/story_detail.html 2007-03-24 17:20:10 UTC (rev 10)
+++ trunk/cmsiki/templates/story/story_detail.html 2007-03-24 19:49:05 UTC (rev 11)
@@ -20,7 +20,7 @@
</div>
<div class="entry">
- {{ object.body }}
+ {{ object.replaced_body }}
</div>
<div class="postinfo">Posted under category <a href="/category/{{ object.category }}">{{ object.category }}</a>.</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-24 20:05:06
|
Revision: 12
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=12&view=rev
Author: cnu
Date: 2007-03-24 13:03:22 -0700 (Sat, 24 Mar 2007)
Log Message:
-----------
Corrected divs in base.html xhtml compliance
Modified Paths:
--------------
trunk/cmsiki/templates/base.html
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-03-24 19:49:05 UTC (rev 11)
+++ trunk/cmsiki/templates/base.html 2007-03-24 20:03:22 UTC (rev 12)
@@ -200,13 +200,11 @@
</li>
</ul>
- </div>
-
- <!-- End Sidebar -->
- </div>
- </div><!-- End pagewrapper and page classes -->
+ </div> <!-- End Sidebar -->
+ </div> <!-- End Page -->
+ </div> <!-- End pagewrapper -->
- </div><!-- End container id -->
+ </div> <!-- End container id -->
</body>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-24 17:29:17
|
Revision: 10
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=10&view=rev
Author: cnu
Date: 2007-03-24 10:20:10 -0700 (Sat, 24 Mar 2007)
Log Message:
-----------
moved categories extra_context to the common info_dict
Modified Paths:
--------------
trunk/cmsiki/urls.py
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-24 16:30:54 UTC (rev 9)
+++ trunk/cmsiki/urls.py 2007-03-24 17:20:10 UTC (rev 10)
@@ -5,6 +5,9 @@
info_dict = {
'queryset': Story.objects.all(),
'date_field': 'pub_date',
+ 'extra_context':{
+ 'categories':Category.objects.all(),
+ },
}
@@ -14,17 +17,11 @@
# 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>\d{2})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/$', 'object_detail',\
- dict(info_dict, month_format='%m', slug_field='slug', extra_context={'categories':Category.objects.all()})),
- (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{1,2})/$', 'archive_day', \
- dict(info_dict, month_format='%m', extra_context={'categories':Category.objects.all()})),
- (r'^(?P<year>\d{4})/(?P<month>\d{2})/$', 'archive_month',\
- dict(info_dict, month_format='%m', extra_context={'categories':Category.objects.all()})),
- (r'^(?P<year>\d{4})/$', 'archive_year', \
- dict(info_dict, extra_context={'categories':Category.objects.all()})),
- (r'^/?$', 'archive_index',\
- dict(info_dict, extra_context={'categories':Category.objects.all()})),
+ (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', dict(info_dict)),
+ (r'^/?$', 'archive_index', dict(info_dict)),
)
if settings.DEBUG:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-24 16:47:26
|
Revision: 9
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=9&view=rev
Author: cnu
Date: 2007-03-24 09:30:54 -0700 (Sat, 24 Mar 2007)
Log Message:
-----------
added category list to sidebar
Modified Paths:
--------------
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/urls.py
Modified: trunk/cmsiki/templates/story/story_archive.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive.html 2007-03-24 16:10:26 UTC (rev 8)
+++ trunk/cmsiki/templates/story/story_archive.html 2007-03-24 16:30:54 UTC (rev 9)
@@ -1,6 +1,16 @@
{% extends "base.html" %}
{% block title %}Home{% endblock %}
+{% block categories %}
+<ul>
+ {% for category in categories %}
+ <li><a href="/category/{{ category }}"
+ title="View all posts filed under {{ category }}">{{ category }}</a>
+ </li>
+ {% endfor %}
+</ul>
+{% endblock %}
+
{% block post %}
{% for story in latest %}
<div class="post">
Modified: trunk/cmsiki/templates/story/story_archive_day.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_day.html 2007-03-24 16:10:26 UTC (rev 8)
+++ trunk/cmsiki/templates/story/story_archive_day.html 2007-03-24 16:30:54 UTC (rev 9)
@@ -1,5 +1,16 @@
{% extends "base.html" %}
{% block title %}{{ day|date:"F j" }} archive{% endblock %}
+
+{% block categories %}
+<ul>
+ {% for category in categories %}
+ <li><a href="/category/{{ category }}"
+ title="View all posts filed under {{ category }}">{{ category }}</a>
+ </li>
+ {% endfor %}
+</ul>
+{% endblock %}
+
{% block content %}
<div class="content">
{% for story in object_list %}
Modified: trunk/cmsiki/templates/story/story_archive_month.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_month.html 2007-03-24 16:10:26 UTC (rev 8)
+++ trunk/cmsiki/templates/story/story_archive_month.html 2007-03-24 16:30:54 UTC (rev 9)
@@ -1,5 +1,16 @@
{% extends "base.html" %}
{% block title %}{{ month|date:"F" }} month archive{% endblock %}
+
+{% block categories %}
+<ul>
+ {% for category in categories %}
+ <li><a href="/category/{{ category }}"
+ title="View all posts filed under {{ category }}">{{ category }}</a>
+ </li>
+ {% endfor %}
+</ul>
+{% endblock %}
+
{% block content %}
<div class="content">
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-24 16:10:26 UTC (rev 8)
+++ trunk/cmsiki/urls.py 2007-03-24 16:30:54 UTC (rev 9)
@@ -16,11 +16,15 @@
(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>\d{2})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/$', 'object_detail',\
- dict(info_dict, month_format='%m', slug_field='slug',extra_context={'categories':Category.objects.all()})),
- (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),
+ dict(info_dict, month_format='%m', slug_field='slug', extra_context={'categories':Category.objects.all()})),
+ (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{1,2})/$', 'archive_day', \
+ dict(info_dict, month_format='%m', extra_context={'categories':Category.objects.all()})),
+ (r'^(?P<year>\d{4})/(?P<month>\d{2})/$', 'archive_month',\
+ dict(info_dict, month_format='%m', extra_context={'categories':Category.objects.all()})),
+ (r'^(?P<year>\d{4})/$', 'archive_year', \
+ dict(info_dict, extra_context={'categories':Category.objects.all()})),
+ (r'^/?$', 'archive_index',\
+ dict(info_dict, extra_context={'categories':Category.objects.all()})),
)
if settings.DEBUG:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-24 16:10:31
|
Revision: 8
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=8&view=rev
Author: cnu
Date: 2007-03-24 09:10:26 -0700 (Sat, 24 Mar 2007)
Log Message:
-----------
Category link to each post
Modified Paths:
--------------
trunk/cmsiki/static/css/style.css
trunk/cmsiki/templates/base.html
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_detail.html
Modified: trunk/cmsiki/static/css/style.css
===================================================================
--- trunk/cmsiki/static/css/style.css 2007-03-24 16:08:37 UTC (rev 7)
+++ trunk/cmsiki/static/css/style.css 2007-03-24 16:10:26 UTC (rev 8)
@@ -363,6 +363,10 @@
background: url(../images/bg_arrow_right_2.gif) no-repeat 0px 8px;
}
+.paginatelinks {
+ text-align:center;
+ padding-bottom:10px;
+ }
/* COMMENTS TEMPLATE */
.post h3#comments, .post h3#respond{
Modified: trunk/cmsiki/templates/base.html
===================================================================
--- trunk/cmsiki/templates/base.html 2007-03-24 16:08:37 UTC (rev 7)
+++ trunk/cmsiki/templates/base.html 2007-03-24 16:10:26 UTC (rev 8)
@@ -16,7 +16,7 @@
href="http://localhost/wordpress/?feed=atom" /> -->
</head>
<body>
- <div id="container" >
+ <div id="container">
<div id="header">
<div id="menu">
<ul>
@@ -140,16 +140,7 @@
<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> |
+ under: {% block postcategory %}{% endblock %}|
<a
href="http://localhost/wordpress/?p=4#respond"
title="Comment on New Digg theme">No Comments
Modified: trunk/cmsiki/templates/story/story_archive.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive.html 2007-03-24 16:08:37 UTC (rev 7)
+++ trunk/cmsiki/templates/story/story_archive.html 2007-03-24 16:10:26 UTC (rev 8)
@@ -8,7 +8,7 @@
<div class="postinfo">Posted on <span class="postdate">{{ story.pub_date|date:"F j, Y" }}</span> by <strong>{{ story.author }}</strong></div>
{{ story.body }}
-
+ <div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
</div>
{% endfor %}
</div>
Modified: trunk/cmsiki/templates/story/story_archive_day.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_day.html 2007-03-24 16:08:37 UTC (rev 7)
+++ trunk/cmsiki/templates/story/story_archive_day.html 2007-03-24 16:10:26 UTC (rev 8)
@@ -8,6 +8,7 @@
<div class="postinfo">Posted on <span class="postdate">{{ story.pub_date|date:"F j, Y" }}</span> by <strong>{{ story.author }}</strong></div>
{{ story.body }}
+ <div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
</div>
{% endfor %}
Modified: trunk/cmsiki/templates/story/story_archive_month.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_month.html 2007-03-24 16:08:37 UTC (rev 7)
+++ trunk/cmsiki/templates/story/story_archive_month.html 2007-03-24 16:10:26 UTC (rev 8)
@@ -9,8 +9,13 @@
<div class="postinfo">Posted on <span class="postdate">{{ story.pub_date|date:"F j, Y" }}</span> by <strong>{{ story.author }}</strong></div>
{{ story.body }}
-
+ <div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div>
</div>
{% endfor %}
+ <div class="paginatelinks">
+ <a href="/{{ previous_month|date:"Y/m" }}">{{ previous_month|date:"F" }}</a>
+ |
+ <a href="/{{ next_month|date:"Y/m" }}">{{ next_month|date:"F" }}</a>
+ </div>
</div>
{% endblock %}
Modified: trunk/cmsiki/templates/story/story_detail.html
===================================================================
--- trunk/cmsiki/templates/story/story_detail.html 2007-03-24 16:08:37 UTC (rev 7)
+++ trunk/cmsiki/templates/story/story_detail.html 2007-03-24 16:10:26 UTC (rev 8)
@@ -1,6 +1,16 @@
{% extends "base.html" %}
{% block title %}{{ object.title }}{% endblock %}
+{% block categories %}
+<ul>
+ {% for category in categories %}
+ <li><a href="/category/{{ category }}"
+ title="View all posts filed under {{ category }}">{{ category }}</a>
+ </li>
+ {% endfor %}
+</ul>
+{% endblock %}
+
{% block post %}
<div class="post">
<h2><a href="{{ object.get_absolute_url }}">{{ object.title }}</a></h2>
@@ -13,5 +23,7 @@
{{ object.body }}
</div>
+ <div class="postinfo">Posted under category <a href="/category/{{ object.category }}">{{ object.category }}</a>.</div>
+{{ category }}
</div>
{% endblock %}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-24 16:08:39
|
Revision: 7
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=7&view=rev
Author: cnu
Date: 2007-03-24 09:08:37 -0700 (Sat, 24 Mar 2007)
Log Message:
-----------
Added category link to post
Modified Paths:
--------------
trunk/cmsiki/urls.py
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-24 12:03:56 UTC (rev 6)
+++ trunk/cmsiki/urls.py 2007-03-24 16:08:37 UTC (rev 7)
@@ -1,5 +1,5 @@
from django.conf.urls.defaults import *
-from cmsiki.apps.story.models import Story
+from cmsiki.apps.story.models import *
from django.conf import settings
info_dict = {
@@ -15,7 +15,8 @@
# 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>\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})/(?P<slug>[-\w]+)/$', 'object_detail',\
+ dict(info_dict, month_format='%m', slug_field='slug',extra_context={'categories':Category.objects.all()})),
(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),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <cn...@us...> - 2007-03-22 19:58:57
|
Revision: 5
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=5&view=rev
Author: cnu
Date: 2007-03-22 12:41:51 -0700 (Thu, 22 Mar 2007)
Log Message:
-----------
cmsikireplace module done
Added Paths:
-----------
trunk/cmsiki/cmsikireplace.py
Added: trunk/cmsiki/cmsikireplace.py
===================================================================
--- trunk/cmsiki/cmsikireplace.py (rev 0)
+++ trunk/cmsiki/cmsikireplace.py 2007-03-22 19:41:51 UTC (rev 5)
@@ -0,0 +1,100 @@
+'''CMS - Wiki page replace
+
+Get text from a CMS which contains various predefined tags which has
+to be replaced by data from a wiki. The data is retrieved through
+XMLRPC from the wiki and is replaced back into the original text.'''
+
+__author__ = """
+ Srinivasan R <sri...@gm...>
+ """
+__copyright__ = "Copyright (c) 2007 Srinivasan R"
+
+
+import re
+import xmlrpclib
+
+# List of wiki and its various information.
+# Must change to get the list dynamically from a django database.
+wikilist = [
+ {'name':'localwiki',
+ 'url':'http://localhost:8080/',
+ 'xmlrpc':'http://localhost:8080/?action=xmlrpc2'},
+ {'name':'ChennaiPy',
+ 'url':'http://nrcfosshelpline.in/chennaipy/',
+ 'xmlrpc':'http://nrcfosshelpline.in/chennaipy/?action=xmlrpc2'}
+ ]
+
+def wikirpc(wikiname):
+ '''Return the wiki dictionary for the given wikiname.'''
+ for wiki in wikilist:
+ if wiki['name'] == wikiname:
+ return wiki
+
+
+def getPageHTML(tag):
+ '''Return the page contents from the wiki as HTML.'''
+ page_pattern = re.compile(':[a-zA-Z]+@')
+ wiki_pattern = re.compile('@[a-zA-Z]+\]')
+ page_match = page_pattern.findall(tag)[0]
+ page_name = page_match[1:-1]
+ wiki_match = wiki_pattern.findall(tag)[0]
+ wiki_name = wiki_match[1:-1]
+ wiki = wikirpc(wiki_name)
+ srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
+ page_html_content = srcwiki.getPageHTML(page_name)
+ return page_html_content.replace('<a href="/','<a href="%s' %(wiki['url']))
+
+def getPage(tag):
+ '''Returns the page contents from the wiki as WikiText.'''
+ page_pattern = re.compile(':[a-zA-Z]+@')
+ wiki_pattern = re.compile('@[a-zA-Z]+\]')
+ page_match = page_pattern.findall(tag)[0]
+ page_name = page_match[1:-1]
+ wiki_match = wiki_pattern.findall(tag)[0]
+ wiki_name = wiki_match[1:-1]
+ wiki = wikirpc(wiki_name)
+ srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
+ page_content = srcwiki.getPage(page_name)
+ return page_content
+
+def getPageInfo(tag):
+ '''Return the page contents from the wiki as WikiText.'''
+ page_pattern = re.compile(':[a-zA-Z]+@')
+ wiki_pattern = re.compile('@[a-zA-Z]+\]')
+ page_match = page_pattern.findall(tag)[0]
+ page_name = page_match[1:-1]
+ wiki_match = wiki_pattern.findall(tag)[0]
+ wiki_name = wiki_match[1:-1]
+ wiki = wikirpc(wiki_name)
+ srcwiki = xmlrpclib.ServerProxy(wiki['xmlrpc'])
+ page_info = srcwiki.getPageInfo(page_name)
+ # return the wiki page info in a string format
+ page_string_info = 'PageName: %s \nAuthor: %s \nVersion: %s \n' \
+ %(page_info['name'], page_info['author'], page_info['version'])
+ return str(page_string_info)
+
+
+dict_func = {'getPage':getPage,
+ 'getPageHTML':getPageHTML,
+ 'getPageInfo':getPageInfo
+ }
+
+
+def tagreplace(originaltext):
+ '''Replace the originaltext with text from wiki.'''
+ wikireplacelist = []
+ tagpattern = re.compile('\[[a-zA-Z]+:\w+@[a-zA-Z]+\]')
+ tagmatches = tagpattern.findall(originaltext) # find list of all import tags
+ methodpattern = re.compile('\[[a-zA-Z]+')
+ for tag in tagmatches:
+ wikireplace = {}
+ methodmatch = methodpattern.findall(tag)[0][1:] # Find the method in a tag
+ # Must decide which method is better.
+ wikipage = dict_func[methodmatch](tag)
+ # wikipage = eval(methodmatch)(tag)
+ wikireplacelist.append(dict({'tag':tag,'page':wikipage}))
+ for item in wikireplacelist:
+ originaltext = originaltext.replace(item['tag'],item['page'])
+ return originaltext
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-21 19:06:45
|
Revision: 4
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=4&view=rev
Author: cnu
Date: 2007-03-21 12:06:28 -0700 (Wed, 21 Mar 2007)
Log Message:
-----------
Created Story app
Added basic model for Story app
Created simple template for story app with generic views
Modified Paths:
--------------
trunk/cmsiki/settings.py
trunk/cmsiki/urls.py
Added Paths:
-----------
trunk/cmsiki/apps/
trunk/cmsiki/apps/__init__.py
trunk/cmsiki/apps/story/
trunk/cmsiki/apps/story/__init__.py
trunk/cmsiki/apps/story/models.py
trunk/cmsiki/apps/story/views.py
trunk/cmsiki/templates/
trunk/cmsiki/templates/admin/
trunk/cmsiki/templates/admin/base_site.html
trunk/cmsiki/templates/story/
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
Added: trunk/cmsiki/apps/__init__.py
===================================================================
Added: trunk/cmsiki/apps/story/__init__.py
===================================================================
Added: trunk/cmsiki/apps/story/models.py
===================================================================
--- trunk/cmsiki/apps/story/models.py (rev 0)
+++ trunk/cmsiki/apps/story/models.py 2007-03-21 19:06:28 UTC (rev 4)
@@ -0,0 +1,37 @@
+from django.db import models
+from django.contrib.auth.models import User
+# Create your models here.
+
+class Category(models.Model):
+ name = models.CharField(maxlength=50)
+ description = models.CharField(maxlength=200)
+
+ def __str__(self):
+ return self.name
+
+ class Admin:
+ list_display = ('name', 'description')
+
+class Story(models.Model):
+ title = models.CharField(maxlength=150)
+ body = models.TextField()
+ category = models.ForeignKey(Category)
+ slug = models.SlugField(prepopulate_from=('title',), unique_for_date='pub_date')
+ author = models.ForeignKey(User)
+ pub_date = models.DateTimeField('Publish Date')
+ datetime = models.DateTimeField(auto_now_add=True,editable=False)
+ published = models.BooleanField()
+
+ def __str__(self):
+ return self.title
+
+ class Meta:
+ ordering = ['-pub_date']
+
+ class Admin:
+ list_display = ('title','category','author','pub_date','published')
+ list_filter = ('pub_date','author','published')
+ search_fields = ('title','body')
+
+ def get_absolute_url(self):
+ return '/%s/%s/' % (self.pub_date.strftime("%Y/%b/%d").lower(), self.slug)
Added: trunk/cmsiki/apps/story/views.py
===================================================================
--- trunk/cmsiki/apps/story/views.py (rev 0)
+++ trunk/cmsiki/apps/story/views.py 2007-03-21 19:06:28 UTC (rev 4)
@@ -0,0 +1 @@
+# Create your views here.
Modified: trunk/cmsiki/settings.py
===================================================================
--- trunk/cmsiki/settings.py 2007-03-10 18:18:50 UTC (rev 3)
+++ trunk/cmsiki/settings.py 2007-03-21 19:06:28 UTC (rev 4)
@@ -9,16 +9,16 @@
MANAGERS = ADMINS
-DATABASE_ENGINE = '' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
-DATABASE_NAME = '' # Or path to database file if using sqlite3.
-DATABASE_USER = '' # Not used with sqlite3.
+DATABASE_ENGINE = 'mysql' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
+DATABASE_NAME = 'cmsiki' # Or path to database file if using sqlite3.
+DATABASE_USER = 'root' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
-TIME_ZONE = 'America/Chicago'
+TIME_ZONE = 'America/Calcutta'
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
@@ -62,11 +62,14 @@
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates".
# Always use forward slashes, even on Windows.
+ '/home/cnu/projects/python/django/cmsiki/templates'
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
- 'django.contrib.sites',
+ #'django.contrib.sites',
+ 'django.contrib.admin',
+ 'cmsiki.apps.story',
)
Added: trunk/cmsiki/templates/admin/base_site.html
===================================================================
--- trunk/cmsiki/templates/admin/base_site.html (rev 0)
+++ trunk/cmsiki/templates/admin/base_site.html 2007-03-21 19:06:28 UTC (rev 4)
@@ -0,0 +1,10 @@
+{% extends "admin/base.html" %}
+{% load i18n %}
+
+{% block title %}{{ title|escape }} | {% trans 'cmsiki site admin' %}{% endblock %}
+
+{% block branding %}
+<h1 id="site-name">{% trans 'cmsiki administration' %}</h1>
+{% endblock %}
+
+{% block nav-global %}{% endblock %}
Added: trunk/cmsiki/templates/story/story_archive.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive.html (rev 0)
+++ trunk/cmsiki/templates/story/story_archive.html 2007-03-21 19:06:28 UTC (rev 4)
@@ -0,0 +1,7 @@
+<h1>Latest entries</h1>
+
+{% for story in latest %}
+ <h2><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h2>
+ {{ 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
Added: trunk/cmsiki/templates/story/story_archive_day.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_day.html (rev 0)
+++ trunk/cmsiki/templates/story/story_archive_day.html 2007-03-21 19:06:28 UTC (rev 4)
@@ -0,0 +1,9 @@
+<h1>{{ day|date:"F j" }} archive</h1>
+
+{% 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 }}
+
+{% endfor %}
+
Added: trunk/cmsiki/templates/story/story_archive_month.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_month.html (rev 0)
+++ trunk/cmsiki/templates/story/story_archive_month.html 2007-03-21 19:06:28 UTC (rev 4)
@@ -0,0 +1,9 @@
+<h1>{{ month|date:"F" }} archive</h1>
+
+{% 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 }}
+
+{% endfor %}
+
Added: trunk/cmsiki/templates/story/story_archive_year.html
===================================================================
--- trunk/cmsiki/templates/story/story_archive_year.html (rev 0)
+++ trunk/cmsiki/templates/story/story_archive_year.html 2007-03-21 19:06:28 UTC (rev 4)
@@ -0,0 +1,7 @@
+<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
Added: trunk/cmsiki/templates/story/story_detail.html
===================================================================
--- trunk/cmsiki/templates/story/story_detail.html (rev 0)
+++ trunk/cmsiki/templates/story/story_detail.html 2007-03-21 19:06:28 UTC (rev 4)
@@ -0,0 +1,3 @@
+<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
Modified: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py 2007-03-10 18:18:50 UTC (rev 3)
+++ trunk/cmsiki/urls.py 2007-03-21 19:06:28 UTC (rev 4)
@@ -1,9 +1,21 @@
from django.conf.urls.defaults import *
+from cmsiki.apps.story.models import Story
-urlpatterns = patterns('',
+info_dict = {
+ 'queryset': Story.objects.all(),
+ 'date_field': 'pub_date',
+}
+
+
+urlpatterns = patterns('django.views.generic.date_based',
# Example:
# (r'^cmsiki/', include('cmsiki.apps.foo.urls.foo')),
# Uncomment this for admin:
-# (r'^admin/', include('django.contrib.admin.urls')),
-)
+ (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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-10 18:18:53
|
Revision: 3
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=3&view=rev
Author: cnu
Date: 2007-03-10 10:18:50 -0800 (Sat, 10 Mar 2007)
Log Message:
-----------
Removed .pyo files from version control
Removed Paths:
-------------
trunk/cmsiki/__init__.pyo
trunk/cmsiki/manage.pyo
trunk/cmsiki/settings.pyo
trunk/cmsiki/urls.pyo
Deleted: trunk/cmsiki/__init__.pyo
===================================================================
(Binary files differ)
Deleted: trunk/cmsiki/manage.pyo
===================================================================
(Binary files differ)
Deleted: trunk/cmsiki/settings.pyo
===================================================================
(Binary files differ)
Deleted: trunk/cmsiki/urls.pyo
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2007-03-10 18:06:57
|
Revision: 2
http://cmsiki.svn.sourceforge.net/cmsiki/?rev=2&view=rev
Author: cnu
Date: 2007-03-10 10:06:54 -0800 (Sat, 10 Mar 2007)
Log Message:
-----------
Django project added
Added Paths:
-----------
trunk/cmsiki/
trunk/cmsiki/__init__.py
trunk/cmsiki/__init__.pyo
trunk/cmsiki/manage.py
trunk/cmsiki/manage.pyo
trunk/cmsiki/settings.py
trunk/cmsiki/settings.pyo
trunk/cmsiki/urls.py
trunk/cmsiki/urls.pyo
Added: trunk/cmsiki/__init__.py
===================================================================
Added: trunk/cmsiki/__init__.pyo
===================================================================
(Binary files differ)
Property changes on: trunk/cmsiki/__init__.pyo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/cmsiki/manage.py
===================================================================
--- trunk/cmsiki/manage.py (rev 0)
+++ trunk/cmsiki/manage.py 2007-03-10 18:06:54 UTC (rev 2)
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+from django.core.management import execute_manager
+try:
+ import settings # Assumed to be in the same directory.
+except ImportError:
+ import sys
+ sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
+ sys.exit(1)
+
+if __name__ == "__main__":
+ execute_manager(settings)
Added: trunk/cmsiki/manage.pyo
===================================================================
(Binary files differ)
Property changes on: trunk/cmsiki/manage.pyo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/cmsiki/settings.py
===================================================================
--- trunk/cmsiki/settings.py (rev 0)
+++ trunk/cmsiki/settings.py 2007-03-10 18:06:54 UTC (rev 2)
@@ -0,0 +1,72 @@
+# Django settings for cmsiki project.
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+ADMINS = (
+ # ('Your Name', 'you...@do...'),
+)
+
+MANAGERS = ADMINS
+
+DATABASE_ENGINE = '' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
+DATABASE_NAME = '' # Or path to database file if using sqlite3.
+DATABASE_USER = '' # Not used with sqlite3.
+DATABASE_PASSWORD = '' # Not used with sqlite3.
+DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
+DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
+
+# Local time zone for this installation. All choices can be found here:
+# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
+TIME_ZONE = 'America/Chicago'
+
+# Language code for this installation. All choices can be found here:
+# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
+# http://blogs.law.harvard.edu/tech/stories/storyReader$15
+LANGUAGE_CODE = 'en-us'
+
+SITE_ID = 1
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = ''
+
+# URL that handles the media served from MEDIA_ROOT.
+# Example: "http://media.lawrence.com"
+MEDIA_URL = ''
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+ADMIN_MEDIA_PREFIX = '/media/'
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = '9hxda1(ab-2$u6!)jt%6!mei_q@wzmu7(ct=*4(1eoj@rs_tf$'
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+ 'django.template.loaders.filesystem.load_template_source',
+ 'django.template.loaders.app_directories.load_template_source',
+# 'django.template.loaders.eggs.load_template_source',
+)
+
+MIDDLEWARE_CLASSES = (
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.middleware.doc.XViewMiddleware',
+)
+
+ROOT_URLCONF = 'cmsiki.urls'
+
+TEMPLATE_DIRS = (
+ # Put strings here, like "/home/html/django_templates".
+ # Always use forward slashes, even on Windows.
+)
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+)
Added: trunk/cmsiki/settings.pyo
===================================================================
(Binary files differ)
Property changes on: trunk/cmsiki/settings.pyo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/cmsiki/urls.py
===================================================================
--- trunk/cmsiki/urls.py (rev 0)
+++ trunk/cmsiki/urls.py 2007-03-10 18:06:54 UTC (rev 2)
@@ -0,0 +1,9 @@
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+ # Example:
+ # (r'^cmsiki/', include('cmsiki.apps.foo.urls.foo')),
+
+ # Uncomment this for admin:
+# (r'^admin/', include('django.contrib.admin.urls')),
+)
Added: trunk/cmsiki/urls.pyo
===================================================================
(Binary files differ)
Property changes on: trunk/cmsiki/urls.pyo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|