mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-03-27 21:14:17 +03:00
* Revert "[Fix] #1173 Nginx SSL redirect loop (#1174)" This reverts commitcabcc7b106
. * Revert "Fix Getting Up and Running Locally With Docker doc sphinx warnings (#1165)" This reverts commit83c8594203
. * Revert "Fix index.rst sphinx warnings (#1166)" This reverts commit51dd0b5e73
. * Revert "Pin mailhog Docker image to v1.0.0 (#1201)" This reverts commitd9f870461b
. * Revert "Node.JS + docker-compose = ♥ (#1128)" This reverts commit4b06fe3958
.
22 lines
817 B
JavaScript
22 lines
817 B
JavaScript
/* Project specific Javascript goes here. */
|
|
|
|
/*
|
|
Formatting hack to get around crispy-forms unfortunate hardcoding
|
|
in helpers.FormHelper:
|
|
|
|
if template_pack == 'bootstrap4':
|
|
grid_colum_matcher = re.compile('\w*col-(xs|sm|md|lg|xl)-\d+\w*')
|
|
using_grid_layout = (grid_colum_matcher.match(self.label_class) or
|
|
grid_colum_matcher.match(self.field_class))
|
|
if using_grid_layout:
|
|
items['using_grid_layout'] = True
|
|
|
|
Issues with the above approach:
|
|
|
|
1. Fragile: Assumes Bootstrap 4's API doesn't change (it does)
|
|
2. Unforgiving: Doesn't allow for any variation in template design
|
|
3. Really Unforgiving: No way to override this behavior
|
|
4. Undocumented: No mention in the documentation, or it's too hard for me to find
|
|
*/
|
|
$('.form-group').removeClass('row');
|