Skip to content

Commit

Permalink
Merge 99ba386 into 629d82d
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Bengtsson committed Sep 12, 2015
2 parents 629d82d + 99ba386 commit 226316b
Show file tree
Hide file tree
Showing 44 changed files with 547 additions and 10,111 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -9,7 +9,7 @@ install:
- pip install coverage coveralls

script:
- coverage run --source=bootstrapform setup.py test
- coverage run --source=semanticuiform setup.py test

after_success:
- coveralls
25 changes: 2 additions & 23 deletions CHANGES.txt
@@ -1,24 +1,3 @@
- 2015-03-09:
- 2015-09-12:

- Fix unit test fail with Django 1.7 @nikolas
- Performance improvement by @theSage21 @stephane
- Some bugfixes and improvements by @nikolas @zauddelig @bulv1ne

- 2013-12-06:

- Fixed problem with inputs of type file, that were displayed inside an input text element
- Added support for Django Form `required_css_class` and `error_css_class`
- Added CSS class `multiple-checkbox`, to be used to easily hide `<li>`

contributed by `caumons <https://github.com/caumons>`_

- 2013-8-27:

Add support for Bootstrap 3

contributed by `Nivl <https://github.com/Nivl>`_


- 2013-5-7:

Add `radio` support for ChoiceField
Rought, half-decent draft
18 changes: 9 additions & 9 deletions LICENSE
@@ -1,20 +1,20 @@
Copyright (c) Ming Hsien Tzang and individual contributors.
Copyright (c) Peter Bengtsson and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of django-bootstrap-form nor the names of its

3. Neither the name of django-semanticui-form nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1,2 +1,2 @@
include README.rst
graft bootstrapform/templates
graft semanticuiform/templates
58 changes: 26 additions & 32 deletions README.rst
@@ -1,62 +1,56 @@
=====================
Django bootstrap form
=====================
=======================
Django Semantic UI form
=======================

.. image:: https://badge.fury.io/py/django-bootstrap-form.png
.. image:: https://badge.fury.io/py/django-semanticui-form.png
:alt: PyPI version
:target: https://pypi.python.org/pypi/django-bootstrap-form
:target: https://pypi.python.org/pypi/django-semanticui-form

.. image:: https://travis-ci.org/tzangms/django-bootstrap-form.png?branch=master
:target: https://travis-ci.org/tzangms/django-bootstrap-form
.. image:: https://travis-ci.org/peterbe/django-semanticui-form.png?branch=master
:target: https://travis-ci.org/peterbe/django-semanticui-form

.. image:: https://coveralls.io/repos/tzangms/django-bootstrap-form/badge.png?branch=master
:target: https://coveralls.io/r/tzangms/django-bootstrap-form?branch=master

.. image:: https://coveralls.io/repos/peterbe/django-semanticui-form/badge.png?branch=master
:target: https://coveralls.io/r/peterbe/django-semanticui-form?branch=master

Twitter Bootstrap for Django Form.

A simple Django template tag to work with `Bootstrap <http://getbootstrap.com/>`_
Semantic UI for Django Form.

A simple Django template tag to work with `Semantic UI <http://semantic-ui.com/>`_

This project is a fork from
`django-bootstrap-form <https://github.com/tzangms/django-bootstrap-form>`_ by
`tzangms <https://github.com/tzangms>`_.

Usage
======

Add "bootstrapform" to your INSTALLED_APPS.
Add ``semanticuiform`` to your ``INSTALLED_APPS``.

At the top of your template load in our template tags::

{% load bootstrap %}
{% load semanticui %}

Then to render your form::

<form role="form">
<form class="ui form">
<legend>Form Title</legend>
{% csrf_token %}
{{ form|bootstrap }}
<div class="form-group">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
{{ form|semanticui }}
<button class="ui button" type="submit">Submit</button>
</form>

You can also set class="form-vertical" on the form element.

To use class="form-inline" on the form element, also change the "|boostrap" template tag to "|bootstrap_inline".
It is also possible to create a horizontal form. The form class and template tag are both changed, and you will also need slightly different CSS around the submit button::
To make the form with inline element, change the ``|semanticui`` template
tag to ``|semanticui_inline``.

<form class="form-horizontal">
<form class="ui form">
<legend>Form Title</legend>
{% csrf_token %}
{{ form|bootstrap_horizontal }}
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
{{ form|semanticui_inline }}
<button class="ui button" type="submit">Submit</button>
</form>


Demo
=====

Checkout this `Demo site <http://django-bootstrap-form.herokuapp.com/>`_ to see it in action.
Not yet.
4 changes: 0 additions & 4 deletions bootstrapform/config.py

This file was deleted.

99 changes: 0 additions & 99 deletions bootstrapform/fixtures/basic.html

This file was deleted.

102 changes: 0 additions & 102 deletions bootstrapform/fixtures/horizontal.html

This file was deleted.

0 comments on commit 226316b

Please sign in to comment.