gabrielulici / django-bootstrap4 Goto Github PK
View Code? Open in Web Editor NEWBootstrap 4 integration with Django.
License: Other
Bootstrap 4 integration with Django.
License: Other
Looks like this should be imported from django.forms.utils. This is an unused import in components.py, but is also imported in utils.py.
The docs state:
Download or clone this repo add it to the main file structure of your project.
but I'm not sure where inside my django project repo I should place the entire django-bootstrap4
repo folder? I just get the error:
ModuleNotFoundError: No module named 'bootstrap4'
Here's something I have:
<form action="." method="POST" enctype="multipart/form-data">
{% csrf_token %}
{% bootstrap_form userform %}
{{ formset.management_form }}
{% bootstrap_form formset %}
<div class="form-group">
<input type="submit" name="Update" value="Update" class="btn btn-primary" />
</div>
</form>
I get the error: Parameter "form" should contain a valid Django Form.
. I guess django-bootstrap4 doesn't support formsets, right?
Hello,
I tried this project with some radio buttons and the template need some changes:
form-group
does not work with radio button, they need form-check
form-check-label
, for now they have noneI pasted the example from the bootstrap doc to explain better:
<fieldset class="form-group row">
<legend class="col-form-legend col-sm-2">Radios</legend>
<div class="col-sm-10">
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
Option one is this and that—be sure to include why it's great
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
Option two can be something else and selecting it will deselect option one
</label>
</div>
<div class="form-check disabled">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="gridRadios" id="gridRadios3" value="option3" disabled>
Option three is disabled
</label>
</div>
</div>
</fieldset>
Could not find a version that satisfies the requirement django-bootstrap4 (from versions: )
No matching distribution found for django-bootstrap4
Does this tag work? I get nothing ...
{% bootstrap_form_errors form 'all' %}
But if I print out:
{{ form.errors }}
I see all my form errors.
Hello, @GabrielUlici
Please, publish your library on the Python Package Index (https://pypi.python.org/pypi).
I get the following result:
pip install django-bootstrap4
Collecting django-bootstrap4
Could not find a version that satisfies the requirement django-bootstrap4 (from versions: )
No matching distribution found for django-bootstrap4
Other packages work just fine
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.