Skip to content

Commit

Permalink
docs: add new requirements for creating a model.
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-nfc committed Nov 7, 2024
1 parent 3e75673 commit 5d92082
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/projects/centurion_erp/development/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,18 @@ All models must meet the following requirements:

- contains a `Meta` sub-class with following attributes:

- `verbose_name_plural`
- `ordering` _Order the results are returned in._

- `verbose_name` _Name of the Model._

- `verbose_name_plural` _Plural Name of the model_

- If creating a new model, function `access.functions.permissions.permission_queryset()` has been updated to display the models permission(s)

- Attribute `page_layout` is defined with the models UI page layout

- Attribute `table_fields` is defined with the fields to display by default for viewing the model within a table.


## Checklist

Expand All @@ -53,6 +61,9 @@ This section details the additional items that may need to be done when adding a

- If the model is a primary model, add it to the model link slash command in `app/core/lib/slash_commands/linked_model.py` function `command_linked_model`

!!! tip
It's a good idea to create the initial model class, then create and add the model tests for that class. This way you can run the tests to ensure that the requirements are met. Of Note, the tests may not cover ALL of the requirements section, due diligence will need to be exercised.


## History

Expand Down

0 comments on commit 5d92082

Please sign in to comment.