Comments (4)
This sounds definitely interesting.
from django-jsonform.
Hello, thank you for this suggestion. I like the idea. I will try to add something similar in the next version (but it will take some time).
I'll provide an autocomplete widget and when the user starts typing, it will send AJAX requests to the server.
Example:
'model_id': {
'title': 'entity',
'type': 'number',
+ 'widget': 'autocomplete',
+ 'handler': '/url/of/ajax-view/'
}
The requests will be made to your view specified by the handler
keyword. This puts you in complete control of what you want to return in the response. So this feature could be used for anything, not just foreign keys.
Let me know what you think.
from django-jsonform.
Take a look at this pkg: https://github.com/pyutil/django-admin-autocomplete-all
from django-jsonform.
I've added an Autocomplete widget in v2.12.0. It can be used for getting ForeignKey ids from the server.
Please upgrade and test it out.
from django-jsonform.
Related Issues (20)
- Produce helpful error messages when default data doesn't match the schema HOT 12
- UI is inconsistent when reading recursive data HOT 2
- Trouble with Schema: Combining `anyOf` and `additionalProperties` HOT 2
- Wrong code example in allOf docs
- `DOMContentLoaded` Listener executes after DOM is already loaded, widget doesn't mount HOT 6
- Validation doesn't work properly because errorMap is sent to browser as JSON data but on the browser it is never parsed to JSON.
- Error messages (error_map) from multiple validators are not merged
- Typo in docs
- Callable schemas and initial values HOT 4
- widget.data in editor.html template is of no use
- Admin form widget not appearing locally HOT 7
- Support for dark mode HOT 2
- Validation error if choice as object in list HOT 2
- Add support for required properties array
- True and False values pass validation tests for integer/number
- Is there a way to use this widget outside of admin site? HOT 6
- Required fields validation on nested objects HOT 2
- List of items not supported HOT 2
- Union type for items not supported HOT 2
- Add 'hidden' widget HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-jsonform.