forked from mdn/kuma
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
78 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{# vim: set ts=2 et sts=2 sw=2: #} | ||
{% extends "layout/base.html" %} | ||
{% set styles = ('wiki',) %} | ||
{% set scripts = ('wiki',) %} | ||
|
||
{% block content_area %} | ||
|
||
<div id="main-content"> | ||
{% block content %} | ||
{% endblock %} | ||
</div> | ||
|
||
{% endblock %} | ||
|
||
{% block breadcrumbs %} | ||
{% endblock %} | ||
|
||
{% block sidebar %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{# vim: set ts=2 et sts=2 sw=2: #} | ||
{% extends "wiki/base.html" %} | ||
|
||
{% block content %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from django.test import TestCase, client | ||
|
||
from sumo.urlresolvers import reverse | ||
|
||
|
||
get = lambda c, v, **kw: c.get(reverse(v, **kw), follow=True) | ||
post = lambda c, v, data={}, **kw: c.post(reverse(v, **kw), data, follow=True) | ||
|
||
|
||
class TestCaseBase(TestCase): | ||
"""Base TestCase for the wiki app test cases.""" | ||
|
||
fixtures = [] | ||
|
||
def setUp(self): | ||
self.client = client.Client() | ||
self.client.get('/') | ||
|
||
def tearDown(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from nose.tools import eq_ | ||
|
||
from wiki.tests import TestCaseBase, get | ||
|
||
|
||
class DocumentTests(TestCaseBase): | ||
"""Tests for the Document view/template""" | ||
|
||
def test_document_view(self): | ||
response = get(self.client, 'wiki.document', args=[1]) | ||
eq_(200, response.status_code) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.conf.urls.defaults import patterns, url | ||
|
||
|
||
urlpatterns = patterns('wiki.views', | ||
url(r'^/(?P<document_id>\d+)$', 'document', name='wiki.document'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
# Create your views here. | ||
import jingo | ||
|
||
|
||
def document(request, document_id): | ||
"""View a wiki document.""" | ||
return jingo.render(request, 'wiki/document.html', | ||
{'document': None}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
* Knowledge Base CSS | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters