Ticket #5437: 0001-Partial-fix-5437-Blog-mediatype-naming.patch

File 0001-Partial-fix-5437-Blog-mediatype-naming.patch, 1.6 KB (added by ayleph, 9 years ago)
  • mediagoblin/media_types/blog/__init__.py

    From af2182a513a354b673aa73adfd837de2d6894da3 Mon Sep 17 00:00:00 2001
    From: Andrew Browning <ayleph@thisshitistemp.com>
    Date: Wed, 2 Mar 2016 21:05:17 -0500
    Subject: [PATCH 1/2] Partial fix - 5437 Blog mediatype naming
    
    This patch corrects the blog plugin name to match the path and
    function naming.
    ---
     mediagoblin/media_types/blog/__init__.py | 2 +-
     mediagoblin/media_types/blog/views.py    | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/mediagoblin/media_types/blog/__init__.py b/mediagoblin/media_types/blog/__init__.py
    index 859c216..ee522b8 100644
    a b from mediagoblin.media_types.blog.models import Blog, BlogPostData  
    2424from mediagoblin.tools import pluginapi
    2525
    2626PLUGIN_DIR = os.path.dirname(__file__)
    27 MEDIA_TYPE = 'mediagoblin.media_types.blogpost'
     27MEDIA_TYPE = 'mediagoblin.media_types.blog'
    2828
    2929
    3030def setup_plugin():
  • mediagoblin/media_types/blog/views.py

    diff --git a/mediagoblin/media_types/blog/views.py b/mediagoblin/media_types/blog/views.py
    index 7e796fe..7e27052 100644
    a b def blogpost_create(request):  
    138138            return render_404(request)
    139139
    140140        blogpost = request.db.MediaEntry()
    141         blogpost.media_type = 'mediagoblin.media_types.blogpost'
     141        blogpost.media_type = 'mediagoblin.media_types.blog'
    142142        blogpost.title = six.text_type(form.title.data)
    143143        blogpost.description = six.text_type(cleaned_markdown_conversion((form.description.data)))
    144144        blogpost.tags =  convert_to_tag_list_of_dicts(form.tags.data)