Skip to content

Commit

Permalink
Fixes to documentation and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dyve committed May 7, 2014
1 parent b634d4d commit 4133cfe
Show file tree
Hide file tree
Showing 14 changed files with 157 additions and 149 deletions.
22 changes: 13 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: python

# Python versions for matrix
language: python
python:
- "2.7"
- "2.6"
Expand All @@ -9,9 +8,9 @@ python:

# Django versions for matrix
env:
- DJANGO_VERSION=1.4.10
- DJANGO_VERSION=1.5.5
- DJANGO_VERSION=1.6.2
- DJANGO_VERSION=1.4.12
- DJANGO_VERSION=1.5.7
- DJANGO_VERSION=1.6.4

# Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install:
Expand All @@ -25,10 +24,15 @@ script:
matrix:
exclude:
- python: "3.2"
env: DJANGO_VERSION=1.4.10
env: DJANGO_VERSION=1.4.12
- python: "3.3"
env: DJANGO_VERSION=1.4.10
env: DJANGO_VERSION=1.4.12
- python: "3.2"
env: DJANGO_VERSION=1.5.5
env: DJANGO_VERSION=1.5.7
- python: "3.3"
env: DJANGO_VERSION=1.5.5
env: DJANGO_VERSION=1.5.7

# Report to coveralls
after_success:
- pip install --quiet python-coveralls
- coveralls
30 changes: 15 additions & 15 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
=======
Credits
Authors
=======

Development Lead
----------------

* Dylan Verheul <dylan.verheul@gmail.com>
* Dylan Verheul <dylan@dyve.net>

Contributors
------------

Allard Stijnman <a.g.stijnman@gmail.com>
Austin Whittier <austin.whitt@gmail.com>
Caio Ariede <caio.ariede@gmail.com>
Fabio C. Barrionuevo da Luz <bnafta@gmail.com>
Jay Pipes <jaypipes@gmail.com>
Jonas Hagstedt <hagstedt@gmail.com>
Jordan Starcher <jstarcher@gmail.com>
Juan Carlos <juancarlospaco@gmail.com>
Markus Holtermann <info@markusholtermann.eu>
Nick S <nsmith448@gmail.com>
Owais Lone <loneowais@gmail.com>
Richard Hajdu <tuskone16@gmail.com>
pmav99 <pmav99@users.noreply.github.com>
* Allard Stijnman <a.g.stijnman@gmail.com>
* Austin Whittier <austin.whitt@gmail.com>
* Caio Ariede <caio.ariede@gmail.com>
* Fabio C. Barrionuevo da Luz <bnafta@gmail.com>
* Jay Pipes <jaypipes@gmail.com>
* Jonas Hagstedt <hagstedt@gmail.com>
* Jordan Starcher <jstarcher@gmail.com>
* Juan Carlos <juancarlospaco@gmail.com>
* Markus Holtermann <info@markusholtermann.eu>
* Nick S <nsmith448@gmail.com>
* Owais Lone <loneowais@gmail.com>
* Richard Hajdu <tuskone16@gmail.com>
* pmav99 <pmav99@users.noreply.github.com>
37 changes: 14 additions & 23 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=================
django-bootstrap3
=================
============================
Welcome to django-bootstrap3
============================

.. image:: https://travis-ci.org/dyve/django-bootstrap3.png?branch=master
:target: https://travis-ci.org/dyve/django-bootstrap3
Expand All @@ -11,17 +11,12 @@ django-bootstrap3
.. image:: https://pypip.in/d/django-bootstrap3/badge.png
:target: https://crate.io/packages/django-bootstrap3?version=latest

Bootstrap support for Django projects

**You can support this project on GitTip, https://www.gittip.com/dyve/.**

Documentation
-------------
Use Bootstrap in your Django templates, the Django way.

The full documentation is at http://django-bootstrap3.readthedocs.org/.

Quickstart
----------
Installation
------------

1. Install using pip:

Expand All @@ -35,17 +30,13 @@ Quickstart

3. In your templates, load the ``bootstrap3`` library and use the ``bootstrap_*`` tags:

