Add explicit file encoding to all Mako templates.

Also remove some u"" style strings within templates, since they appear to
be unnecessary.
This commit is contained in:
Lance Edgar 2014-07-23 21:35:33 -07:00
parent 124e28c0c2
commit dcc1699f69
65 changed files with 69 additions and 7 deletions

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html style="direction: ltr;" xmlns="http://www.w3.org/1999/xhtml" lang="en-us"> <html style="direction: ltr;" xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
<head> <head>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html style="direction: ltr;" xmlns="http://www.w3.org/1999/xhtml" lang="en-us"> <html style="direction: ltr;" xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
<head> <head>

View file

@ -1,6 +1,6 @@
## -*- coding: utf-8 -*- ## -*- coding: utf-8 -*-
## TODO: This function signature is getting out of hand... ## TODO: This function signature is getting out of hand...
<%def name="autocomplete(field_name, service_url, field_value=None, field_display=None, width=u'300px', select=None, selected=None, cleared=None, options={})"> <%def name="autocomplete(field_name, service_url, field_value=None, field_display=None, width='300px', select=None, selected=None, cleared=None, options={})">
<div id="${field_name}-container" class="autocomplete-container"> <div id="${field_name}-container" class="autocomplete-container">
${h.hidden(field_name, id=field_name, value=field_value)} ${h.hidden(field_name, id=field_name, value=field_value)}
${h.text(field_name+'-textbox', id=field_name+'-textbox', value=field_display, ${h.text(field_name+'-textbox', id=field_name+'-textbox', value=field_display,

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html style="direction: ltr;" xmlns="http://www.w3.org/1999/xhtml" lang="en-us"> <html style="direction: ltr;" xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
<head> <head>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Batches</%def> <%def name="title()">Batches</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" /> <%inherit file="/base.mako" />
<%def name="title()">Batch Parameters</%def> <%def name="title()">Batch Parameters</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/batches/params.mako" /> <%inherit file="/batches/params.mako" />
<%def name="batch_params()"> <%def name="batch_params()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/batches/crud.mako" /> <%inherit file="/batches/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Batch Rows : ${batch.description}</%def> <%def name="title()">Batch Rows : ${batch.description}</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Brands</%def> <%def name="title()">Brands</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Categories</%def> <%def name="title()">Categories</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" /> <%inherit file="/base.mako" />
<%def name="title()">Change Password</%def> <%def name="title()">Change Password</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/form.mako" /> <%inherit file="/form.mako" />
<%def name="title()">${"New "+form.pretty_name if form.creating else form.pretty_name+' : '+capture(self.model_title)}</%def> <%def name="title()">${"New "+form.pretty_name if form.creating else form.pretty_name+' : '+capture(self.model_title)}</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Customer Groups</%def> <%def name="title()">Customer Groups</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Customers</%def> <%def name="title()">Customers</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/customers/crud.mako" /> <%inherit file="/customers/crud.mako" />
${parent.body()} ${parent.body()}

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Departments</%def> <%def name="title()">Departments</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Employees</%def> <%def name="title()">Employees</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Families</%def> <%def name="title()">Families</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" /> <%inherit file="/base.mako" />
<%def name="context_menu_items()"></%def> <%def name="context_menu_items()"></%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%namespace file="/autocomplete.mako" import="autocomplete" /> <%namespace file="/autocomplete.mako" import="autocomplete" />
${autocomplete(field_name, service_url, field_value, field_display, width=width, selected=selected, cleared=cleared)} ${autocomplete(field_name, service_url, field_value, field_display, width=width, selected=selected, cleared=cleared)}

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<% _focus_rendered = False %> <% _focus_rendered = False %>
% for error in fieldset.errors.get(None, []): % for error in fieldset.errors.get(None, []):

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<div class="fieldset"> <div class="fieldset">
% for field in fieldset.render_fields.itervalues(): % for field in fieldset.render_fields.itervalues():
% if field.requires_label: % if field.requires_label:

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<div class="form"> <div class="form">
${h.form(form.action_url, enctype='multipart/form-data')} ${h.form(form.action_url, enctype='multipart/form-data')}

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<div class="form"> <div class="form">
${form.fieldset.render()|n} ${form.fieldset.render()|n}
</div> </div>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" /> <%inherit file="/base.mako" />
<%def name="context_menu_items()"></%def> <%def name="context_menu_items()"></%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<div ${grid.div_attrs()}> <div ${grid.div_attrs()}>
<table> <table>
<thead> <thead>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<div class="filters" url="${search.request.current_route_url()}"> <div class="filters" url="${search.request.current_route_url()}">
${search.begin()} ${search.begin()}
${search.hidden('filters', 'true')} ${search.hidden('filters', 'true')}

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" /> <%inherit file="/base.mako" />
<%def name="title()">Home</%def> <%def name="title()">Home</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="head_tags()"> <%def name="head_tags()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Label Profiles</%def> <%def name="title()">Label Profiles</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" /> <%inherit file="/base.mako" />
<%def name="title()">Printer Settings</%def> <%def name="title()">Printer Settings</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/labels/profiles/crud.mako" /> <%inherit file="/labels/profiles/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" /> <%inherit file="/base.mako" />
<%def name="title()">Login</%def> <%def name="title()">Login</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">People</%def> <%def name="title()">People</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" /> <%inherit file="/base.mako" />
<%def name="title()">Create Products Batch</%def> <%def name="title()">Create Products Batch</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Products</%def> <%def name="title()">Products</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/products/crud.mako" /> <%inherit file="/products/crud.mako" />
<%def name="head_tags()"> <%def name="head_tags()">
@ -19,7 +20,7 @@
${form.render()|n} ${form.render()|n}
% if image: % if image:
${h.image(image_url, u"Product Image", id='product-image', path=image_path, use_pil=True)} ${h.image(image_url, "Product Image", id='product-image', path=image_path, use_pil=True)}
% endif % endif
</div> </div>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html style="direction: ltr;" xmlns="http://www.w3.org/1999/xhtml" lang="en-us"> <html style="direction: ltr;" xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
<head> <head>

View file

@ -2,11 +2,11 @@
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">
<li>${h.link_to(u"Back to Report Codes", url(u'reportcodes'))}</li> <li>${h.link_to("Back to Report Codes", url('reportcodes'))}</li>
% if form.readonly: % if form.readonly:
<li>${h.link_to(u"Edit this Report Code", url(u'reportcode.update', uuid=form.fieldset.model.uuid))}</li> <li>${h.link_to("Edit this Report Code", url('reportcode.update', uuid=form.fieldset.model.uuid))}</li>
% elif form.updating: % elif form.updating:
<li>${h.link_to(u"View this Report Code", url(u'reportcode.read', uuid=form.fieldset.model.uuid))}</li> <li>${h.link_to("View this Report Code", url('reportcode.read', uuid=form.fieldset.model.uuid))}</li>
% endif % endif
</%def> </%def>

View file

@ -4,8 +4,8 @@
<%def name="title()">Report Codes</%def> <%def name="title()">Report Codes</%def>
<%def name="context_menu_items()"> <%def name="context_menu_items()">
% if request.has_perm(u'reportcodes.create'): % if request.has_perm('reportcodes.create'):
<li>${h.link_to(u"Create a new Report Code", url(u'reportcode.create'))}</li> <li>${h.link_to("Create a new Report Code", url('reportcode.create'))}</li>
% endif % endif
</%def> </%def>

View file

@ -1,2 +1,3 @@
## -*- coding: utf-8 -*-
<%inherit file="/base.mako" /> <%inherit file="/base.mako" />
${parent.body()} ${parent.body()}

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/reports/base.mako" /> <%inherit file="/reports/base.mako" />
<%def name="title()">Report : Inventory Worksheet</%def> <%def name="title()">Report : Inventory Worksheet</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/reports/base.mako" /> <%inherit file="/reports/base.mako" />
<%def name="title()">Report : Ordering Worksheet</%def> <%def name="title()">Report : Ordering Worksheet</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="edbob.pyramid:templates/crud.mako" /> <%inherit file="edbob.pyramid:templates/crud.mako" />
<%def name="head_tags()"> <%def name="head_tags()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Roles</%def> <%def name="title()">Roles</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Stores</%def> <%def name="title()">Stores</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Subdepartments</%def> <%def name="title()">Subdepartments</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Users</%def> <%def name="title()">Users</%def>

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/crud.mako" /> <%inherit file="/crud.mako" />
<%def name="context_menu_items()"> <%def name="context_menu_items()">

View file

@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="/grid.mako" /> <%inherit file="/grid.mako" />
<%def name="title()">Vendors</%def> <%def name="title()">Vendors</%def>