bug in django-select2 design with bootstrap - select field to narrow - django

I have a django 1.6.2 project (python 3.3), with bootstrap 3 theme. I have installed the wanted https://github.com/t0m/select2-bootstrap-css, and it is working properly.
But 'select' field is too narrow (tight).
This is a known bug (https://github.com/t0m/select2-bootstrap-css/issues/42)
Does anybody know the solution?
Does anybody know another django widget for ajax selection form field?

I think, I've found a trivial solution:
https://github.com/t0m/select2-bootstrap-css/issues/42#issuecomment-68210742

Related

Horizontal radio fields support of django-baton in Django Admin

radio fields defined as horizontal in Django Admin is displayed vertically after django baton installed. Will there be a fix for this issue.
Thank you..
I was able to reproduce this bug, it was fixed in release 1.1.2, please upgrade your django baton installation.
Note
I'm very glad you help me finding out bugs on this project. Just one thing. When you find something like this one or the other bug described here (change links in tabular inlines not displayed after django-baton installed), you'd rather file them in the proper issues page on github: https://github.com/otto-torino/django-baton/issues. While, if you need help on something, then this is the right place to go. Bye!

django-tinymce modern theme

I'm having issues getting the modern theme to work with django-tinymce. Both the simple and the advanced themes render correctly, but when I switch to the modern theme nothing renders and I get a 404 error for /static/tiny_mce/themes/modern/editor_template.js in the console
I am attempting to do all of this in the django admin. The error is coming from /static/tiny_mce/tiny_mce.js which is interesting because I don't have anything installed in that directory. I'm using /static/js/tinymce as my TINYMCE_JS_ROOT in settings.py. When switching between simple and advanced theme, everything works correctly.
I've tried to copy a version of editor_template.js in the exact location it's looking, but I still get the 404. It's like it wipes out /static/tiny_mce if it exists and replaces it with something, but I can't figure out how/where it's getting that from.
I'm using an install of TinyMCE 4.1.3 from http://www.tinymce.com/download/download.php and django 1.6.5
I've been struggling with TinyMCE recently, as well. I'm using TinyMCE v4 and Django 1.6. I went down the django-tinymce/django-flatpages-tinymce route because I had these working on another project. Some how it wasn't working for this new project. I did some research and decided to just go straight TinyMCE, no Django applications (eg, no django-tinymce or django-flatpages-tinymce).
This method cuts down on all configuration in Django, and it can be completely handled within the tinymce.init call. I found this much easier than dealing with Django's settings files, overriding models, etc. Just simply find the template you want TinyMCE to spice up and add the init call there.
The example here for full featured example really helped me:
http://www.tinymce.com/tryit/full.php
This use the modern theme...
I simply added this to whichever change_form.html template for whatever model I was needing the rich editor. For instance for flatpages:
admin/flatpages/flatpage/change_form.html
Or custom model in app:
admin/custom_app/model_name/change_form.html
I know this is exactly an answer to your question, but I think it's worth thinking about and might help you ultimately get what you need.
Also, I should note, it looks like only modern theme is available for TinyMCE v4:
http://www.tinymce.com/wiki.php/Tutorial:Migration_guide_from_3.x

Creating Dynamic combobox in multiple front-end Django 1.4 and jQuery?

sorry if you do not understand the translation but I need help with Django 1.4, the fact is that I need an example or a tutorial how to create multiple dynamic backend comboboxes in html form, the combobox data are obtained from the database and should be saved.
An example http://www.martiniglesias.eu/demos/combobox/index.php
The idea of this example is using Django 1.4, Mysql and Jquery.
Any question, if not let me know please understand, I will be attentive to your feedback.
Thank you!.
You can use dajaxproject to get data for dynamic combobox, here is an example: http://www.dajaxproject.com/forms/

Date Picker Styling Sitecore

I'm working on a sitecore project where i'm using WFFM (Web Forms For Marketers), I have a form and would like to change the styling of a date picker. By default it appears with -'s. I ant /'s.
One way would be:
$('.scfDatePickerTextBox').val().replace(/-/g,'/')
Theres no option to change the styles? that I know of? Any help guidance would be grateful.
When using WFFM as your forms builder i think it is not possible to style the dateformat.
When adding a date field, it always shows up as three droplists:
see this image: http://content.screencast.com/users/MoonCrawler/folders/Jing/media/627a9a76-de8d-4ad7-9097-81e21d38f54c/2013-01-30_1658.png
If you want to change styles (display) assign different css class. if your date is displayed with -'s in stead of /'s then i think you are using a custom form, you should be able configure the output of the date via the code behind file.
if this does not help, please provide sitecore version, WFFM version and type of form used.

How to replace ManytoMany widget against an iPad compatible widget?

Personally I don't think Django's built-in widget for ManyToManyField relationship is particularly good. Especially when it comes down to use it on an iPad, the widget is neither intuitive nor practical (you have no ctrl button to hold down to multi select).
So I am battling this issue now for one week, trying to make a formset with forms that include each a dropdown.
My attempts to achieve the solution above, have also been fruitless so far.
So I thought maybe its a good time to take a step back and ask the community:
What would you do in my shoes? If you were given a requirement like this, how would you replace the M2M widget? What options do I have?
I just found out about the admin M2M widget according to this question on Stackoverflow.
django.contrib.admin.widgets.FilteredSelectMultiple
It is a bit big and not very pretty, but would do the job.
I have found this tutorial and followed every step. But the widget is still showing as a plain M2M widget instead of the admin one. The css and js are loaded correctly (no indication of 404) but still the old widget shows up.
Many Thanks,
Try using chosen library. You can download it from here: http://harvesthq.github.com/chosen/.
To integrate it with django try django-chosen application. You could install it from PIP or directly download sources from github.