Admin style by tomchristie · Pull Request #2926 · encode/django-rest-framework (original) (raw)
Refs #1904.
Very much a work-in-progress right now, but may as well make it visible as we go.
Going with a simple template-only based approach at the moment, that should render fine with existing APIs.
Considering also having a more fully featured third-party admin pacakge that does more opinionated things such as built-in Core API hypermedia support, and proper browser behavior on eg failed validation, which this version will need to handle in a more basic way. (Last part of that actually not as much of an issue as I'd thought)
TODO:
- Errors need to correctly respond in modals.
- Links in list view (prob as a control, rather than hyperlinking a field), also have a clean list fields API.
- Pagination control currently showing even for a single page.
- Hyperlinks. (Render as URL in JSON, but as text or other value in admin)
[ ] Resolve modal flash.Passing on this for now.
For 3.3.0:
- Clean up detail vs list pages and templates (extend base)
- Documentation on overriding.
- Don't always just include the format in outgoing URLs - only do so on defined links in browsable API.
- Actions and naming of buttons etc (Inc ensuring internationalized), also clean modal overriding.
- Messages on edit operations.
- Strip 'format' for the main HTML representation.
- Form modals to only include the name part of hyperlinks in select elements.
- SlugRelatedField should hyperlink.
- Update heroku example
- Filters in HTML.
- Document the HTML form API. (Possibly with eg nesting and/or list support)