These are chat archives for django/django

10th
Dec 2017
Shreya
@shreyateeza
Dec 10 2017 03:37
Hello everyone! I am new here. I would like to contribute here for gsoc 2018. How should I begin?
stduolc
@stduolc
Dec 10 2017 06:02
@shreyateeza do you find the way to join gsoc 2018?
Anish Shrestha
@annshress
Dec 10 2017 09:18

https://screenshots.firefox.com/sCQP6AherbMyyxiN/localhost

How do I get this in my forms?
I tried

self.fields['my_field'].widget = FilteredSelectMultiple(
            "Stocked Items",
            False,
            attrs=self.fields['my_field'].widget.attrs,
            choices=self.fields['my_field'].widget.choices
        )
in my MyForm.__init__
django admin site implements this in its auth.contrib.Group admin form
how can I get same features like
Filter, available and chosen stuff
Loid
@1oid
Dec 10 2017 13:44
9
Deniz Saner
@denizs
Dec 10 2017 14:24
@matrixbot In case you care, I solved my question from a few days ago as follows:
As we don’t need to add/remove sample types on runtime, I implemented a dict, which maps from a DataSource.data_type string to an absolute path of the Sample, which implements the specific data type. By using importlib, I’m able to import the correct handle for the corresponding SampleClass and query the correct db via SampleClass.objects.filter(data_source=self) from a DataSource instance. :smile:
Shreya
@shreyateeza
Dec 10 2017 15:56
@stduolc I didn't understand what you want to say