django-sitegate icon indicating copy to clipboard operation
django-sitegate copied to clipboard

crispy forms support

Open imposeren opened this issue 9 years ago • 3 comments

Maybe app should use https://pypi.python.org/pypi/django-crispy-forms/1.4.0 ?

imposeren avatar Aug 16 '14 00:08 imposeren

There are no fancy forms in sitegate, why do you think it'd be useful?

idlesign avatar Aug 18 '14 10:08 idlesign

builtin support for several css frameworks. And I think that with crispy forms you can use one template for both signin and signup form. self.helper.layout may be useful for defining forms for different flows. Better support for help-text. Easy integration with django-parsley. Easy way to enable "appended" helptexts for "inline" helps:

override bootstrap3/layout/help_text.html

{% load crispy_forms_field %}
{% if field.help_text %}
    {% if help_text_inline %}
      {% if not field|is_checkbox %}<span class="input-group-addon">{% endif %}
      <a href="#" data-toggle="tooltip" data-placement="left" data-title="{{ field.help_text }}" data-original-title="" title=""><span class="glyphicon glyphicon-info-sign"></span></a>
      {% if not field|is_checkbox %}</span>{% endif %}
    {% else %}
        <p id="hint_{{ field.auto_id }}" class="help-block">{{ field.help_text|safe }}</p>
    {% endif %}
{% endif %}


But that's just my personal preferance as I used you app with crispy forms. It required more manipulations to project than I thought it may need to use crispy together with your app: so maybe something may be improved in your app (or in crispy forms?) to make this integration easier.

imposeren avatar Aug 18 '14 17:08 imposeren

That's a dependency that should be thoroughly thought out. If a compatibility layer might be done in a backward-compatible manner, with respect for those who do not want to deal with crispy, and simultaneously keeping all things simple it's probably worth trying. Yet I myself hardly have time for the task.

idlesign avatar Aug 26 '14 06:08 idlesign