diff options
Diffstat (limited to 'tests/lexers/django/example.txt')
| -rw-r--r-- | tests/lexers/django/example.txt | 885 |
1 files changed, 885 insertions, 0 deletions
diff --git a/tests/lexers/django/example.txt b/tests/lexers/django/example.txt new file mode 100644 index 00000000..5499273d --- /dev/null +++ b/tests/lexers/django/example.txt @@ -0,0 +1,885 @@ +---input--- +{% extends "admin/base_site.html" %} +{% load i18n admin_modify adminmedia %} +{% block extrahead %}{{ block.super }} +<script type="text/javascript" src="../../../jsi18n/"></script> +{% for js in javascript_imports %}{% include_admin_script js %}{% endfor %} +{% endblock %} +{% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock %} +{% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %} +{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %} +{% block userlinks %}<a href="../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %} +{% block breadcrumbs %}{% if not is_popup %} +<div class="breadcrumbs"> + <a href="../../../">{% trans "Home" %}</a> › + <a href="../">{{ opts.verbose_name_plural|capfirst|escape }}</a> › + {% if add %}{% trans "Add" %} {{ opts.verbose_name|escape }}{% else %}{{ original|truncatewords:"18"|escape }}{% endif %} +</div> +{% endif %}{% endblock %} +{% block content %}<div id="content-main"> +{% if change %}{% if not is_popup %} + <ul class="object-tools"><li><a href="history/" class="historylink">{% trans "History" %}</a></li> + {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%} + </ul> +{% endif %}{% endif %} +<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %} +<div> +{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %} +{% if opts.admin.save_on_top %}{% submit_row %}{% endif %} +{% if form.error_dict %} + <p class="errornote"> + {% blocktrans count form.error_dict.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} + </p> +{% endif %} +{% for bound_field_set in bound_field_sets %} + <fieldset class="module aligned {{ bound_field_set.classes }}"> + {% if bound_field_set.name %}<h2>{{ bound_field_set.name }}</h2>{% endif %} + {% if bound_field_set.description %}<div class="description">{{ bound_field_set.description }}</div>{% endif %} + {% for bound_field_line in bound_field_set %} + {% admin_field_line bound_field_line %} + {% for bound_field in bound_field_line %} + {% filter_interface_script_maybe bound_field %} + {% endfor %} + {% endfor %} + </fieldset> +{% endfor %} +{% block after_field_sets %}{% endblock %} +{% if change %} + {% if ordered_objects %} + <fieldset class="module"><h2>{% trans "Ordering" %}</h2> + <div class="form-row{% if form.order_.errors %} error{% endif %} "> + {% if form.order_.errors %}{{ form.order_.html_error_list }}{% endif %} + <p><label for="id_order_">{% trans "Order:" %}</label> {{ form.order_ }}</p> + </div></fieldset> + {% endif %} +{% endif %} +{% for related_object in inline_related_objects %}{% edit_inline related_object %}{% endfor %} +{% block after_related_objects %}{% endblock %} +{% submit_row %} +{% if add %} + <script type="text/javascript">document.getElementById("{{ first_form_field_id }}").focus();</script> +{% endif %} +{% if auto_populated_fields %} + <script type="text/javascript"> + {% auto_populated_field_script auto_populated_fields change %} + </script> +{% endif %} +</div> +</form></div> +{% endblock %} + +---tokens--- +'{%' Comment.Preproc +' ' Text +'extends' Keyword +' ' Text +'"admin/base_site.html"' Literal.String.Double +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'load' Keyword +' ' Text +'i18n' Name.Variable +' ' Text +'admin_modify' Name.Variable +' ' Text +'adminmedia' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'extrahead' Name.Variable +' ' Text +'%}' Comment.Preproc +'{{' Comment.Preproc +' ' Text +'block' Name.Builtin +'.super' Name.Variable +' ' Text +'}}' Comment.Preproc +'\n<script type="text/javascript" src="../../../jsi18n/"></script>\n' Other + +'{%' Comment.Preproc +' ' Text +'for' Keyword +' ' Text +'js' Name.Variable +' ' Text +'in' Keyword +' ' Text +'javascript_imports' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'include_admin_script' Keyword +' ' Text +'js' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endfor' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'stylesheet' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'admin_media_prefix' Keyword +' ' Text +'%}' Comment.Preproc +'css/forms.css' Other +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'coltype' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'ordered_objects' Name.Variable +' ' Text +'%}' Comment.Preproc +'colMS' Other +'{%' Comment.Preproc +' ' Text +'else' Keyword +' ' Text +'%}' Comment.Preproc +'colM' Other +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'bodyclass' Name.Variable +' ' Text +'%}' Comment.Preproc +'{{' Comment.Preproc +' ' Text +'opts' Name.Variable +'.app_label' Name.Variable +' ' Text +'}}' Comment.Preproc +'-' Other +'{{' Comment.Preproc +' ' Text +'opts' Name.Variable +'.object_name' Name.Variable +'.lower' Name.Variable +' ' Text +'}}' Comment.Preproc +' change-form' Other +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'userlinks' Name.Variable +' ' Text +'%}' Comment.Preproc +'<a href="../../../doc/">' Other +'{%' Comment.Preproc +' ' Text +'trans' Keyword +' ' Text +"'Documentation'" Literal.String.Single +' ' Text +'%}' Comment.Preproc +'</a> / <a href="../../../password_change/">' Other +'{%' Comment.Preproc +' ' Text +'trans' Keyword +' ' Text +"'Change password'" Literal.String.Single +' ' Text +'%}' Comment.Preproc +'</a> / <a href="../../../logout/">' Other +'{%' Comment.Preproc +' ' Text +'trans' Keyword +' ' Text +"'Log out'" Literal.String.Single +' ' Text +'%}' Comment.Preproc +'</a>' Other +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'breadcrumbs' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'not' Keyword +' ' Text +'is_popup' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n<div class="breadcrumbs">\n <a href="../../../">' Other +'{%' Comment.Preproc +' ' Text +'trans' Keyword +' ' Text +'"Home"' Literal.String.Double +' ' Text +'%}' Comment.Preproc +'</a> ›\n <a href="../">' Other +'{{' Comment.Preproc +' ' Text +'opts' Name.Variable +'.verbose_name_plural' Name.Variable +'|' Operator +'capfirst' Name.Function +'|' Operator +'escape' Name.Function +' ' Text +'}}' Comment.Preproc +'</a> ›\n ' Other +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'add' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'trans' Keyword +' ' Text +'"Add"' Literal.String.Double +' ' Text +'%}' Comment.Preproc +' ' Other +'{{' Comment.Preproc +' ' Text +'opts' Name.Variable +'.verbose_name' Name.Variable +'|' Operator +'escape' Name.Function +' ' Text +'}}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'else' Keyword +' ' Text +'%}' Comment.Preproc +'{{' Comment.Preproc +' ' Text +'original' Name.Variable +'|' Operator +'truncatewords' Name.Function +':"18"' Literal.String.Double +'|' Operator +'escape' Name.Function +' ' Text +'}}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n</div>\n' Other + +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'content' Name.Variable +' ' Text +'%}' Comment.Preproc +'<div id="content-main">\n' Other + +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'change' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'not' Keyword +' ' Text +'is_popup' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n <ul class="object-tools"><li><a href="history/" class="historylink">' Other +'{%' Comment.Preproc +' ' Text +'trans' Keyword +' ' Text +'"History"' Literal.String.Double +' ' Text +'%}' Comment.Preproc +'</a></li>\n ' Other +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'has_absolute_url' Name.Variable +' ' Text +'%}' Comment.Preproc +'<li><a href="../../../r/' Other +'{{' Comment.Preproc +' ' Text +'content_type_id' Name.Variable +' ' Text +'}}' Comment.Preproc +'/' Other +'{{' Comment.Preproc +' ' Text +'object_id' Name.Variable +' ' Text +'}}' Comment.Preproc +'/" class="viewsitelink">' Other +'{%' Comment.Preproc +' ' Text +'trans' Keyword +' ' Text +'"View on site"' Literal.String.Double +' ' Text +'%}' Comment.Preproc +'</a></li>' Other +'{%' Comment.Preproc +' ' Text +'endif' Keyword +'%}' Comment.Preproc +'\n </ul>\n' Other + +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n<form ' Other +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'has_file_field' Name.Variable +' ' Text +'%}' Comment.Preproc +'enctype="multipart/form-data" ' Other +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'action="' Other +'{{' Comment.Preproc +' ' Text +'form_url' Name.Variable +' ' Text +'}}' Comment.Preproc +'" method="post" id="' Other +'{{' Comment.Preproc +' ' Text +'opts' Name.Variable +'.module_name' Name.Variable +' ' Text +'}}' Comment.Preproc +'_form">' Other +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'form_top' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n<div>\n' Other + +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'is_popup' Name.Variable +' ' Text +'%}' Comment.Preproc +'<input type="hidden" name="_popup" value="1" />' Other +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'opts' Name.Variable +'.admin' Name.Variable +'.save_on_top' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'submit_row' Keyword +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'form' Name.Variable +'.error_dict' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n <p class="errornote">\n ' Other +'{%' Comment.Preproc +' ' Text +'blocktrans' Keyword +' ' Text +'count' Name.Variable +' ' Text +'form' Name.Variable +'.error_dict' Name.Variable +'.items' Name.Variable +'|' Operator +'length' Name.Function +' ' Text +'as' Keyword +' ' Text +'counter' Name.Variable +' ' Text +'%}' Comment.Preproc +'Please correct the error below.' Other +'{%' Comment.Preproc +' ' Text +'plural' Keyword +' ' Text +'%}' Comment.Preproc +'Please correct the errors below.' Other +'{%' Comment.Preproc +' ' Text +'endblocktrans' Keyword +' ' Text +'%}' Comment.Preproc +'\n </p>\n' Other + +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'for' Keyword +' ' Text +'bound_field_set' Name.Variable +' ' Text +'in' Keyword +' ' Text +'bound_field_sets' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n <fieldset class="module aligned ' Other +'{{' Comment.Preproc +' ' Text +'bound_field_set' Name.Variable +'.classes' Name.Variable +' ' Text +'}}' Comment.Preproc +'">\n ' Other +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'bound_field_set' Name.Variable +'.name' Name.Variable +' ' Text +'%}' Comment.Preproc +'<h2>' Other +'{{' Comment.Preproc +' ' Text +'bound_field_set' Name.Variable +'.name' Name.Variable +' ' Text +'}}' Comment.Preproc +'</h2>' Other +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n ' Other +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'bound_field_set' Name.Variable +'.description' Name.Variable +' ' Text +'%}' Comment.Preproc +'<div class="description">' Other +'{{' Comment.Preproc +' ' Text +'bound_field_set' Name.Variable +'.description' Name.Variable +' ' Text +'}}' Comment.Preproc +'</div>' Other +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n ' Other +'{%' Comment.Preproc +' ' Text +'for' Keyword +' ' Text +'bound_field_line' Name.Variable +' ' Text +'in' Keyword +' ' Text +'bound_field_set' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n ' Other +'{%' Comment.Preproc +' ' Text +'admin_field_line' Keyword +' ' Text +'bound_field_line' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n ' Other +'{%' Comment.Preproc +' ' Text +'for' Keyword +' ' Text +'bound_field' Name.Variable +' ' Text +'in' Keyword +' ' Text +'bound_field_line' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n ' Other +'{%' Comment.Preproc +' ' Text +'filter_interface_script_maybe' Keyword +' ' Text +'bound_field' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n ' Other +'{%' Comment.Preproc +' ' Text +'endfor' Keyword +' ' Text +'%}' Comment.Preproc +'\n ' Other +'{%' Comment.Preproc +' ' Text +'endfor' Keyword +' ' Text +'%}' Comment.Preproc +'\n </fieldset>\n' Other + +'{%' Comment.Preproc +' ' Text +'endfor' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'after_field_sets' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'change' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n ' Other +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'ordered_objects' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n <fieldset class="module"><h2>' Other +'{%' Comment.Preproc +' ' Text +'trans' Keyword +' ' Text +'"Ordering"' Literal.String.Double +' ' Text +'%}' Comment.Preproc +'</h2>\n <div class="form-row' Other +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'form' Name.Variable +'.order_' Name.Variable +'.errors' Name.Variable +' ' Text +'%}' Comment.Preproc +' error' Other +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +' ">\n ' Other +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'form' Name.Variable +'.order_' Name.Variable +'.errors' Name.Variable +' ' Text +'%}' Comment.Preproc +'{{' Comment.Preproc +' ' Text +'form' Name.Variable +'.order_' Name.Variable +'.html_error_list' Name.Variable +' ' Text +'}}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n <p><label for="id_order_">' Other +'{%' Comment.Preproc +' ' Text +'trans' Keyword +' ' Text +'"Order:"' Literal.String.Double +' ' Text +'%}' Comment.Preproc +'</label> ' Other +'{{' Comment.Preproc +' ' Text +'form' Name.Variable +'.order_' Name.Variable +' ' Text +'}}' Comment.Preproc +'</p>\n </div></fieldset>\n ' Other +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'for' Keyword +' ' Text +'related_object' Name.Variable +' ' Text +'in' Keyword +' ' Text +'inline_related_objects' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'edit_inline' Keyword +' ' Text +'related_object' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endfor' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'block' Keyword +' ' Text +'after_related_objects' Name.Variable +' ' Text +'%}' Comment.Preproc +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'submit_row' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'add' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n <script type="text/javascript">document.getElementById("' Other +'{{' Comment.Preproc +' ' Text +'first_form_field_id' Name.Variable +' ' Text +'}}' Comment.Preproc +'").focus();</script>\n' Other + +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other + +'{%' Comment.Preproc +' ' Text +'if' Keyword +' ' Text +'auto_populated_fields' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n <script type="text/javascript">\n ' Other +'{%' Comment.Preproc +' ' Text +'auto_populated_field_script' Keyword +' ' Text +'auto_populated_fields' Name.Variable +' ' Text +'change' Name.Variable +' ' Text +'%}' Comment.Preproc +'\n </script>\n' Other + +'{%' Comment.Preproc +' ' Text +'endif' Keyword +' ' Text +'%}' Comment.Preproc +'\n</div>\n</form></div>\n' Other + +'{%' Comment.Preproc +' ' Text +'endblock' Keyword +' ' Text +'%}' Comment.Preproc +'\n' Other |
