Views
Views are used with Centurion ERP to Fetch the data for rendering as html. We have templated our views to aid in quick development. We have done this by adding to our views the required pieces of logic so as to ensure the right information is available. The available API can be found within the API Views docs.
The views that we use are:
-
Models index page
-
For adding data to model tables
-
Changing data within a model
-
Delete a model
-
Display a model
Common test cases are available for views. These test cases can be found within the API docs under model view test cases.
Requirements
All views are to meet the following requirements:
-
is defined as a class
-
View class inherits from one of the above listed views
-
View class has the following attributes definedL
-
Add and change views to use a form class
Tests
The following unit test cases exist for views:
Tip
The AllViews
test class is an aggregation of all views. This class is the recommended test class to include if the model uses all available views.
Docs to clean up
Note
The below documentation is still to be developed. As such what is written below may be incorrect.
Templates
The base template includes blocks that are designed to assist in rendering your content. The following blocks are available:
-
title
- The page and title -
content_header_icon
- Header icon that is middle aligned with the page title, floating right. -
body
- The html content of the page
About:
This page forms part of our Project Centurion ERP.
Page Metadata
Version: ToDo: place files short git commit hereDate Created: 2024-07-12
Date Edited: 2024-07-15
Contribution:
Would You like to contribute to our Centurion ERP project? You can assist in the following ways:
- Edit This Page If there is a mistake or a way you can improve it.
- Add a Page to the Manual if you would like to add an item to our manual
- Raise an Issue if there is something about this page you would like to improve, and git is unfamiliar to you.
ToDo: Add the page list of contributors