Monday, February 29, 2016

Re: bootstrap django crispy forms



On Fri, Feb 26, 2016 at 7:39 AM, <clarksonchris81@gmail.com> wrote:

A simple upload button is proving difficult to implement bootstrap and css on.... My attempt is as follows:

     class DocumentForm(forms.Form):         docfile = forms.FileField(label='Choose')         def __init__(self, *args, **kwargs): # don't particularly know or care about this and the below component....           super(DocumentForm, self).__init__(*args, **kwargs) #but they are necessary to not get an error           ButtonHolder(             Div('docfile', style="background: black;", css_class="col-md-12", css_id="burton", template='home.html')             ), #the Div part is what I'm most interested in- in order to be able to style the button.

Furthermore, having set the "css_class" to "burton", I have tried referencing it in a normal css file:

     .burton{          ....        }

but that too is obviously misguided??

Can someone tell me where I'm going wrong?


I answered your other email that had a very similar set of incorrect syntax, and provided direction there.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVtx%3DeXQLH1R9H-HG9J93SQq0U9zd97km7yd%2BpssvnG%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment