django-adapters icon indicating copy to clipboard operation
django-adapters copied to clipboard

Research input/output prior art

Open LilyFoote opened this issue 8 years ago • 3 comments

One goal of this project is to improve the interface to models and other data sources.

These were mentioned in #17:

LilyFoote avatar Apr 05 '16 12:04 LilyFoote

Two more things for inspiration:

https://github.com/Mechrophile/schemagic -- more schemas. https://github.com/TriOptima/tri.form -- more forms, worth checking out.

artcz avatar Jul 04 '16 17:07 artcz

In schematics http://schematics.readthedocs.io/en/latest/usage/importing.html http://schematics.readthedocs.io/en/latest/usage/exporting.html

jpic avatar Mar 07 '18 11:03 jpic

Another snippet found when closing old prs:

+
+class MagicApp(AppConfig):
+    name = 'dal_select2'
+
+    def ready(self):
+        MagicFormMetaclass.register_formfield_for_modelfield(
+            model_field=models.ForeignKey,
+            form_field=Select2ModelChoiceField,
+        )
+
+        MagicFormMetaclass.register_formfield_for_modelfield(
+            model_field=models.OneToOneField,
+            form_field=Select2ModelChoiceField,
+        )
+
+        MagicFormMetaclass.register_formfield_for_modelfield(
+            model_field=models.ManyToManyField,
+            form_field=Select2ModelMultipleChoiceField,
+        )

https://github.com/yourlabs/django-autocomplete-light/pull/579/files

Maybe working maybe not working example :joy:

jpic avatar Mar 12 '18 21:03 jpic