Replace tabs with spaces in blog.__init__.
This commit is contained in:
parent
0b7c64c8c8
commit
bb96b7d4a3
@ -26,6 +26,7 @@ from mediagoblin.tools import pluginapi
|
||||
PLUGIN_DIR = os.path.dirname(__file__)
|
||||
MEDIA_TYPE = 'mediagoblin.media_types.blogpost'
|
||||
|
||||
|
||||
def setup_plugin():
|
||||
config = pluginapi.get_config(MEDIA_TYPE)
|
||||
_log.info("setting up blog media type plugin.")
|
||||
@ -81,7 +82,7 @@ def setup_plugin():
|
||||
pluginapi.register_routes(routes)
|
||||
pluginapi.register_template_path(os.path.join(PLUGIN_DIR, 'templates'))
|
||||
pluginapi.register_template_hooks({"user_profile": "mediagoblin/blog/url_to_blogs_dashboard.html",
|
||||
"base_path_to_blog": "mediagoblin/blog/url_to_blogging.html"
|
||||
"header_actions": "mediagoblin/blog/url_to_blogging.html"
|
||||
})
|
||||
|
||||
|
||||
@ -97,7 +98,7 @@ class BlogPostMediaManager(MediaManagerBase):
|
||||
|
||||
def add_to_user_home_context(context):
|
||||
blogs = context['request'].db.Blog.query.filter_by(author=context['user'].id)
|
||||
_log.info("blah blah blah")
|
||||
|
||||
if blogs:
|
||||
context['blogs'] = blogs
|
||||
else:
|
||||
@ -112,8 +113,3 @@ hooks = {
|
||||
("mediagoblin.user_pages.user_home",
|
||||
"mediagoblin/user_pages/user.html"): add_to_user_home_context
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user