From 34addd8fa8805cc67aa2ee099ef0ea0376904008 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Tue, 2 Jun 2015 16:03:30 -0400 Subject: [PATCH] Group imports together in Mako templates --- cms/templates/certificates.html | 6 ++--- cms/templates/course-create-rerun.html | 8 +++--- cms/templates/course_info.html | 10 +++---- cms/templates/error.html | 9 ++++--- cms/templates/group_configurations.html | 6 ++--- cms/templates/manage_users.html | 8 +++--- cms/templates/manage_users_lib.html | 8 +++--- cms/templates/register.html | 6 +++-- .../registration/activation_complete.html | 6 +++-- cms/templates/textbooks.html | 6 +++-- .../ux/reference/course-create-rerun.html | 6 +++-- cms/templates/widgets/footer.html | 6 +++-- cms/templates/widgets/sock.html | 6 +++-- common/templates/course_modes/choose.html | 7 ++--- common/templates/edxnotes_wrapper.html | 8 +++--- .../test_microsite/templates/footer.html | 10 ++++--- .../templates/static_templates/contact.html | 9 ++++--- .../templates/static_templates/faq.html | 9 ++++--- .../templates/static_templates/tos.html | 7 ++--- .../calculator/toggle_calculator.html | 6 +++-- lms/templates/ccx/_dashboard_ccx_listing.html | 6 ++--- lms/templates/ccx/coach_dashboard.html | 11 ++++---- lms/templates/chat/toggle_chat.html | 6 +++-- .../openended/open_ended_rubric.html | 8 +++--- .../courseware/course_navigation.html | 14 +++++----- .../courseware/courseware-chromeless.html | 10 ++++--- lms/templates/courseware/courseware.html | 10 ++++--- lms/templates/courseware/gradebook.html | 6 +++-- lms/templates/courseware/info.html | 7 ++--- .../legacy_instructor_dashboard.html | 7 ++--- .../courseware/mktg_coming_soon.html | 11 ++++---- .../courseware/mktg_course_about.html | 11 ++++---- lms/templates/courseware/news.html | 2 +- lms/templates/courseware/progress.html | 22 +++++---------- lms/templates/courseware/syllabus.html | 8 +++--- lms/templates/dashboard.html | 18 ++++++------- .../_dashboard_status_verification.html | 9 +++---- .../_discussion_course_navigation.html | 6 +++-- .../discussion/_discussion_module.html | 6 +++-- .../discussion/_filter_dropdown.html | 6 +++-- .../discussion/_recent_active_posts.html | 6 +++-- lms/templates/discussion/_search_bar.html | 6 ++--- .../discussion/_underscore_templates.html | 9 ++++--- lms/templates/discussion/index.html | 12 +++++---- lms/templates/discussion/user_profile.html | 8 +++--- lms/templates/edxnotes/edxnotes.html | 8 +++--- lms/templates/edxnotes/toggle_notes.html | 8 +++--- lms/templates/email_change_successful.html | 7 ++--- lms/templates/emails_change_successful.html | 7 ++--- lms/templates/folditbasic.html | 3 +-- lms/templates/footer-edx-v2.html | 6 +++-- lms/templates/forgot_password_modal.html | 8 +++--- lms/templates/help_modal.html | 20 +++++++------- lms/templates/index.html | 10 +++---- .../add_coupon_modal.html | 6 +++-- .../cohort_management.html | 10 ++++--- .../instructor_dashboard_2/e-commerce.html | 8 +++--- .../edit_coupon_modal.html | 6 +++-- .../generate_registarion_codes_modal.html | 6 +++-- .../instructor_dashboard_2.html | 7 ++--- .../instructor_dashboard_2/membership.html | 10 ++++--- .../instructor_dashboard_2/metrics.html | 6 +++-- .../set_course_mode_price_modal.html | 6 +++-- lms/templates/invalid_email_key.html | 3 +-- lms/templates/login.html | 12 +++++---- lms/templates/lti.html | 6 +++-- lms/templates/lti_form.html | 6 +++-- lms/templates/manage_user_standing.html | 6 +++-- .../modal/_modal-settings-language.html | 9 +++---- lms/templates/navigation-edx.html | 6 ++--- lms/templates/navigation.html | 8 +++--- lms/templates/notes.html | 7 +++-- lms/templates/register-shib.html | 19 +++++++------ lms/templates/register.html | 27 +++++++++---------- .../registration/activation_complete.html | 7 ++--- .../registration/activation_invalid.html | 7 ++--- .../shoppingcart/billing_details.html | 6 +++-- .../shoppingcart/download_report.html | 10 ++++--- lms/templates/shoppingcart/error.html | 9 +++---- lms/templates/shoppingcart/receipt.html | 2 +- .../shoppingcart/shopping_cart_flow.html | 10 +++---- lms/templates/signup_modal.html | 16 +++++------ lms/templates/staff_problem_info.html | 6 +++-- .../student_account/account_settings.html | 12 +++++---- lms/templates/student_profile/index.html | 7 ++--- .../student_profile/learner_profile.html | 11 ++++---- .../student_profile/third_party_auth.html | 6 +++-- lms/templates/survey/survey.html | 11 ++++---- lms/templates/sysadmin_dashboard.html | 8 +++--- lms/templates/verify_student/face_upload.html | 6 +++-- .../verify_student/photo_reverification.html | 7 ++--- .../reverification_confirmation.html | 7 ++--- .../reverification_window_expired.html | 7 ++--- 93 files changed, 436 insertions(+), 342 deletions(-) diff --git a/cms/templates/certificates.html b/cms/templates/certificates.html index 6cfbaaf3c8..ee6f1786e6 100644 --- a/cms/templates/certificates.html +++ b/cms/templates/certificates.html @@ -1,10 +1,10 @@ <%inherit file="base.html" /> <%def name="online_help_token()"><% return "certificates" %> <%namespace name='static' file='static_content.html'/> -<%! import json %> <%! - from contentstore import utils - from django.utils.translation import ugettext as _ +import json +from contentstore import utils +from django.utils.translation import ugettext as _ %> <%block name="title">${_("Course Certificates")} diff --git a/cms/templates/course-create-rerun.html b/cms/templates/course-create-rerun.html index 456d09cb26..44f828192f 100644 --- a/cms/templates/course-create-rerun.html +++ b/cms/templates/course-create-rerun.html @@ -1,8 +1,10 @@ <%inherit file="base.html" /> <%def name="online_help_token()"><% return "course_rerun" %> -<%! from django.utils.translation import ugettext as _ %> -<%! from django.core.urlresolvers import reverse %> -<%! from django.template.defaultfilters import escapejs %> +<%! +from django.utils.translation import ugettext as _ +from django.core.urlresolvers import reverse +from django.template.defaultfilters import escapejs +%> <%block name="title">${_("Create a Course Rerun of:")} <%block name="bodyclass">is-signedin view-course-create view-course-create-rerun diff --git a/cms/templates/course_info.html b/cms/templates/course_info.html index e9825ea400..bbb5e12d72 100644 --- a/cms/templates/course_info.html +++ b/cms/templates/course_info.html @@ -1,11 +1,11 @@ -<%! - from django.utils.translation import ugettext as _ - from django.template.defaultfilters import escapejs -%> <%inherit file="base.html" /> <%def name="online_help_token()"><% return "updates" %> <%namespace name='static' file='static_content.html'/> -<%! import json %> +<%! +import json +from django.utils.translation import ugettext as _ +from django.template.defaultfilters import escapejs +%> <%block name="title">${_("Course Updates")} diff --git a/cms/templates/error.html b/cms/templates/error.html index 09bb830fa6..99191a3d4d 100644 --- a/cms/templates/error.html +++ b/cms/templates/error.html @@ -1,6 +1,9 @@ -<%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> -<%! from django.core.urlresolvers import reverse %> +<%! +from django.utils.translation import ugettext as _ +from django.core.urlresolvers import reverse +from django.conf import settings +%> <%block name="bodyclass">error <%block name="title"> % if error == '404': @@ -11,8 +14,6 @@ <%! -from django.conf import settings - if settings.TENDER_DOMAIN: help_link_start = ''.format( domain=settings.TENDER_DOMAIN, diff --git a/cms/templates/group_configurations.html b/cms/templates/group_configurations.html index 74e3695483..865c8959d6 100644 --- a/cms/templates/group_configurations.html +++ b/cms/templates/group_configurations.html @@ -2,10 +2,10 @@ <%def name="content_groups_help_token()"><% return "content_groups" %> <%def name="experiment_group_configurations_help_token()"><% return "group_configurations" %> <%namespace name='static' file='static_content.html'/> -<%! import json %> <%! - from contentstore import utils - from django.utils.translation import ugettext as _ +import json +from contentstore import utils +from django.utils.translation import ugettext as _ %> <%block name="title">${_("Group Configurations")} diff --git a/cms/templates/manage_users.html b/cms/templates/manage_users.html index 64f3601c50..2a898fc9b9 100644 --- a/cms/templates/manage_users.html +++ b/cms/templates/manage_users.html @@ -1,7 +1,9 @@ -<%! import json %> -<%! from django.utils.translation import ugettext as _ %> -<%! from django.core.urlresolvers import reverse %> <%inherit file="base.html" /> +<%! +import json +from django.utils.translation import ugettext as _ +from django.core.urlresolvers import reverse +%> <%def name="online_help_token()"><% return "team_course" %> <%block name="title">${_("Course Team Settings")} <%block name="bodyclass">is-signedin course users view-team diff --git a/cms/templates/manage_users_lib.html b/cms/templates/manage_users_lib.html index 2d40585775..7c8ed187a1 100644 --- a/cms/templates/manage_users_lib.html +++ b/cms/templates/manage_users_lib.html @@ -1,7 +1,9 @@ -<%! import json %> -<%! from django.utils.translation import ugettext as _ %> -<%! from django.core.urlresolvers import reverse %> <%inherit file="base.html" /> +<%! +import json +from django.utils.translation import ugettext as _ +from django.core.urlresolvers import reverse +%> <%def name="online_help_token()"><% return "team_library" %> <%block name="title">${_("Library User Access")} <%block name="bodyclass">is-signedin course users view-team diff --git a/cms/templates/register.html b/cms/templates/register.html index 609dbc141e..0ff0024179 100644 --- a/cms/templates/register.html +++ b/cms/templates/register.html @@ -1,7 +1,9 @@ -<%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> <%def name="online_help_token()"><% return "register" %> -<%! from django.core.urlresolvers import reverse %> +<%! +from django.utils.translation import ugettext as _ +from django.core.urlresolvers import reverse +%> <%block name="title">${_("Sign Up")} <%block name="bodyclass">not-signedin view-signup diff --git a/cms/templates/registration/activation_complete.html b/cms/templates/registration/activation_complete.html index 92a0e180f7..242547e6f0 100644 --- a/cms/templates/registration/activation_complete.html +++ b/cms/templates/registration/activation_complete.html @@ -1,6 +1,8 @@ -<%! from django.utils.translation import ugettext as _ %> -<%! from django.core.urlresolvers import reverse %> <%inherit file="../base.html" /> +<%! +from django.utils.translation import ugettext as _ +from django.core.urlresolvers import reverse +%> <%namespace name='static' file='../static_content.html'/> diff --git a/cms/templates/textbooks.html b/cms/templates/textbooks.html index 55712d7a3b..6fe1f5ac88 100644 --- a/cms/templates/textbooks.html +++ b/cms/templates/textbooks.html @@ -1,8 +1,10 @@ <%inherit file="base.html" /> <%def name="online_help_token()"><% return "textbooks" %> <%namespace name='static' file='static_content.html'/> -<%! import json %> -<%! from django.utils.translation import ugettext as _ %> +<%! +import json +from django.utils.translation import ugettext as _ +%> <%block name="title">${_("Textbooks")} <%block name="bodyclass">is-signedin course view-textbooks diff --git a/cms/templates/ux/reference/course-create-rerun.html b/cms/templates/ux/reference/course-create-rerun.html index 0757969a5e..527b08004a 100644 --- a/cms/templates/ux/reference/course-create-rerun.html +++ b/cms/templates/ux/reference/course-create-rerun.html @@ -4,8 +4,10 @@ <%include file="_note-usage.html" /> -<%! from django.utils.translation import ugettext as _ %> -<%! from django.core.urlresolvers import reverse %> +<%! +from django.utils.translation import ugettext as _ +from django.core.urlresolvers import reverse +%> <%block name="title">[template] Create a Course Rerun of HarvardX SW12.2x T2_2014 <%block name="bodyclass">is-signedin view-course-create view-course-create-rerun diff --git a/cms/templates/widgets/footer.html b/cms/templates/widgets/footer.html index ae75880557..4ddfd3763b 100644 --- a/cms/templates/widgets/footer.html +++ b/cms/templates/widgets/footer.html @@ -1,5 +1,7 @@ -<%! from django.core.urlresolvers import reverse %> -<%! from django.utils.translation import ugettext as _ %> +<%! +from django.utils.translation import ugettext as _ +from django.core.urlresolvers import reverse +%>