aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_wiki
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@animus.robocracy.org>2007-02-24 21:39:51 -0800
committerBryan Newbold <bnewbold@animus.robocracy.org>2007-02-24 21:39:51 -0800
commitc69b55610e3cceb5cbd48784fb7cc0458d463f3a (patch)
treee826ef345f257fce2d627af810d6e364d10de201 /bn_django/git_wiki
parent71520ba4e171195c983320b9c00e37c215fad39c (diff)
downloadbnewnet-c69b55610e3cceb5cbd48784fb7cc0458d463f3a.tar.gz
bnewnet-c69b55610e3cceb5cbd48784fb7cc0458d463f3a.zip
Revert "i'm confused?"
This reverts commit 71520ba4e171195c983320b9c00e37c215fad39c.
Diffstat (limited to 'bn_django/git_wiki')
-rw-r--r--bn_django/git_wiki/models.py12
-rw-r--r--bn_django/git_wiki/settings.py6
-rw-r--r--bn_django/git_wiki/templates/git_wiki/base.html5
-rw-r--r--bn_django/git_wiki/templates/git_wiki/item.html4
4 files changed, 14 insertions, 13 deletions
diff --git a/bn_django/git_wiki/models.py b/bn_django/git_wiki/models.py
index 0e71fca..11f00f1 100644
--- a/bn_django/git_wiki/models.py
+++ b/bn_django/git_wiki/models.py
@@ -150,10 +150,10 @@ def fromslug(reqslug):
import commands
if reqslug == '' or reqslug == '/':
- f = open(GITWIKI_BASE + '/' + GITWIKI_NAME + '.git/HEAD','r')
+ f = open(GITWIKI_BASE + '/.git/HEAD','r')
head = f.readline().strip().split()[1]
f.close()
- f = open(GITWIKI_BASE + '/' + GITWIKI_NAME + '.git/'+head,'r')
+ f = open(GITWIKI_BASE + '/.git/'+head,'r')
hash = f.readline().strip()
f.close()
ret = Tree(id=hash)
@@ -198,13 +198,13 @@ def fromslug(reqslug):
def reposcan():
import os
heads = dict()
- for h in os.listdir(GITWIKI_BASE + '/' + GITWIKI_NAME + '.git/refs/heads/'):
- f = open(GITWIKI_BASE + '/' + GITWIKI_NAME + '.git/refs/heads/' + h,'r')
+ for h in os.listdir(GITWIKI_BASE + '/.git/refs/heads/'):
+ f = open(GITWIKI_BASE + '/.git/refs/heads/' + h,'r')
heads[h.strip()] = f.readline().strip()
f.close()
tags = dict()
- for t in os.listdir(GITWIKI_BASE + '/' + GITWIKI_NAME + '.git/refs/tags/'):
- f = open(GITWIKI_BASE + '/' + GITWIKI_NAME + '.git/refs/tags/' + t,'r')
+ for t in os.listdir(GITWIKI_BASE + '/.git/refs/tags/'):
+ f = open(GITWIKI_BASE + '/.git/refs/tags/' + t,'r')
tags[t.strip()] = f.readline().strip()
f.close()
return (heads, tags)
diff --git a/bn_django/git_wiki/settings.py b/bn_django/git_wiki/settings.py
index fb81e26..ed07f53 100644
--- a/bn_django/git_wiki/settings.py
+++ b/bn_django/git_wiki/settings.py
@@ -1,13 +1,13 @@
# full path to directory holding the wiki repository (or sys links to
# the repositories)
-GITWIKI_BASE = '/srv/git/'
+GITWIKI_BASE = '/home/bnewbold/knowledge/'
# leave this blank (NO WHITE SPACE) unless you're using a bare repo
-GITWIKI_NAME = 'knowledge'
+GITWIKI_NAME = ''
# fill path to the git command
-GITCOMMAND = '/usr/bin/git'
+GITCOMMAND = '/usr/local/bin/git'
GITPREFIX = 'cd ' +str(GITWIKI_BASE) + '; ' + str(GITCOMMAND) + ' --git-dir=' \
+ str(GITWIKI_BASE) + '/' + GITWIKI_NAME + '.git'
diff --git a/bn_django/git_wiki/templates/git_wiki/base.html b/bn_django/git_wiki/templates/git_wiki/base.html
index ded3c25..eefaa9a 100644
--- a/bn_django/git_wiki/templates/git_wiki/base.html
+++ b/bn_django/git_wiki/templates/git_wiki/base.html
@@ -4,16 +4,13 @@
{{ block.super }}
<link rel="STYLESHEET" type="text/css" href="style/git_wiki.css" />
<link rel="STYLESHEET" type="text/css" href="/style/git_wiki.css" />
-<link rel="STYLESHEET" type="text/css" href="http://static.bryannewbold.com/style/git_wiki.css" />
+<!--<link rel="STYLESHEET" type="text/css" href="http://static.bryannewbold.com/style/git_wiki.css" />-->
{% endblock %}
{% block path %}
{{ block.super }}
<a href="/knowledge">knowledge</a>
-{% if item %}
- &raquo; <a href="/k/{{ item.slug }}/">{{ object.title }}</a>
-{% endif %}
{% endblock %}
{% block title %}
diff --git a/bn_django/git_wiki/templates/git_wiki/item.html b/bn_django/git_wiki/templates/git_wiki/item.html
index 0df1b72..7562fc6 100644
--- a/bn_django/git_wiki/templates/git_wiki/item.html
+++ b/bn_django/git_wiki/templates/git_wiki/item.html
@@ -1,11 +1,15 @@
{% extends "git_wiki/base.html" %}
+{% load markup %}
+
{% block path %}{{ block.super }} &raquo; <a href="/k/{{ item.slug }}/">
{{ item.path }}</a>{% endblock %}
{% block title %}Knowledge Item: {{ item.path }}{% endblock %}
{% block gitwiki %}
+ {{ item.contents|restructuredtext }}
+ <br /><hr />
<h3>Item name:</h3>
<span class="hash">{{ item.name }}</span>
<h3>Item sha1 hash:</h3>