aboutsummaryrefslogtreecommitdiffstats
path: root/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'views.py')
-rw-r--r--views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/views.py b/views.py
index c4e3fe2..682ff94 100644
--- a/views.py
+++ b/views.py
@@ -41,13 +41,13 @@ def index_dir(path):
Lists are sorted alphabetically.
*Special files include '.links' and '.description' the format of these
- files is unquoted CSV and free text. Both are displayed on the index.html
+ files is unquoted CSV and text/html. Both are displayed on the index.html
for the given `path`
"""
dirs = []
files = []
links = []
- description = ""
+ description = False
contents = os.listdir(path)
for obj in contents:
if os.path.isfile(path + '/' + obj):
@@ -55,8 +55,7 @@ def index_dir(path):
with open(path + '/' + obj) as f:
links = f.readlines()
elif obj == siteconfig.DESC_FILE:
- with open(path + '/' + obj) as f:
- description = f.read()
+ description = True
elif obj.startswith('.'):
continue
else:
@@ -140,6 +139,7 @@ def render_file(path):
dirs, files, links, description = index_dir(abs_path)
context.update(
{
+ 'cur_path': 'site/' + path,
'cur_dir': path.split('/')[-1] + '/',
'dirs': dirs,
'files': files,