- commit
- 6b7250cfbaeabcc38d849adf1ff12a53b79f3fdb
- parent
- 5cea3206313e081715ca153c74e80cc1a4402547
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2022-08-10 06:46
make package name independent of bootstrap version
Diffstat
20 files changed, 17 insertions, 17 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
@@ -1 +1 @@1 -1 recursive-include django_bs4/templates *.html-1 1 recursive-include django_bs/templates *.html
diff --git a/README.md b/README.md
@@ -1,7 +1,7 @@1 -1 Bootstrap 4 forms for Django2 -1 ============================-1 1 Bootstrap forms for Django -1 2 ========================== 3 34 -1 Bootstrap 4 integration for django using [widget templates] that were-1 4 Bootstrap integration for django using [widget templates] that were 5 5 introduced in Django 1.11. 6 6 7 7 Motivation @@ -17,7 +17,7 @@ Installation 17 17 18 18 Install with pip: 19 1920 -1 pip install django-bs4-1 20 pip install 'django-bs==4.*' # for bootstrap 4 21 21 22 22 After that you have to add it to `INSTALLED_APPS`. You also need to make sure 23 23 that the correct `FORM_RENDERER` is selected and `django.forms` is in @@ -26,7 +26,7 @@ templates can be overwritten: 26 26 27 27 INSTALLED_APPS = [ 28 28 …29 -1 'django_bs4',-1 29 'django_bs', 30 30 … 31 31 'django.forms', 32 32 … @@ -37,7 +37,7 @@ templates can be overwritten: 37 37 Usage 38 38 ----- 39 3940 -1 The following template tags are included in the `bootstrap4` library:-1 40 The following template tags are included in the `bootstrap` library: 41 41 42 42 - `bootstrap_field {boundfield}` - Render a single field. 43 43 - `bootstrap_form {form}` - Render errors and all fields for a form. The
diff --git a/django_bs4/__init__.py b/django_bs/__init__.py
@@ -23,4 +23,4 @@ def patched(self, *args, **kwargs): 23 23 24 24 25 25 setattr(BoundField, 'as_widget', patched)26 -1 logger.debug('BoundField.as_widget() has been patched by django-bs4.')-1 26 logger.debug('BoundField.as_widget() has been patched by django-bs.')
diff --git a/django_bs4/templates/bs4/field.html b/django_bs/templates/bs/field.html
diff --git a/django_bs4/templates/bs4/form.html b/django_bs/templates/bs/form.html
@@ -1,4 +1,4 @@1 -1 {% load bootstrap4 %}-1 1 {% load bootstrap %} 2 2 3 3 {% for error in form.non_field_errors %} 4 4 <div class="alert alert-danger" role="alert">{{ error }}</div>
diff --git a/django_bs4/templates/bs4/messages.html b/django_bs/templates/bs/messages.html
@@ -1,4 +1,4 @@1 -1 {% load bootstrap4 %}-1 1 {% load bootstrap %} 2 2 {% for message in messages %} 3 3 <div class="{{ message|bootstrap_message_classes }}" role="alert"> 4 4 {{ message }}
diff --git a/django_bs4/templates/bs4/pagination.html b/django_bs/templates/bs/pagination.html
@@ -1,4 +1,4 @@1 -1 {% load i18n bootstrap4 %}-1 1 {% load i18n bootstrap %} 2 2 3 3 <ul class="pagination {% if size %}pagination-{{ size }}{% endif %}"> 4 4 <li class="page-item {% if not page.has_previous %}disabled{% endif %}">
diff --git a/django_bs4/templates/django/forms/widgets/checkbox.html b/django_bs/templates/django/forms/widgets/checkbox.html
diff --git a/django_bs4/templates/django/forms/widgets/checkbox_option.html b/django_bs/templates/django/forms/widgets/checkbox_option.html
diff --git a/django_bs4/templates/django/forms/widgets/clearable_file_input.html b/django_bs/templates/django/forms/widgets/clearable_file_input.html
diff --git a/django_bs4/templates/django/forms/widgets/file.html b/django_bs/templates/django/forms/widgets/file.html
diff --git a/django_bs4/templates/django/forms/widgets/input.html b/django_bs/templates/django/forms/widgets/input.html
diff --git a/django_bs4/templates/django/forms/widgets/multiple_input.html b/django_bs/templates/django/forms/widgets/multiple_input.html
diff --git a/django_bs4/templates/django/forms/widgets/multiwidget.html b/django_bs/templates/django/forms/widgets/multiwidget.html
diff --git a/django_bs4/templates/django/forms/widgets/radio_option.html b/django_bs/templates/django/forms/widgets/radio_option.html
diff --git a/django_bs4/templates/django/forms/widgets/select.html b/django_bs/templates/django/forms/widgets/select.html
diff --git a/django_bs4/templates/django/forms/widgets/textarea.html b/django_bs/templates/django/forms/widgets/textarea.html
diff --git a/django_bs4/templatetags/__init__.py b/django_bs/templatetags/__init__.py
diff --git a/django_bs4/templatetags/bootstrap4.py b/django_bs/templatetags/bootstrap.py
@@ -42,7 +42,7 @@ def bootstrap_url_replace_param(url, key, value): 42 42 ]) 43 43 44 4445 -1 @register.inclusion_tag('bs4/field.html')-1 45 @register.inclusion_tag('bs/field.html') 46 46 def bootstrap_field( 47 47 boundfield, 48 48 addon_before=None, @@ -64,19 +64,19 @@ def bootstrap_field( 64 64 } 65 65 66 6667 -1 @register.inclusion_tag('bs4/form.html')-1 67 @register.inclusion_tag('bs/form.html') 68 68 def bootstrap_form(form): 69 69 return { 70 70 'form': form, 71 71 } 72 72 73 7374 -1 @register.inclusion_tag('bs4/messages.html', takes_context=True)-1 74 @register.inclusion_tag('bs/messages.html', takes_context=True) 75 75 def bootstrap_messages(context): 76 76 return context 77 77 78 7879 -1 @register.inclusion_tag('bs4/pagination.html', takes_context=True)-1 79 @register.inclusion_tag('bs/pagination.html', takes_context=True) 80 80 def bootstrap_pagination( 81 81 context, 82 82 page,
diff --git a/setup.py b/setup.py
@@ -2,8 +2,8 @@ from setuptools import find_packages, setup 2 2 3 3 4 4 setup(5 -1 name='django-bs4',6 -1 description='simple bootstrap4 support for django',-1 5 name='django-bs', -1 6 description='simple bootstrap support for django', 7 7 long_description=open('README.md').read(), 8 8 long_description_content_type='text/markdown', 9 9 url='https://github.com/xi/django-bs',