Closed kellanjacobs closed 12 years ago
I'm not certain exactly what the current problem is. Messages seem to display correctly at present. Could you please elaborate on what's breaking or what functionality isn't being exposed?
Yes they do display correctly. They will always display with an yellow message box at present. bootstrap has a class for alert-error alert-success and alert-information that will change the message box color be better show the severity of the message.
The code currently applies django default classes which do not match bootstraps classes. Django has an easy way to modify those classes. https://docs.djangoproject.com/en/dev/ref/contrib/messages/
Yeah, but by adding "alert-" to the class before {{ message.tags }} it nows displays with Bootstrap's styling added in. That's what I did in the commit referenced above.
Django's tags are just "error", "info", and "success" ("debug" and "warning" are outliers, but they should fail silently) and those are the same that Bootstrap wants so it shouldn't cause any problems.
Perfectly fine solution.
I will admit I am not a bootstrap fan. I hate that it causes divtitus. Its funny I expected you would say something about me using sass instead of less.
I would love to hear suggestions on alternatives. I will gladly make the switch so another framework. Just want something easy to use for the project. Also you are welcome to just rip out what I did and change it to something better. I know you are much more skilled on the frontend than I am.
Kellan
On Jun 10, 2012, at 1:00 AM, Joey reply@reply.github.com wrote:
Bootstrap doesn't scope any of their CSS. It's super annoying. What I've done before is wrap all of it in .bootsrap.
Reply to this email directly or view it on GitHub: https://github.com/noisebridge/pyclass-project/issues/52#issuecomment-6226686
The classes that django uses for the built in message handler needs to be overwritten and changed to match bootstrap.