-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add data insertion modal boxes #16
Comments
forms are computed by django, subclassing |
mfrasca
added a commit
that referenced
this issue
Apr 29, 2019
mfrasca
added a commit
that referenced
this issue
May 5, 2019
mfrasca
added a commit
that referenced
this issue
May 5, 2019
mfrasca
added a commit
that referenced
this issue
May 5, 2019
mfrasca
added a commit
that referenced
this issue
May 5, 2019
mfrasca
added a commit
that referenced
this issue
May 5, 2019
mfrasca
added a commit
that referenced
this issue
May 6, 2019
the two remaining points moved to individual issues. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
logic
some objects (Contact, Accession, Location, Taxon) can be added without relation to previously inserted data. they don't need a parent object. Taxon is a border case, since a Taxon has a 'parent' taxon property, but that's not characterizing the object, it may even change. Plant and Verification only make sense in combination with an Accession and that's an immutable property. in fact, the URL to a Plant as well as the URL to a Verification contain their related Accession code.
objects are added, or edited. the javascript client requests editing forms from the django server. the django server serves pre-populated forms for specific objects, and empty forms for new objects. forms are not cached. forms served by django only contain table rows, while the client holds the rest of the form. the javascript client adds the POST verb to empty forms, because that's for new objects, and the PUT verb to pre-populated forms, because that's for editing objects. we use PUT and not PATCH because every time we're rewriting the whole edited object.
URL logic
let's collect the URL involved in this story.
all URLs are named, after the class, plus an optional suffix.
-list
;-detail
;-infobox
;-post-form
;-put-form
;concrete urls regarding the same object or the same collection can be computed one from the other, like they all share the same prefix, so that the javascript code can juggle with replacing suffixes.
things to do
The text was updated successfully, but these errors were encountered: