Appengine Python - How to filter tab content depending if entity has been created
When rendering the page just check if the assessment exists by retrieving it from the Consult (I imagine you store the assessment key inside the Consult).
That's it
I have a page View-Consult with 4 bootstrap tabs.
There are two entities retrieved from the Datastore on this page (Consult and Assessment). The consult is created first and the assessment later (by a different user).
Note: Consults have a property called "consult_status" that is PENDING before the Assessment is added, and COMPLETED after. This may be useful as a condition.
The properties from the Consult populate the first 3 bootstrap tabs. The Assessment properties are displayed in the 4th tab.
There will be a period where the Assessment has not been completed and the View-Consult page will need to display a message in the 4th tab saying "This consult is currently awaiting assessment. You will be notified by email when it is complete."
How would I create and test for this condition and render the appropriate output inside tab 4, depending if the Assessment is complete or not.
Note also: The Consult and Assessment have the same ID, so perhaps a better condition would be to check if there exists an Assignment with the current Consult ID. If not display message "awaiting assessment".