[cmsiki-svn] SF.net SVN: cmsiki: [18] trunk/cmsiki
Status: Pre-Alpha
Brought to you by:
cnu
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. |