def ckeditor_config(request):
 default_config = EditorToolbar.objects.filter(name='default')
 if default_config.exists():
  code = default_config[0].code
 else:
  code = ''
 context = {'editor_config': code, 'redirect_pattern': REDIRECT_CONTENT, 'allowed_tags': ' '.join(ALLOWED_TAGS)}
 return render(request, 'wiki/ckeditor_config.js', context, content_type='application/x-javascript')

def ckeditor_config ( request ) : default_config = EditorToolbar . objects . filter ( name = 'default' ) if default_config . exists ( ) : code = default_config [ 0 ] . code else : code = '' context = { 'editor_config' : code , 'redirect_pattern' : REDIRECT_CONTENT , 'allowed_tags' : ' ' . join ( ALLOWED_TAGS ) } return render ( request , 'wiki/ckeditor_config.js' , context , content_type = 'application/x-javascript' )
return ckeditor config from database .