Permalink
Browse files

Moves static definition of "blog" out of the main config.

  • Loading branch information...
1 parent 34f27be commit 6b9798d107229433efa484edee1deeb867ae3113 @EnigmaCurry committed Feb 6, 2011
Showing with 3 additions and 4 deletions.
  1. +0 −3 blogofile/config.py
  2. +3 −1 blogofile/site_init/blog_features/_controllers/blog/__init__.py
View
@@ -51,9 +51,6 @@ def recompile():
else:
#p could just be a pre-compiled regex
site.compiled_file_ignore_patterns.append(p)
- import urlparse
- global blog
- blog.url = urlparse.urljoin(site.url, blog.path)
def __load_config(path=None):
#Strategy:
@@ -1,4 +1,5 @@
import logging
+import urlparse
from mako.lookup import TemplateLookup
from blogofile.cache import bf
@@ -102,6 +103,7 @@ def materialize_template(template_name, location, attrs={}, lookup=None):
bf.writer.materialize_template(template_name, location, attrs, lookup)
def init():
+ config["url"] = urlparse.urljoin(bf.config.site.url, config["path"])
global template_lookup
template_lookup = TemplateLookup(
directories=[config["template_path"],"_templates"],
@@ -126,7 +128,7 @@ def run():
categories.sort_into_categories()
blog.logger = logging.getLogger(config['name'])
-
+
permapage.run()
chronological.run()
archives.run()

0 comments on commit 6b9798d

Please sign in to comment.