--- a/ProjectDjangoTagsMenu/DjangoTagsMenuHandler.py Wed Dec 30 11:02:07 2020 +0100 +++ b/ProjectDjangoTagsMenu/DjangoTagsMenuHandler.py Sat Apr 24 11:43:22 2021 +0200 @@ -32,7 +32,7 @@ @param ui reference to the user interface object (UI.UserInterface) @param parent reference to the parent object (QObject) """ - super(DjangoTagsMenuHandler, self).__init__(parent) + super().__init__(parent) self.__ui = ui self.__findDialog = None @@ -726,10 +726,6 @@ templateText = "{{% block {0} %}} {1} {{% endblock %}}".format( data[0], selectedText) replace = True - elif tag == "comment": - templateText = "{{% comment %}} {0} {{% endcomment %}}".format( - selectedText) - replace = True elif tag == "csrf_token": templateText = "{% csrf_token %}" elif tag == "cycle": @@ -1346,13 +1342,13 @@ ## Comments ## #################################################### + elif tag in ("comment", "multilinecommentselect"): + templateText = "{{% comment %}} {0} {{% endcomment %}}".format( + selectedText) + replace = True elif tag == "singlelinecommentselect": templateText = '{{# {0} #}}'.format(selectedText) replace = True - elif tag == "multilinecommentselect": - templateText = '{{% comment %}} {0} {{% endcomment %}}'.format( - selectedText) - replace = True elif tag == "singlelinecommentdialog": data, ok = DjangoTagInputDialog.getText( None,