You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in wq/wq#18, it would be nice to be able to have templates generated automatically based on the current model configuration.
Here's how I envision making this work:
Create template snippets for common field types (text, date, number, <input type=radio> for choice, <select> for foreign key)
Create a wq.start tool that reads an XLSForm and assembles a model class and an *_edit.html template (and the detail and list templates for good measure). The template would be generated once and placed in the templates/ folder so it could be customized and compiled into the offline app.
Create a wq.start tool that creates the same templates based off of a registered model. Reference the serializer fields rather than model fields since the serializer is what's actually processing the form, and it may have more/fewer fields than the model. (EDIT: split out from previous step)
Eventually, figure out a way to update (or at least validate) existing templates when new fields are added - e.g. "Your template is missing an <input> for the field ..." moved to tool to validate templates #23
Introduce an option in ./deploy.sh (or a similar process) to automatically generate and/or update templates during every build. This would facilitate the quick creation of simple CRUD applications that only need a model (like how the Django admin works).
The text was updated successfully, but these errors were encountered:
As discussed in wq/wq#18, it would be nice to be able to have templates generated automatically based on the current model configuration.
Here's how I envision making this work:
<input type=radio>
for choice,<select>
for foreign key)wq.start
tool that reads an XLSForm and assembles a model class and an *_edit.html template (and the detail and list templates for good measure). The template would be generated once and placed in thetemplates/
folder so it could be customized and compiled into the offline app.wq.start
tool that creates the same templates based off of a registered model. Reference the serializer fields rather than model fields since the serializer is what's actually processing the form, and it may have more/fewer fields than the model. (EDIT: split out from previous step)Eventually, figure out a way to update (or at least validate) existing templates when new fields are added - e.g. "Your template is missing anmoved to tool to validate templates #23<input>
for the field ..."./deploy.sh
(or a similar process) to automatically generate and/or update templates during every build. This would facilitate the quick creation of simple CRUD applications that only need a model (like how the Django admin works).The text was updated successfully, but these errors were encountered: