Skip to content

Commit

Permalink
promoted a wiki article to the homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaugen committed Jan 8, 2010
1 parent bfc5ad3 commit 49de4e9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
11 changes: 11 additions & 0 deletions apps/wiki/templatetags/feature_tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from django import template

register = template.Library()

from wiki.models import *

@register.inclusion_tag('wiki/welcome_message.html')
def show_welcome():
article = Article.objects.all().get_by("WelcomeMessage", None)
return {'article': article}

14 changes: 2 additions & 12 deletions templates/homepage.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% extends "site_base.html" %}

{% load feature_tags %}
{% load i18n %}

{% block head_title %}Homepage{% endblock %}
Expand All @@ -8,19 +9,8 @@


{% if user.is_authenticated %}
<h1>Welcome to the Southwest Wisconsin Community Bio-fuel Site</h1>

<h3>
where we will keep each other up to date on the progress of our initiative and share knowledge.
</h3>


<h2>{% trans "About this site" %}</h2>

<p>
This site includes discussion topics, tasks, wikis, bookmarks, profiles and event notification options.
</p>

{% show_welcome %}


{% else %}
Expand Down
6 changes: 6 additions & 0 deletions templates/wiki/welcome_message.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% load markup_tags %}

<div>
{{ article.content|apply_markup:article.markup }}
</div>

0 comments on commit 49de4e9

Please sign in to comment.