Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #478 bug about missing multifield template in bootstrap3 #591

Merged
merged 1 commit into from
Feb 22, 2017
Merged

Fixes #478 bug about missing multifield template in bootstrap3 #591

merged 1 commit into from
Feb 22, 2017

Conversation

Numerico
Copy link
Contributor

@Numerico Numerico commented May 18, 2016

Closes #478

Hi!
We're using a MultiField with django-crispy-forms v.1.5.2 and were getting error bootstrap3/multifield.html cannot be found similar to #428 or #515 (which are more specific than #478 which also encompasses ButtonHolder).
We discovered that bootstrap3/multifield.html was missing, and that there was a b_ootstrap3/layout/multifield.html_ file present.
But that bootstrap3/layout/multifield.html, compared to uni_form's, was similar to https://github.com/maraujop/django-crispy-forms/blob/1.5.2/crispy_forms/templates/uni_form/multifield.html and really intended for the field only.
So we moved it to bootstrap3/multifield.html and gave it bootstrap markup.
We also created a bootstrap3/layout/multifield.html based on uni-form's https://github.com/maraujop/django-crispy-forms/blob/1.5.2/crispy_forms/templates/uni_form/layout/multifield.html and also adapted for bootstrap.
Finally, we suppose that the same would be needed in boostrap (v2) folder as this only fixes bootstrap3.

bootstrap3/layout/multifield.html moved to bootstrap3/multifield.html
and adapted for twitter bootstrap
bootstrap3/layout/multifield.html for bootstrap based on uni_form's
equivalent
@carltongibson
Copy link
Collaborator

@Numerico Thanks for this.

At this point I don't think anyone is going to notice the Bootstrap 2 version missing. But fancy adding one for Bootstrap 4? (Extra Brownie Points if you can!)

@codecov-io
Copy link

codecov-io commented May 18, 2016

Current coverage is 97.24%

Merging #591 into dev will not change coverage

@@                dev       #591   diff @@
==========================================
  Files            24         24          
  Lines          2533       2533          
  Methods           0          0          
  Messages          0          0          
  Branches        225        225          
==========================================
  Hits           2463       2463          
  Misses           70         70          
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by 3f47dfc...c466bb9

@awhillas
Copy link

I'm still getting this error:

django.template.exceptions.TemplateDoesNotExist: bootstrap3/multifield.html

I have a bootstrap3/layout/multifield.html but not bootstrap3/multifield.html?

@carltongibson
Copy link
Collaborator

Yes. This PR is hanging waiting the missing bootstrap4 match... (Fancy taking it on?)

@barrierwings-jay
Copy link

I am using bootstrap v3.3.7

I wanted to use MultiField. But I got the same error like above.

django.template.exceptions.TemplateDoesNotExist: bootstrap3/multifield.html

I ended up reaching here after figuring out solution for this error. Is it in still process of fixing this bug for bootstrap3?

@carltongibson
Copy link
Collaborator

Grrr. I was hoping that the Bootstrap 4 fix would be added but it doesn't look like it will.

I'll look to get this in shortly. Until then adding the missing template to your project will work.

@carltongibson
Copy link
Collaborator

I'm going to merge this as is (alas). Better than nothing. Someone else will need to address Bootstrap 4 at a later date.

@carltongibson carltongibson merged commit 96889db into django-crispy-forms:dev Feb 22, 2017
@santiagorevale
Copy link

Hi there! Guess the date for worrying about bootstrap4/multifield.html has come. Anyone fancying looking into this? I tried modifying the bootstrap3 one, but I have no idea what to change. I also tried looking into bootstrap4/field.html, but they are quite different.

Any help appreciated.

@carltongibson
Copy link
Collaborator

@santiagorevale Happy to help if you want to open a PR but short of that there's not much capacity for BS4 work at the moment.

@yrik
Copy link

yrik commented Feb 2, 2020

Oh, also got the issue with bootstrap4/multifield.html. Any hints on how to approach it?

@smithdc1
Copy link
Member

smithdc1 commented Feb 7, 2020

Hi @yrik

I've been doing some work on multifield support for bootstrap for here #976. Thanks for highlighting this as I hadn't quite appreciated there is a multifield layout object and a multifield input.

Slightly confusing they have templates named the same name!

If you have capacity to help shall we discuss at #976?

@cjauvin
Copy link

cjauvin commented Feb 1, 2021

Hi! I'm totally new to crispy, and while very happily trying all the suggestions from the tutorial, at https://django-crispy-forms.readthedocs.io/en/latest/layouts.html#fundamentals, I bumped into this issue.

@ottohirr
Copy link

See also open issue on crispy-bootstrap5 TemplateDoesNotExist - bootstrap5/multifield.html #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants