The following is a part (the rest being in models an views) of an upload-file mechanism in my forms.py:
from crispy_forms.layout import Div
class DocumentForm(forms.Form):
docfile = forms.FileField(label='Select a BAM file')
Div('docfile', style="background: black;", css_class="col-sm-6 col-md-9 col-lg-9")
HTML
{% crispy form %} # this way the file, naturally, does not upload well
I'm aware that there is a lot more elaborate ways of doing this but really I just want the upload to be functional which it is and from there I'd like to control the CSS/bootstrap...
Help Please!!!
The following is a part (the rest being in models an views) of an upload-file mechanism in my forms.py:
from crispy_forms.layout import Div class DocumentForm(forms.Form): docfile = forms.FileField(label='Select a BAM file') Div('docfile', style="background: black;", css_class="col-sm-6 col-md-9 col-lg-9")