Fix code style

This commit is contained in:
Iacopo Spalletti 2017-01-02 00:09:34 +01:00
parent 446b4b83e9
commit 6a4218eeea
No known key found for this signature in database
GPG key ID: BDCBC2EB289F60C6
6 changed files with 14 additions and 4 deletions

View file

@ -7,7 +7,9 @@ import os
from tempfile import mkdtemp
def gettext(s): return s
def gettext(s):
return s
HELPER_SETTINGS = dict(
ROOT_URLCONF='tests.test_utils.urls',
@ -138,5 +140,6 @@ def run():
from djangocms_helper import runner
runner.cms('djangocms_blog')
if __name__ == '__main__':
run()

View file

@ -308,6 +308,7 @@ class BlogConfigAdmin(BaseAppHookConfig, TranslatableAdmin):
menu_pool.clear(all=True)
return super(BlogConfigAdmin, self).save_model(request, obj, form, change)
admin.site.register(BlogCategory, BlogCategoryAdmin)
admin.site.register(Post, PostAdmin)
admin.site.register(BlogConfig, BlogConfigAdmin)

View file

@ -134,4 +134,6 @@ class BlogConfigForm(AppDataForm):
label=_('Send notifications on post update'), required=False, initial=False,
help_text=_('Emits a desktop notification -if enabled- when editing a published post')
)
setup_config(BlogConfigForm, BlogConfig)

View file

@ -11,6 +11,7 @@ from .menu import BlogCategoryMenu
from .settings import get_setting
@apphook_pool.register
class BlogApp(AutoCMSAppMixin, CMSConfigApp):
name = _('Blog')
urls = ['djangocms_blog.urls']
@ -28,5 +29,6 @@ class BlogApp(AutoCMSAppMixin, CMSConfigApp):
'object_name': get_setting('DEFAULT_OBJECT_NAME')
},
}
apphook_pool.register(BlogApp)
BlogApp.setup()

View file

@ -104,8 +104,6 @@ class BlogCategoryMenu(CMSAttachMenu):
return nodes
menu_pool.register_menu(BlogCategoryMenu)
class BlogNavModifier(Modifier):
"""
@ -159,7 +157,9 @@ class BlogNavModifier(Modifier):
node.selected = True
return nodes
menu_pool.register_modifier(BlogNavModifier)
menu_pool.register_menu(BlogCategoryMenu)
def clear_menu_cache(**kwargs):
@ -168,5 +168,6 @@ def clear_menu_cache(**kwargs):
"""
menu_pool.clear(all=True)
post_save.connect(clear_menu_cache, sender=BlogCategory)
post_delete.connect(clear_menu_cache, sender=BlogCategory)

View file

@ -20,6 +20,7 @@ def get_urls():
)
return details
detail_urls = get_urls()
urlpatterns = [