From 5aedc1563138fde415d984e6af339b1bdf36aa47 Mon Sep 17 00:00:00 2001 From: Matt Austin Date: Wed, 14 Sep 2011 10:51:52 +0800 Subject: [PATCH 1/6] Moved django app files in to bootstrapform directory. --- __init__.py => bootstrapform/__init__.py | 0 models.py => bootstrapform/models.py | 0 {templates => bootstrapform/templates}/bootstrap_form/form.html | 0 {templatetags => bootstrapform/templatetags}/__init__.py | 0 {templatetags => bootstrapform/templatetags}/bootstrap.py | 0 tests.py => bootstrapform/tests.py | 0 views.py => bootstrapform/views.py | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename __init__.py => bootstrapform/__init__.py (100%) rename models.py => bootstrapform/models.py (100%) rename {templates => bootstrapform/templates}/bootstrap_form/form.html (100%) rename {templatetags => bootstrapform/templatetags}/__init__.py (100%) rename {templatetags => bootstrapform/templatetags}/bootstrap.py (100%) rename tests.py => bootstrapform/tests.py (100%) rename views.py => bootstrapform/views.py (100%) diff --git a/__init__.py b/bootstrapform/__init__.py similarity index 100% rename from __init__.py rename to bootstrapform/__init__.py diff --git a/models.py b/bootstrapform/models.py similarity index 100% rename from models.py rename to bootstrapform/models.py diff --git a/templates/bootstrap_form/form.html b/bootstrapform/templates/bootstrap_form/form.html similarity index 100% rename from templates/bootstrap_form/form.html rename to bootstrapform/templates/bootstrap_form/form.html diff --git a/templatetags/__init__.py b/bootstrapform/templatetags/__init__.py similarity index 100% rename from templatetags/__init__.py rename to bootstrapform/templatetags/__init__.py diff --git a/templatetags/bootstrap.py b/bootstrapform/templatetags/bootstrap.py similarity index 100% rename from templatetags/bootstrap.py rename to bootstrapform/templatetags/bootstrap.py diff --git a/tests.py b/bootstrapform/tests.py similarity index 100% rename from tests.py rename to bootstrapform/tests.py diff --git a/views.py b/bootstrapform/views.py similarity index 100% rename from views.py rename to bootstrapform/views.py From 7457cd6847d8a2f46e0e0b7d1d993f89c4d9195a Mon Sep 17 00:00:00 2001 From: Matt Austin Date: Wed, 14 Sep 2011 10:53:18 +0800 Subject: [PATCH 2/6] Renamed template location from bootstrap_form/form.html to bootstrapform/form.html for naming consistency. --- .../templates/{bootstrap_form => bootstrapform}/form.html | 0 bootstrapform/templatetags/bootstrap.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename bootstrapform/templates/{bootstrap_form => bootstrapform}/form.html (100%) diff --git a/bootstrapform/templates/bootstrap_form/form.html b/bootstrapform/templates/bootstrapform/form.html similarity index 100% rename from bootstrapform/templates/bootstrap_form/form.html rename to bootstrapform/templates/bootstrapform/form.html diff --git a/bootstrapform/templatetags/bootstrap.py b/bootstrapform/templatetags/bootstrap.py index f49af35..d7af1be 100644 --- a/bootstrapform/templatetags/bootstrap.py +++ b/bootstrapform/templatetags/bootstrap.py @@ -6,7 +6,7 @@ register = template.Library() @register.filter def bootstrap(form): - template = get_template("bootstrap_form/form.html") + template = get_template("bootstrapform/form.html") context = Context({'form': form}) return template.render(context) From 5712bea9a5166e34d1ff0b82833eafdbb8057b47 Mon Sep 17 00:00:00 2001 From: Matt Austin Date: Wed, 14 Sep 2011 10:55:04 +0800 Subject: [PATCH 3/6] Removed/cleared unused django default app files. --- bootstrapform/models.py | 3 --- bootstrapform/tests.py | 16 ---------------- bootstrapform/views.py | 1 - 3 files changed, 20 deletions(-) delete mode 100644 bootstrapform/tests.py delete mode 100644 bootstrapform/views.py diff --git a/bootstrapform/models.py b/bootstrapform/models.py index 71a8362..e69de29 100644 --- a/bootstrapform/models.py +++ b/bootstrapform/models.py @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/bootstrapform/tests.py b/bootstrapform/tests.py deleted file mode 100644 index 501deb7..0000000 --- a/bootstrapform/tests.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -This file demonstrates writing tests using the unittest module. These will pass -when you run "manage.py test". - -Replace this with more appropriate tests for your application. -""" - -from django.test import TestCase - - -class SimpleTest(TestCase): - def test_basic_addition(self): - """ - Tests that 1 + 1 always equals 2. - """ - self.assertEqual(1 + 1, 2) diff --git a/bootstrapform/views.py b/bootstrapform/views.py deleted file mode 100644 index 60f00ef..0000000 --- a/bootstrapform/views.py +++ /dev/null @@ -1 +0,0 @@ -# Create your views here. From becc2ca70dcdcf769d5a98ea0ae5b230ecc37cd7 Mon Sep 17 00:00:00 2001 From: Matt Austin Date: Wed, 14 Sep 2011 10:55:46 +0800 Subject: [PATCH 4/6] Corrected usage (typo) in README. --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index dc06637..b8a624e 100644 --- a/README +++ b/README @@ -6,4 +6,4 @@ usage: {% load bootstrap %} -{{ form|bootstrape }} +{{ form|bootstrap }} From c8ff849e87557e263ca121244b3c618ff6aadd8e Mon Sep 17 00:00:00 2001 From: Matt Austin Date: Wed, 14 Sep 2011 10:59:37 +0800 Subject: [PATCH 5/6] Added setup.py and MANIFEST.in. --- MANIFEST.in | 2 ++ setup.py | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 MANIFEST.in create mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..1f25df8 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include README +graft bootstrapform/templates diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..84307de --- /dev/null +++ b/setup.py @@ -0,0 +1,11 @@ +from setuptools import setup, find_packages + + +setup(name='django-bootstrap-form', + author='Matt Austin', author_email='mail@mattaustin.me.uk', + url='https://github.com/MattAustin/django-bootstrap-form', + packages=find_packages(), + include_package_data=True, + install_requires=['django'], + ) + From ef73559f626db0625839b3dbdc4b180814b41cbb Mon Sep 17 00:00:00 2001 From: Matt Austin Date: Wed, 14 Sep 2011 11:12:07 +0800 Subject: [PATCH 6/6] Added version information. --- bootstrapform/__init__.py | 5 +++++ bootstrapform/meta.py | 5 +++++ setup.py | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 bootstrapform/meta.py diff --git a/bootstrapform/__init__.py b/bootstrapform/__init__.py index e69de29..4a793f7 100644 --- a/bootstrapform/__init__.py +++ b/bootstrapform/__init__.py @@ -0,0 +1,5 @@ +from bootstrapform.meta import VERSION + + +__version__ = str(VERSION) + diff --git a/bootstrapform/meta.py b/bootstrapform/meta.py new file mode 100644 index 0000000..ed62168 --- /dev/null +++ b/bootstrapform/meta.py @@ -0,0 +1,5 @@ +from distutils.version import StrictVersion + + +VERSION = StrictVersion('0.1.0') + diff --git a/setup.py b/setup.py index 84307de..9aaa8e0 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,11 @@ from setuptools import setup, find_packages +from bootstrapform.meta import VERSION setup(name='django-bootstrap-form', author='Matt Austin', author_email='mail@mattaustin.me.uk', url='https://github.com/MattAustin/django-bootstrap-form', + version=str(VERSION), packages=find_packages(), include_package_data=True, install_requires=['django'],