chore: remove depreciated docs

ref: #824 #343 #757
This commit is contained in:
2025-06-13 17:09:55 +09:30
parent 3cbe4201d0
commit 6a7dd54c58
14 changed files with 4 additions and 296 deletions

View File

@ -1,19 +0,0 @@
---
title: Common forms
description: Centurion ERP Common Forms API Documentation
date: 2024-07-12
template: project.html
about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp
---
Below you will find the API documentation for the forms that are used throughout the Centurion ERP application.
## Admin Global Model Form
This class in intended to be inherited by any form that has an administrative setting to set the model as global and to be placed within a dedicated "Global organization"
::: app.settings.forms.admin_settings_global.AdminGlobalModels
options:
inherited_members: false
heading_level: 3

View File

@ -1,57 +0,0 @@
---
title: Common Views
description: Centurion ERP Common Views API Documentation
date: 2024-07-12
template: project.html
about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp
---
Below you will find the API documentation for the views that are used throughout the Centurion ERP application.
## View
::: app.core.views.common.View
options:
inherited_members: false
heading_level: 3
## Add View
::: app.core.views.common.AddView
options:
inherited_members: true
heading_level: 3
## Change View
::: app.core.views.common.ChangeView
options:
inherited_members: true
heading_level: 3
## Delete View
::: app.core.views.common.DeleteView
options:
inherited_members: true
heading_level: 3
## Display View
::: app.core.views.common.DisplayView
options:
inherited_members: true
heading_level: 3
## Index View
::: app.core.views.common.IndexView
options:
inherited_members: true
heading_level: 3

View File

@ -1,17 +0,0 @@
---
title: Common forms
description: Centurion ERP Common Forms API Documentation
date: 2024-07-12
template: project.html
about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp
---
Below you will find the API documentation for the forms that are used throughout the Centurion ERP application.
## Model Form
::: app.core.forms.common.CommonModelForm
options:
inherited_members: false
heading_level: 3

View File

@ -1,14 +0,0 @@
---
title: Centurion Abstract Sub-Model
description: No Fuss Computings Centurion ERP Centurion Abstract sub-model documentation.
date: 2025-05-25
template: project.html
about: https://github.com/nofusscomputing/centurion_erp
---
This abstract model establishes the base features for ALL sub-models within Centurion ERP
::: app.core.models.centurion.CenturionSubModel
options:
inherited_members: true
heading_level: 2

View File

@ -1,11 +0,0 @@
---
title: History Save
description: No Fuss Computings Centurion ERP device model
date: 2024-06-16
template: project.html
about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp
---
::: app.core.mixin.history_save.SaveHistory
options:
inherited_members: true

View File

