Skip to content

Commit 3d7b005

Browse files
author
Dylan Verheul
committed
Fixing setup.py, fixes dyve#4
1 parent 599b3f4 commit 3d7b005

15 files changed

+29
-27
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ doc/*
88
MANIFEST
99
dist/
1010
django_bootstrap_toolkit.egg-info/
11+
build/

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recursive-include bootstrap_toolkit/templates *.html

bootstrap_toolkit/templates/bootstrap/field.html

-11
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{% load bootstrap %}
2+
3+
{% if field|input_type == "checkbox" %}
4+
{% include "bootstrap_toolkit/field_checkbox.html" %}
5+
{% else %}
6+
{% if field.field.widget.choices %}
7+
{% include "bootstrap_toolkit/field_with_choices.html" %}
8+
{% else %}
9+
{% include "bootstrap_toolkit/field_default.html" %}
10+
{% endif %}
11+
{% endif %}

bootstrap_toolkit/templates/bootstrap/field_checkbox.html bootstrap_toolkit/templates/bootstrap_toolkit/field_checkbox.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</li>
1212
</ul>
1313

14-
{% include "bootstrap/field_errors.html" %}
15-
{% include "bootstrap/field_help.html" %}
14+
{% include "bootstrap_toolkit/field_errors.html" %}
15+
{% include "bootstrap_toolkit/field_help.html" %}
1616

1717
</div> <!-- input -->

bootstrap_toolkit/templates/bootstrap/field_default.html bootstrap_toolkit/templates/bootstrap_toolkit/field_default.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{{ field }}
88

9-
{% include "bootstrap/field_errors.html" %}
10-
{% include "bootstrap/field_help.html" %}
9+
{% include "bootstrap_toolkit/field_errors.html" %}
10+
{% include "bootstrap_toolkit/field_help.html" %}
1111

1212
</div> <!-- input -->

bootstrap_toolkit/templates/bootstrap/field_with_choices.html bootstrap_toolkit/templates/bootstrap_toolkit/field_with_choices.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{{ field|as_bootstrap_choices }}
88

9-
{% include "bootstrap/field_errors.html" %}
10-
{% include "bootstrap/field_help.html" %}
9+
{% include "bootstrap_toolkit/field_errors.html" %}
10+
{% include "bootstrap_toolkit/field_help.html" %}
1111

1212
</div> <!-- input -->

bootstrap_toolkit/templates/bootstrap/form.html bootstrap_toolkit/templates/bootstrap_toolkit/form.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
{% for field in form.visible_fields %}
1010
<div class="clearfix{% if field.errors %} error{% endif %}{% if field.field.required %} required{% endif %}">
11-
{% include "bootstrap/field.html" %}
11+
{% include "bootstrap_toolkit/field.html" %}
1212
</div> <!-- clearfix -->
1313
{% endfor %}

bootstrap_toolkit/templatetags/bootstrap.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
)
1313

1414
BOOTSTRAP_BASE_URL = getattr(settings, 'BOOTSTRAP_BASE_URL',
15-
'//twitter.github.com/bootstrap/%s/' % BOOTSTRAP_VERSION
15+
'//twitter.github.com/bootstrap_toolkit/%s/' % BOOTSTRAP_VERSION
1616
)
1717

1818
BOOTSTRAP_CSS_URL = getattr(settings, 'BOOTSTRAP_CSS_URL',
19-
BOOTSTRAP_BASE_URL + 'bootstrap.min.css'
19+
BOOTSTRAP_BASE_URL + 'bootstrap_toolkit.min.css'
2020
)
2121

2222
register = template.Library()
@@ -34,12 +34,12 @@ def bootstrap_stylesheet_tag():
3434
@register.simple_tag
3535
def bootstrap_javascript_url(name):
3636
# URL to Bootstrap javascript file
37-
# http://twitter.github.com/bootstrap/1.3.0/bootstrap-dropdown.js
38-
return BOOTSTRAP_BASE_URL + 'bootstrap-' + name + '.js'
37+
# http://twitter.github.com/bootstrap_toolkit/1.3.0/bootstrap_toolkit-dropdown.js
38+
return BOOTSTRAP_BASE_URL + 'bootstrap_toolkit-' + name + '.js'
3939

4040
@register.simple_tag
4141
def bootstrap_javascript_tag(name):
42-
# HTML tag to insert bootstrap javascript file
42+
# HTML tag to insert bootstrap_toolkit javascript file
4343
return u'<script src="%s"></script>' % bootstrap_javascript_url(name)
4444

4545
@register.simple_tag
@@ -50,7 +50,7 @@ def bootstrap_media():
5050
@register.filter
5151
def as_bootstrap(form):
5252
# Filter to Bootstrap a Django form, analogous to as_p, as_table, as_ul
53-
return get_template("bootstrap/form.html").render(
53+
return get_template("bootstrap_toolkit/form.html").render(
5454
Context({
5555
'form': form
5656
})
@@ -101,7 +101,7 @@ def pagination(page, range=5):
101101
current_page = page.number
102102
range_min = max(current_page - range, 1)
103103
range_max = min(current_page + range, num_pages)
104-
return get_template("bootstrap/pagination.html").render(
104+
return get_template("bootstrap_toolkit/pagination.html").render(
105105
Context({
106106
'page': page,
107107
'num_pages': num_pages,

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
setup(
44
name='django-bootstrap-toolkit',
5-
version='1.0.3',
5+
version='1.0.4',
66
url='https://github.com/dyve/django-bootstrap-toolkit',
77
author='Dylan Verheul',
88
author_email='[email protected]',
99
license='Apache License 2.0',
1010
install_requires=['Django'],
1111
packages=['bootstrap_toolkit', 'bootstrap_toolkit.templatetags'],
12-
package_data={'bootstrap_toolkit': ['templates/bootstrap/*.html']},
12+
include_package_data=True,
1313
description='Bootstrap support for Django projects',
1414
classifiers=[
1515
"Development Status :: 4 - Beta",

0 commit comments

Comments
 (0)