Minimizing code repetitions in ExampleApp by using Zontroy code generator #3
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.
Minimizing code repetitions in ExampleApp by using Zontroy code generator
Hi πββοΈ @JV-Cunha
By using Zontroy code generator, coding costs were reduced by minimizing code repetitions in ExampleApp.
To explain this briefly, I first created a database from mssql to prevent this code repetition. Then, I ran the Zontroy code generator and made the necessary configuration settings to connect the database I had previously created to Zontroy. Then I pulled the tables of this database from the zontroy in the form of entities and arranged the sections that were the same as the code template but only with different labels, so that the names of the tables and fields in the database would appear. For this, I used zsif and zref file types, which are specific to zontro. For more detailed information, you can check out https://docs.zontroy.com/ . I hope it was useful for you. π
Images of sections where code duplication is prevented using Zontroy
Input: urls.py.zsif:
Output: urls.py:
Input: example_model_zg-lower(((zg-entity...zg-name))).html.zref:
Output: example_model_create.html:
Output: example_model_delete.html:
Output: example_model_detail.html:
Output: example_model_update.html: