From 4aeb8b2da7eb4d777fc4f50ce6e7c1226e23b540 Mon Sep 17 00:00:00 2001 From: ryneeverett Date: Mon, 14 Mar 2016 11:48:56 -0500 Subject: [PATCH 1/6] Add Coveralls coverage testing to CI, per #1012. --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d9671621..382e980f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,12 @@ python: install: - pip install $DJANGO - pip install . + - pip install coveralls + - pip install coverage script: - - python setup.py test + - coverage run --source mezzanine setup.py test notifications: irc: "irc.freenode.org#mezzanine" on_success: change on_failure: change +after_success: coveralls From e1abf8bec8b1d9291bcb06ba6b734fab73355f0a Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 21 Mar 2016 01:37:30 -0700 Subject: [PATCH 2/6] Clear TEST_COLLATION deprecation warning --- mezzanine/utils/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mezzanine/utils/conf.py b/mezzanine/utils/conf.py index b37b6fbc..0a75a8ac 100644 --- a/mezzanine/utils/conf.py +++ b/mezzanine/utils/conf.py @@ -214,7 +214,7 @@ def mezzanine_settings(): s["DATABASES"][key]["NAME"] = db_path elif shortname == "mysql": # Required MySQL collation for tests. - s["DATABASES"][key]["TEST_COLLATION"] = "utf8_general_ci" + s["DATABASES"][key].setdefault("TEST", {})["COLLATION"] = "utf8_general_ci" def real_project_name(project_name): From b76491ac61c84a7ade9d82974ed36afd5a4129e8 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 21 Mar 2016 23:24:36 -0700 Subject: [PATCH 3/6] PEP8 fix --- mezzanine/utils/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mezzanine/utils/conf.py b/mezzanine/utils/conf.py index 0a75a8ac..3e1d1165 100644 --- a/mezzanine/utils/conf.py +++ b/mezzanine/utils/conf.py @@ -211,10 +211,10 @@ def mezzanine_settings(): # it's in the project directory and add the path to it. if "NAME" in db and os.sep not in db["NAME"]: db_path = os.path.join(s.get("PROJECT_ROOT", ""), db["NAME"]) - s["DATABASES"][key]["NAME"] = db_path + db["NAME"] = db_path elif shortname == "mysql": # Required MySQL collation for tests. - s["DATABASES"][key].setdefault("TEST", {})["COLLATION"] = "utf8_general_ci" + db.setdefault("TEST", {})["COLLATION"] = "utf8_general_ci" def real_project_name(project_name): From 2a564dfff394f8e4ff23572cbbe6849a9a5b3bd0 Mon Sep 17 00:00:00 2001 From: Pavan Rikhi Date: Fri, 25 Mar 2016 17:39:07 -0400 Subject: [PATCH 4/6] Add Federation of Egalitarian Communities Website --- docs/overview.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/overview.rst b/docs/overview.rst index 9ac1fb14..f969c23c 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -467,6 +467,7 @@ certain sites. * `American Institute for Foreign Study `_ * `Camp America `_ * `Code Source `_ +* `The Federation of Egalitarian Communities `_ .. _`Mezzanine Grid on djangopackages.com`: http://www.djangopackages.com/grids/g/mezzanine/ .. _`Cartridge`: http://cartridge.jupo.org/ From 52d22d0e48f6230f7ab173243a5a4f7ea38c5010 Mon Sep 17 00:00:00 2001 From: Stephen McDonald Date: Tue, 29 Mar 2016 13:52:28 +1100 Subject: [PATCH 5/6] Fix comment --- mezzanine/conf/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mezzanine/conf/forms.py b/mezzanine/conf/forms.py index df1ce87a..66b9f861 100644 --- a/mezzanine/conf/forms.py +++ b/mezzanine/conf/forms.py @@ -51,7 +51,7 @@ def __init__(self, *args, **kwargs): def _init_field(self, setting, field_class, name, code=None): """ - Initialize a field wether it is built with a custom name for a + Initialize a field whether it is built with a custom name for a specific translation language or not. """ kwargs = { From 1a6f8ce06bc31cf2eeeb66884bd794261dc907f7 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 31 Mar 2016 11:59:26 -0700 Subject: [PATCH 6/6] Only autofocus visible fields with Html5Mixin --- mezzanine/core/forms.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mezzanine/core/forms.py b/mezzanine/core/forms.py index 29354c52..88f276ba 100644 --- a/mezzanine/core/forms.py +++ b/mezzanine/core/forms.py @@ -21,11 +21,13 @@ class Html5Mixin(object): def __init__(self, *args, **kwargs): super(Html5Mixin, self).__init__(*args, **kwargs) if hasattr(self, "fields"): - # Autofocus first field - first_field = next(iter(self.fields.values())) - first_field.widget.attrs["autofocus"] = "" + first_field = None for name, field in self.fields.items(): + # Autofocus first non-hidden field + if not first_field and not field.widget.is_hidden: + first_field = field + first_field.widget.attrs["autofocus"] = "" if settings.FORMS_USE_HTML5: if isinstance(field, forms.EmailField): self.fields[name].widget.input_type = "email"