charettes / django-dynamic-choices Goto Github PK
View Code? Open in Web Editor NEWProvide FK and M2M dynamic choices and react to django.contrib.admin edit/add view interaction to update those choices
License: MIT License
Provide FK and M2M dynamic choices and react to django.contrib.admin edit/add view interaction to update those choices
License: MIT License
Make sure specifying an integer field is converted to int in the choices callback
ATM if a choice callback has a name with an higher alphabetically order it is not detected.
First, Thank you for this. I have been searching for this solution for a while now.
Just thought you might want to add something like the following when using Django's dev server.
Add to settings.py
PROJECT_ROOT = os.path.normpath(os.path.dirname(file))
DYNAMIC_CHOICES_MEDIA_URL = os.path.join(settings.PROJECT_ROOT, '../src/django-dynamic-choices/dynamic_choices/static/')
Add to urls.py
url(r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.DYNAMIC_CHOICES_MEDIA_URL}),
Make sure field1_field2_field3 is found with data {field1_field2:}
And make sure non-grouped choices are tested aswell
Add admin widgets interactions hooks
In order to allow it to work with readonly_fields.
I am very interested in this tool but I cannot find any documentation, please can you give a basic indication on how to use django-dynamic-choices?
Thanks!
Would only use callable and ignore passing an instance which is not up-to-date anyway.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.