Repository navigation
Add an example project - #14
Merged
Merged
Conversation
A small comics catalogue in example/ that shows LookupWidget on a ForeignKey, a ManyToManyField and a CharField with choices, using lookups over models and over a plain list. Migrating loads sample data to search. Its styles show the selected values inside the search box.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a small Django project in
example/so users can seeLookupWidgetworking before they wire it into their own app. It's a comics catalogue: one form edits an issue's series, language and characters.What it shows
SeriesLookupon aForeignKey, withrank_fields, a customlabel,select_relatedandmax_results = 10. Searching "man" demonstrates both ranking and the cut-off message.CharacterLookupon aManyToManyFieldwithmultiple=True, searching name and alias.LanguageLookup, a plainLookupover a list, on aCharFieldwith choices. The model field's choices still validate the submitted value.IZAYA_CLASSESand a small stylesheet that put the selected values inside the search box. The form page also logsizaya:selectandizaya:removeevents.Running it
The page loads htmx 2.0.11 from jsdelivr, so it needs a network connection.
Other changes
pyproject.toml: per-file ruff ignores forexample/, like the existing ones fortests/*..gitignore: ignoresexample/db.sqlite3.README.mdlinks to the example, andCHANGELOG.mdhas an entry under Unreleased.The example isn't packaged, because the build only includes
izaya/. CI doesn't run it either.