ProjectDjangoTagsMenu/FindTemplateTagDialog.py

changeset 8
7e8f788fe340
parent 4
ba04ed0b14a1
child 9
1b11bf54b3b2
equal deleted inserted replaced
7:8d928ad07c0a 8:7e8f788fe340
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2014 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
2 5
3 """ 6 """
4 Module implementing a dialog to search foe template tags. 7 Module implementing a dialog to search foe template tags.
5 """ 8 """
6 9
26 @param parent reference to the parent widget (QWidget) 29 @param parent reference to the parent widget (QWidget)
27 """ 30 """
28 super(FindTemplateTagDialog, self).__init__(parent) 31 super(FindTemplateTagDialog, self).__init__(parent)
29 self.setupUi(self) 32 self.setupUi(self)
30 33
31 # TODO: check tags against handler
32 self.__completer = QCompleter(( 34 self.__completer = QCompleter((
35 # template tags
33 'autoescape', 'block', 'comment', 'csrf_token', 'cycle', 'debug', 36 'autoescape', 'block', 'comment', 'csrf_token', 'cycle', 'debug',
34 'extends', 'filter', 'firstof', 'for', 'for...empty', 'if', 37 'extendsvariable', 'extendsfile', 'filter', 'firstof', 'for',
35 'ifchanged', 'ifequal', 'ifnotequal', 'include', 'load', 'now', 38 'for...empty', 'if', 'ifchanged', 'ifequal', 'ifnotequal',
36 'regroup', 'spaceless', 'ssi', 'templatetag', 'verbatim', 39 'includevariable', 'includefile', 'load', 'now', 'regroup',
37 'in operator', 'not in operator', 'widthratio', 'with', 'add', 40 'spaceless', 'ssi', 'ssifile', 'templatetag', 'url', 'urlas',
38 'addslashes', 'capfirst', 'center', 'cut', 'date', 'default', 41 'verbatim', 'widthratio', 'with',
39 'default_if_none', 'dictsort', 'dictsortreversed', 'divisibleby', 42
40 'escape', 'escapejs', 'filesizeformat', 'first', 'fix_ampersands', 43 # template filters
41 'floatformat', 'force_escape', 'get_digit', 'iriencode', 'join', 44 'add', 'addslashes', 'capfirst', 'center', 'cut', 'date',
42 'last', 'lenght', 'lenght_is', 'linebreaks', 'linebreaksbr', 45 'default', 'default_if_none', 'dictsort', 'dictsortreversed',
43 'linenumbers', 'ljust', 'lower', 'make_list', 'phone2numeric', 46 'divisibleby', 'escape', 'escapejs', 'filesizeformat', 'first',
44 'pluralize', 'pprint', 'random', 'removetags', 'rjust', 'safe', 47 'fix_ampersands', 'floatformat', 'force_escape', 'get_digit',
45 'safeseq', 'slice', 'slugify', 'stringformat', 'striptags', 48 'iriencode', 'join', 'last', 'lenght', 'lenght_is', 'linebreaks',
46 'time', 'timesince', 'timeuntil', 'title', 'truncatechars', 49 'linebreaksbr', 'linenumbers', 'ljust', 'lower', 'make_list',
47 'truncatewords', 'truncatewords_html', 'htmlcomment', 50 'phone2numeric', 'pluralize', 'pprint', 'random', 'removetags',
51 'rjust', 'safe', 'safeseq', 'slice', 'slugify', 'stringformat',
52 'striptags', 'time', 'timesince', 'timeuntil', 'title',
53 'truncatechars', 'truncatewords', 'truncatewords_html',
48 'unordered_list', 'upper', 'urlencode', 'urlize', 'urlizetrunc', 54 'unordered_list', 'upper', 'urlencode', 'urlize', 'urlizetrunc',
49 'wordcount', 'wordwrap', 'yesno', 'apnumber', 'intcomma', 55 'wordcount', 'wordwrap', 'yesno',
50 'intword', 'naturalday', 'naturaltime', 'ordinal', 'lorem', 56
51 'static', 'iecomment', 'get_static_prefix', 'get_media_prefix', 57 # humanize tags
58 'loadhumanize', 'apnumber', 'intcomma', 'intword', 'naturalday',
59 'naturaltime', 'ordinal',
60
61 # web design tags
62 'loadweb', 'lorem',
63
64 # static tags
65 'loadstatic', 'staticfile', 'staticvariable', 'get_static_prefix',
66 'get_media_prefix',
67
68 # comments
69 # TODO: check tags against handler
70 'htmlcomment', 'iecomment',
52 'singlelinecomment', 'multilinecomment', 'singlelinecommentpopup', 71 'singlelinecomment', 'multilinecomment', 'singlelinecommentpopup',
53 'multilinecommentpopup', 'singlelinecommentclipboard', 72 'multilinecommentpopup', 'singlelinecommentclipboard',
54 'multilinecommentclipboard', 'multilinecommentfile', 73 'multilinecommentclipboard', 'multilinecommentfile',
55 'singlelinecommentdatetime'), self) 74 'singlelinecommentdatetime'),
75 self)
56 self.__completer.setCompletionMode(QCompleter.PopupCompletion) 76 self.__completer.setCompletionMode(QCompleter.PopupCompletion)
57 self.__completer.setCaseSensitivity(False) 77 self.__completer.setCaseSensitivity(False)
58 self.tagEdit.setCompleter(self.__completer) 78 self.tagEdit.setCompleter(self.__completer)
59 79
60 @pyqtSlot() 80 @pyqtSlot()

eric ide

mercurial