rafalp 6 лет назад
Родитель
Сommit
b575d09916

+ 1 - 1
.isort.cfg

@@ -9,6 +9,6 @@ knowm_requests=requests
 known_restframework=rest_framework
 known_unidecode=unidecode
 known_first_party=misago
-sections=FUTURE,STDLIB,THIRDPARTY,CRISPYFORMS,FAKER,MPTT,REQUESTS,RESTFRAMEWORK,UNIDECODE,DJANGO,FIRSTPARTY,LOCALFOLDER
+sections=FUTURE,STDLIB,THIRDPARTY,FAKER,MPTT,REQUESTS,RESTFRAMEWORK,UNIDECODE,DJANGO,FIRSTPARTY,LOCALFOLDER
 multi_line_output=4
 verbose=true

+ 0 - 7
devproject/settings.py

@@ -181,7 +181,6 @@ INSTALLED_APPS = [
 
     # 3rd party apps used by Misago
     'debug_toolbar',
-    'crispy_forms',
     'mptt',
     'rest_framework',
     'social_django',
@@ -309,12 +308,6 @@ TEMPLATES = [
 WSGI_APPLICATION = 'devproject.wsgi.application'
 
 
-# Django Crispy Forms
-#http://django-crispy-forms.readthedocs.io/en/latest/install.html
-
-CRISPY_TEMPLATE_PACK = 'bootstrap3'
-
-
 # Django Debug Toolbar
 # http://django-debug-toolbar.readthedocs.io/en/stable/configuration.html
 

+ 0 - 48
misago/templates/bootstrap3/field.html

@@ -1,48 +0,0 @@
-{% load crispy_forms_field %}
-
-{% if field.is_hidden %}
-	{{ field }}
-{% else %}
-    {% if field|is_checkbox %}
-        <div class="form-group">
-    {% endif %}
-	<{% if tag %}{{ tag }}{% else %}div{% endif %} id="div_{{ field.auto_id }}" {% if not field|is_checkbox %}class="form-group{% else %}class="checkbox{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_show_errors%}{% if field.errors %} has-error{% endif %}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
-		{% if field.label and not field|is_checkbox and form_show_labels %}
-			<label for="{{ field.id_for_label }}" class="control-label {{ label_class }}{% if field.field.required %} requiredField{% endif %}">
-				{{ field.label|safe }}:
-			</label>
-		{% endif %}
-
-        {% if field|is_checkboxselectmultiple %}
-            {% include 'bootstrap3/layout/checkboxselectmultiple.html' %}
-        {% endif %}
-
-        {% if field|is_radioselect %}
-            {% include 'bootstrap3/layout/radioselect.html' %}
-        {% endif %}
-
-        {% if not field|is_checkboxselectmultiple and not field|is_radioselect %}
-            {% if field|is_checkbox and form_show_labels %}
-                {% if label_class %}
-                    <div class="controls {{ label_class }} {{ field_class }}">
-                {% endif %}
-                <label for="{{ field.id_for_label }}" class="{% if field.field.required %} requiredField{% endif %}">
-                    {% crispy_field field 'class' 'checkbox' %}
-                    {{ field.label|safe }}
-                    {% include 'bootstrap3/layout/help_text_and_errors.html' %}
-                </label>
-                {% if label_class %}
-                    </div>
-                {% endif %}
-            {% else %}
-                <div class="controls {{ field_class }}"{% if field.field.input_formats %} data-input-format="{{ field.field.input_formats.0 }}"{% endif %}>
-                    {% crispy_field field %}
-                    {% include 'bootstrap3/layout/help_text_and_errors.html' %}
-                </div>
-            {% endif %}
-        {% endif %}
-	</{% if tag %}{{ tag }}{% else %}div{% endif %}>
-    {% if field|is_checkbox %}
-        </div>
-    {% endif %}
-{% endif %}

+ 0 - 14
misago/templates/bootstrap3/layout/checkboxselectmultiple.html

@@ -1,14 +0,0 @@
-{% load crispy_forms_filters %}
-{% load l10n %}
-
-<div class="controls control-checkboxselect {{ field_class }}"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>
-    {% include 'bootstrap3/layout/field_errors_block.html' %}
-
-    {% for choice in field.field.choices %}
-        <label class="checkbox{% if inline_class %}-{{ inline_class }}{% endif %}">
-            <input type="checkbox"{% if choice.0 in field.value or choice.0|stringformat:"s" in field.value or choice.0|stringformat:"s" == field.value|stringformat:"s" %} checked="checked"{% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0|unlocalize }}" {{ field.field.widget.attrs|flatatt }}>{{ choice.1|unlocalize }}
-        </label>
-    {% endfor %}
-
-    {% include 'bootstrap3/layout/help_text.html' %}
-</div>

+ 0 - 7
misago/templates/bootstrap3/layout/field_errors_block.html

@@ -1,7 +0,0 @@
-{% if form_show_errors and field.errors %}
-  <div class="control-errors">
-  {% for error in field.errors %}
-    <p id="error_{{ forloop.counter }}_{{ field.auto_id }}" class="help-block"><strong>{{ error }}</strong></p>
-  {% endfor %}
-  </div>
-{% endif %}

+ 0 - 16
misago/templates/bootstrap3/layout/radioselect.html

@@ -1,16 +0,0 @@
-{% load crispy_forms_filters %}
-{% load l10n %}
-
-<div class="controls control-radioselect {{ field_class }}"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>
-    {% include 'bootstrap3/layout/field_errors_block.html' %}
-
-    {% for choice in field.field.choices %}
-        <label class="radio{% if inline_class %}-{{ inline_class }}{% endif %}">
-            <input type="radio"{% if choice.0|stringformat:"s" == field.value|stringformat:"s" %} checked="checked"{% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0|unlocalize }}" {{ field.field.widget.attrs|flatatt }}>{{ choice.1|unlocalize }}
-        </label>
-    {% endfor %}
-
-    {% if not hide_help_text %}
-    {% include 'bootstrap3/layout/help_text.html' %}
-    {% endif %}
-</div>

+ 0 - 1
requirements.in

@@ -3,7 +3,6 @@ bleach<2.2
 django<2
 djangorestframework<3.7
 django-debug-toolbar<1.9
-django-crispy-forms<1.7
 django-htmlmin<0.11
 django-mptt<0.9
 Faker<0.9

+ 0 - 1
requirements.txt

@@ -8,7 +8,6 @@ beautifulsoup4==4.6.3
 bleach==2.1.4
 certifi==2018.10.15       # via requests
 chardet==3.0.4            # via requests
-django-crispy-forms==1.6.1
 django-debug-toolbar==1.8
 django-htmlmin==0.10.0
 django-mptt==0.8.7