.. code:: Django
{% load bootstrap3 %}

{# Load CSS and JavaScript #}
Example template
----------------

{% bootstrap_css %}
{% bootstrap_javascript %}
.. code:: Django
{# Display django.contrib.messages as Bootstrap alerts #}
{% bootstrap_messages %}
{% load bootstrap3 %}
{# Display a form #}
Expand All @@ -60,11 +51,10 @@ Quickstart
</form>
Documentation
-------------

Features
--------

Define your forms in Django, use ``django-bootstrap3`` to render them in Bootstrap. That's the dream.
The full documentation is at http://django-bootstrap3.readthedocs.org/.


Requirements
Expand All @@ -89,6 +79,7 @@ License

You can use this under Apache 2.0. See LICENSE file for details.


Author
------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down
24 changes: 24 additions & 0 deletions docs/example_template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. code:: django
{# Load the tag library #}
{% load bootstrap3 %}
{# Load CSS and JavaScript #}
{% bootstrap_css %}
{% bootstrap_javascript %}
{# Display django.contrib.messages as Bootstrap alerts #}
{% bootstrap_messages %}
{# Display a form #}
<form action="/url/to/submit/" method="post" class="form">
{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
<button type="submit" class="btn btn-primary">
{% bootstrap_icon "star" %} Submit
</button>
{% endbuttons %}
</form>
{# Read the documentation for more information #}
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Contents:
.. toctree::
:maxdepth: 2

readme
installation
settingsoptions
quickstart
templatetags
settings
contributing
authors
history
15 changes: 10 additions & 5 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
Installation
============

At the command line::
The preferred way to install ``django-bootstrap3 ``pip`` to install::

$ easy_install django-bootstrap3
$ pip install django-bootstrap3

Or, if you have virtualenvwrapper installed::
Alternatively, you can install download or clone this repo and install from its folder with::

$ mkvirtualenv django-bootstrap3
$ pip install django-bootstrap3
$ pip install -e .

In your project, you should add ``django-bootstrap3`` to your ``requirements.txt``.

Be sure to use ``virtualenv`` if you develop python projects.

After installation, the :doc:`quickstart` will get you on your way to using ``django-bootstrap3``.
25 changes: 25 additions & 0 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
==========
Quickstart
==========

After :doc:`installation`, you can use ``django-bootstrap3`` in your templates.:

Load the ``bootstrap3`` library and use the ``bootstrap_*`` tags:


Example template
----------------

.. include:: example_template.rst


Template tags and filters
-------------------------

Refer to :doc:`templatetags` for more information.


Settings
--------

You can set defaults for ``django-bootstrap3`` in your settings file. Refer to :doc:`settings` for more information.
1 change: 0 additions & 1 deletion docs/readme.rst

This file was deleted.

35 changes: 35 additions & 0 deletions docs/settings.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
========
Settings
========

The django-bootstrap3 has some pre-configured settings.

They can be modified by adding a dict variable called ``BOOTSTRAP3`` in your ``settings.py`` and customizing the values ​​you want;

The ``BOOTSTRAP3`` dict variable is configured by default to the following values​​:


.. code:: django
# Default settings
BOOTSTRAP3_DEFAULTS = {
'jquery_url': '//code.jquery.com/jquery.min.js',
'base_url': '//netdna.bootstrapcdn.com/bootstrap/3.1.1/',
'css_url': None,
'theme_url': None,
'javascript_url': None,
'javascript_in_head': False,
'include_jquery': False,
'horizontal_label_class': 'col-md-2',
'horizontal_field_class': 'col-md-4',
'set_required': True,
'form_required_class': '',
'form_error_class': '',
'form_renderers': {
'default': 'bootstrap3.renderers.FormRenderer',
},
'field_renderers': {
'default': 'bootstrap3.renderers.FieldRenderer',
'inline': 'bootstrap3.renderers.InlineFieldRenderer',
},
}
26 changes: 0 additions & 26 deletions docs/settingsoptions.rst

This file was deleted.

0 comments on commit 4133cfe

Please sign in to comment.