@ -6,7 +6,7 @@ template: project.html
about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp
---
This model enables the end user to define external links to be rendered alongside other models display pages. The values are added to the page context in the [Change View](../common_views.md#display-view).
This model enables the end user to define external links to be rendered alongside other models display pages.
## External Links

View File

@ -12,14 +12,10 @@ Models within Centurion ERP:
- [Centurion Base](./centurion.md)
- [Centurion Sub-Model](./centurion_sub.md)
- [Tenancy](./tenancy.md)
## Helpers
- [History Save](./core_history_save.md)
- Organization Permission Checking

View File

@ -11,4 +11,4 @@ Model Audit History is a core feature that is intended to be used to keep an aud
## Adding History to a Model
By default there is nothing that you need to do to add Audit History to a model. By virtue of inheriting from [`core.models.centurion.CenturionModel`](../api/models/centurion.md) or [`core.models.centurion.CenturionSubModel`](../api/models/centurion_sub.md) the model will have audit history setup automagically. This wizardry of the machine creates all of the necessary components that the moment you run the migrations the model has a fully functioning audit history system.
By default there is nothing that you need to do to add Audit History to a model. By virtue of inheriting from [`core.models.centurion.CenturionModel`](../api/models/centurion.md) or `core.models.centurion.CenturionSubModel` the model will have audit history setup automagically. This wizardry of the machine creates all of the necessary components that the moment you run the migrations the model has a fully functioning audit history system.

View File

@ -11,4 +11,4 @@ Model Notes is a core feature that is intended to be used so that users can plac
## Adding Model Notes to a Model
By default there is nothing that you need to do to add Model Notes to a model. By virtue of inheriting from [`core.models.centurion.CenturionModel`](../api/models/centurion.md) or [`core.models.centurion.CenturionSubModel`](../api/models/centurion_sub.md) the model will have model notes setup automagically. This wizardry of the machine creates all of the necessary components that the moment you run the migrations the model has a fully functioning model notes system.
By default there is nothing that you need to do to add Model Notes to a model. By virtue of inheriting from [`core.models.centurion.CenturionModel`](../api/models/centurion.md) or `core.models.centurion.CenturionSubModel` the model will have model notes setup automagically. This wizardry of the machine creates all of the necessary components that the moment you run the migrations the model has a fully functioning model notes system.

View File

@ -1,73 +0,0 @@
---
title: Forms
description: Centurion ERP Forms development documentation
date: 2024-07-14
template: project.html
about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp
---
Forms are used within Centurion ERP as the method to display the data from the database. Along with that they are designed to sanitise the user entered data.
## Requirements
All forms must meet the following requirements:
- is defined as a class
- inherits from [`core.forms.common.CommonModelForm`](./api/model_form.md)
- contains a `Meta` sub-class with following parameters:
- `fields`
- `model`
- Any additional filtering is done as part of an `__init__` method that also calls the super-class [`__init__`](./api/model_form.md) first
- Any filtering of a fields `queryset` is to filter the existing `queryset` not redefine it. i.e. `field[<field name>].queryset = field[<field name>].queryset.filter()`
- validating fields where the validation requires access to multiple fields is done inside the form class using function `clean`
``` py
def clean(self):
cleaned_data = super().clean()
# begin example
responsible_user = cleaned_data.get("responsible_user")
responsible_teams = cleaned_data.get("responsible_teams") example
if not responsible_user and not responsible_teams:
raise ValidationError('A Responsible User or Team must be assigned.')
# end example
# your validation after `super()` call
return cleaned_data
```
## Details Form
A details form is for the display of a models data. This form should inherit from a base form and contain any additional fields as is required for the display of the models data. Additional requirements are as follows:
- `tab` is defined as a `dict` within the class. _See [Template](./templates.md#detail)._
- There is an `__init__` class defined that sets up the additional fields.
!!! danger "Requirement"
Ensure that there is a call to the super-class `__init__` method so that the form is correctly initialised. i.e. `super().__init__(*args, **kwargs)`
## Abstract Classes
The following abstract classes exist for a forms inheritance:
- [AdminGlobalModels](./api/admin_model_form.md#model-form)
- [CommonModelForm](./api/model_form.md#model-form)

View File

@ -20,8 +20,6 @@ Centurion ERP is a Django Application. We have added a lot of little tid bits th
- [Fields](./fields.md)
- ~~[Forms](./forms.md)~~ _Scheduled for removal_
- [Models](./models.md)
- [Entity](./core/entity.md)
@ -32,8 +30,6 @@ Centurion ERP is a Django Application. We have added a lot of little tid bits th
- [Testing](./testing.md)
- ~~[Views](./views.md)~~ _Scheduled for removal_
## Icons

View File

@ -20,7 +20,7 @@ When designing or even implementing a model do consider that what is defined wit
When creating models they must meet the following requirements:
- inherits from [`core.models.centurion.CenturionModel`](./api/models/centurion.md) or if a submodel [`core.models.centurion.CenturionSubModel`](./api/models/centurion_sub.md) and its base model.
- inherits from [`core.models.centurion.CenturionModel`](./api/models/centurion.md) or if a submodel `core.models.centurion.CenturionSubModel` and its base model.
- class has the folloing objects defined:

View File

@ -180,84 +180,3 @@ Upon the UI requesting the navigation menu, the users permission are obtained, a
## Testing
As per the requirements listed above, viewsets must be tested. Although most if not all test cases are already written, if the view you create is different; You must write the test case(s) for this difference.
## Pre v1.3 Docs
!!! warning
These docs are depreciated
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](./api/common_views.md) docs.
The views that we use are:
- [Index](./api/common_views.md#index-view)
Models index page
- [Add](./api/common_views.md#add-view)
For adding data to model tables
- [Change](./api/common_views.md#change-view)
Changing data within a model
- [Delete](./api/common_views.md#delete-view)
Delete a model
- [Display](./api/common_views.md#display-view)
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 - Depreciated
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
- `form_class` for the display of [forms](./forms.md).
- `model` for which data [model](./models.md) to use.
- Add and change views to use a form class
### 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
``` html title="template.html.j2"
{% extends 'base.html.j2' %}
{% block title %}{% endblock %}
{% block content_header_icon %}<span title="View History" id="content_header_icon">H</span>{% endblock %}
{% block body %}
your content here
{% endblock %}
```

View File

@ -86,32 +86,22 @@ nav:
- projects/centurion_erp/development/api/models/centurion.md
- projects/centurion_erp/development/api/models/centurion_sub.md
- projects/centurion_erp/development/api/models/tenancy.md
- Depreciated:
- projects/centurion_erp/development/api/admin_model_form.md
- projects/centurion_erp/development/api/model_form.md
- projects/centurion_erp/development/api/token_authentication.md
- Models:
- projects/centurion_erp/development/api/models/index.md
- projects/centurion_erp/development/api/models/core_history_save.md
- projects/centurion_erp/development/api/models/external_links.md
- projects/centurion_erp/development/api/models/itam_device.md
- projects/centurion_erp/development/api/models/ticket.md
- projects/centurion_erp/development/api/common_views.md
- Serializers:
- projects/centurion_erp/development/api/serializer/index.md
@ -122,8 +112,6 @@ nav:
- projects/centurion_erp/development/fields.md
- projects/centurion_erp/development/forms.md
- projects/centurion_erp/development/models.md
- projects/centurion_erp/development/core/entity.md