Django: Why should I use the package to integrate with Twitter bootstrap?

I read a few posts about which package a boot package is (basically, Crispy-form VS django-toolkit-integration)

But I'm pretty new to Django, and I still don't understand what the real need for these packages is. I mean, Twitter bootstrap is nothing more than css / js files. So, I thought, using bootstrap, linking my Django forms and field with HTML classes (using widgets for .py forms and directly in .html templates for other fields)

So what are the benefits of these packages? Is it just a convenience or am I missing something if I don't want to use it?

Thank you for your help!

+5
source share
3

. . Django as_p, as_ul as_table, . - .

{% extends 'base.html' %}
{% load crispy_forms_tags %}

{% block content %}
    {% form|crispy %}
{% endblock %}

Django-.

, , - . , , .

+3

, Twitter Bootstrap - CSS JS, HTML . Bootstrap .

- , Bootstrap, : Bootsnipp, Bootswatch, Wrapbootstrap . , , ( ) .

: Twitter Bootstrap, , .

+1

, CSS Less () . , .

Since Bootstrap is nothing more than a bunch of CSS and Javascript files (and I don't use Less), so far all I need is an integration of forms, which is easily achieved through this:

NOTE. This is a very concrete example of my own code, but you get the idea.

<div class="row">
    <div class="span6 offset3">

    <form id="form-history" class="form-horizontal text-center"
          action="/somepath/" method="post">
        <fieldset>
            <legend><h3>History</h3></legend>

    {% for field in form %}
        <div class="row">
            <div class="span3">{{ field.label }}</div>
            <div class="span3">{{ field }}</div>
        </div>
    {% endfor %}

        <div class="row pull-right">
            <button class="btn btn-primary btn-large" type="submit">
                <i class="icon-ok icon-white"></i> Find
            </button>
        </div>

        </fieldset>
    </form>
+1
source

All Articles