Giter Club home page Giter Club logo

django-chosen's People

Contributors

adrienlemaire avatar daonb avatar fdintino avatar h1d avatar lanior avatar revolunet avatar rfleschenberg avatar sjdemartini avatar strongriley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-chosen's Issues

Bug in JS optimization

chosen.jquery.js line 266:
$ = (typeof window.django != 'undefined') ? django.jQuery : jQuery;

gets optimized(?) to
a=(django?django.jQuery:jQuery)

This results in an error when not using django.jQuery

README incorrect + maintenance ?

Hi

Your README is wrong, you copied it from your python-blogger project and didn't update it correctly

By the way, the proper format to install from pip is pip install -e git+git://github.com/theatlantic/django-chosen.git#egg=django-chosen, that can be added in a requirements.txt file. As you already created a setup.py, you could also upload it on the pip packages.

Other point, you didn't commit anything since August, so I'm wondering if this project is still maintained ?

Thank you very much for your answers, and for your hard work on this project

installation issue

Hello,

I have installed django-chosen extension by PIP successfully,

$ pip install -e git+git://github.com/theatlantic/django-chosen.git#egg=django-chosen

however when I try to import it in my forms.py:

"import from chosen import forms as chosenforms"

it throws an error. It doesn't see it. Any idea why? The documentation doesn't mention any other setup steps. So I am really stuck on this.

Many thanks for your advice,
Houman

P.S. this is how I installed it:

`$ sudo pip install -e git+git://github.com/theatlantic/django-chosen.git#egg=django-chosen

Obtaining django-chosen from git+git://github.com/theatlantic/django-chosen.git#egg=django-chosen
Cloning git://github.com/theatlantic/django-chosen.git to /src/django-chosen
Running setup.py egg_info for package django-chosen

warning: manifest_maker: MANIFEST.in, line 5: unknown action 'reverse-include'

Installing collected packages: django-chosen
Running setup.py develop for django-chosen
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files

warning: manifest_maker: MANIFEST.in, line 5: unknown action 'reverse-include'

Creating /usr/local/lib/python2.7/dist-packages/django-chosen.egg-link (link to .)
Adding django-chosen 0.1 to easy-install.pth file

Installed /src/django-chosen

Successfully installed django-chosen
Cleaning up...`

translated field name

On the two admin models where I use chosen widgets, the verbose_name field labels ,translated using gettext like the others are showing up untranslated.

I'll try to integrate without overriding the field to see if it's better.

Minified version not up to date

This line is different, and making the minified version break, at least on django1.4:

$ = (typeof window.django != 'undefined') ? django.jQuery : jQuery;

Works fine when using the non-minified version.

Apart from that, I really like your tool. Thanks!

label_from_instance with django chosen

Hi,

I have this below that customised my model multiplechoicefield.
How do I integrate this with django chosens chosenforms.ChosenMultipleChoiceField?
class UserMultiChoiceField(ModelMultipleChoiceField):
def label_from_instance(self, obj):
return "%s | %s %s" % (obj.sotup.nric, obj.sotup.first_name, obj.sotup.last_name)

Issue with ChosenSelect in admin

Installed using instructions provided here. ChosenSelect performs fine on pages I make myself, but is giving me issues when used in the admin. In particular, I have:

models.py:
class MyModel(models.Model)
  othermodel = models.ForeignKey(otherModel)

forms.py
class MyModelForm(models.ModelForm)
  class Meta:
    model = MyModel
    widgets = { 'othermodel':chosen.widgets.ChosenSelect() }

admin.py
class MyModelAdmin(admin.ModelAdmin)
  form = MyModelForm

When I do this, I get a "weird looking" admin page. Fields have been rearranged/jostled, but Chosen is not working properly. Is this related to various copies of jquery not playing well with one another?

Deprecation note and pointer to django-select2-forms

Hi guys. Great work on this.

However, I just found out that you've deprecated this module in favor of django-select2-forms by going through the open issues. A little pointer in the readme might be nice, so everyone knows that there's an even greater library for select fields out there.

`overlay` option doesn't work in admin

Since django-admin uses an old version of jQuery (1.4.2), and django-chosen uses jQuery included in django-admin, el.data('placeholder') returns null

One approach would be to use jQuery instead of django.jQuery if provided.
Then I could include my own version of jQuery into the model admin.

ChosenModelMultipleChoiceField, blocking null=True ?

I have a model in an app like this :

class Member(models.Model):
    ....
    category = models.ManyToManyField(MemberCategory, 
                      blank=True, 
                      null=True, verbose_name=_(u'category'))

admin.py:

class MemberAdminForm(forms.ModelForm):
    category = chosenforms.ChosenModelMultipleChoiceField(
        overlay=_(u"Choose one or more categories"), 
        queryset=MemberCategory.objects.all())    

With this setup, I cannot save the model without choosing a category : it's like if null=True was overriden

static files missing

very strange. I installed django-chosen on my Mac and onto my Linux VM using pip install (with or without -e option)
On the mac, I have the static folder, but not on Linux.
Perhaps you're missing a MANIFEST.IN file to specify .css and .js files ?

tag new release

Please tag a new release as there are some bugs in the current one (django ternary, using older jquery deprecated functions...)

installation help?

pip install -e git+git://github.com/theatlantic/django-chosen.git#egg=django-chosen
--editable=git+git://github.com/theatlantic/django-chosen.git is not the right format; it must have #egg=Package

any idea why this wouldn't work?

select break with too many value list

Hello i made a form with fk
widgets = {
'market': chosenforms.ChosenSelect(),
}
It is working with a small list or in local
but on web server it is broken like this after click on the select is open and break it :

out of box

if you have an idea about that ? regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.