from __future__ import unicode_literals

from django.apps import AppConfig


class SiteconfigConfig(AppConfig):
    name = 'siteconfig'

from __future__ import unicode_literals

from django.apps import AppConfig
from cms.cms_plugins import AliasPlugin
from cms.plugin_pool import plugin_pool


class SiteconfigConfig(AppConfig):
    name = 'siteconfig'
    verbose_name = "Site Configuration"

    def ready(self):
        def return_pass(self, r, p):
            pass
        AliasPlugin.get_extra_global_plugin_menu_items = return_pass
        AliasPlugin.get_extra_placeholder_menu_items = return_pass
        plugin_pool.unregister_plugin(AliasPlugin)


Disable AliasPlugin since it can accidentally
Disable AliasPlugin since it can accidentally

cause problems if an alias is placed within itself

  from __future__ import unicode_literals
  
  from django.apps import AppConfig
+ from cms.cms_plugins import AliasPlugin
+ from cms.plugin_pool import plugin_pool
  
  
  class SiteconfigConfig(AppConfig):
      name = 'siteconfig'
+     verbose_name = "Site Configuration"
  
+     def ready(self):
+         def return_pass(self, r, p):
+             pass
+         AliasPlugin.get_extra_global_plugin_menu_items = return_pass
+         AliasPlugin.get_extra_placeholder_menu_items = return_pass
+         plugin_pool.unregister_plugin(AliasPlugin)
+ 
+ 
Disable AliasPlugin since it can accidentally
## Code Before:
from __future__ import unicode_literals

from django.apps import AppConfig


class SiteconfigConfig(AppConfig):
    name = 'siteconfig'

## Instruction:
Disable AliasPlugin since it can accidentally
## Code After:
from __future__ import unicode_literals

from django.apps import AppConfig
from cms.cms_plugins import AliasPlugin
from cms.plugin_pool import plugin_pool


class SiteconfigConfig(AppConfig):
    name = 'siteconfig'
    verbose_name = "Site Configuration"

    def ready(self):
        def return_pass(self, r, p):
            pass
        AliasPlugin.get_extra_global_plugin_menu_items = return_pass
        AliasPlugin.get_extra_placeholder_menu_items = return_pass
        plugin_pool.unregister_plugin(AliasPlugin)

