{% extends 'dmcadmin/index.html' %} {% block content_header %}
from dmcadmin.models import ManageCommandData
mcd = ManageCommandData()
mcd.add_manage_command_to_conf( 'app_name', 'cls_name', 'manage_command_name', 'description', template_media_path=None, args=[], kwargs={} )
Recomendation: import template file save to there:
/static/managecommand/import_templates/your_template_file.xlsxmcd.add_manage_command_to_conf( 'blog', 'post', 'blog_post_import', 'import new posts for blog', template_media_path='/static/managecommand/import_templates/new_blogs_post.xlsx', args=[], kwargs={} )
mcd.add_manage_command_to_conf( 'system', 'system', 'dumpdata', 'dump dmcadmin', args=['dmcadmin'], kwargs={'indent':4} )
After adding a new command, you need to restart the backend to see the new command on the web