mirror of
https://github.com/HackSoftware/Django-Styleguide.git
synced 2025-02-07 07:00:50 +03:00
Add link to the system that we are using for examples.
- Fix a typo along the way
This commit is contained in:
parent
d68e304c6b
commit
90d8540b6a
|
@ -27,6 +27,10 @@ Expect often updates as we discuss & decide upon different things.
|
||||||
|
|
||||||
<!-- tocstop -->
|
<!-- tocstop -->
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Most of the examples are taken from HackSoft's Learning Management System - Odin - <https://github.com/HackSoftware/Odin>
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
**In Django, business logic should live in:**
|
**In Django, business logic should live in:**
|
||||||
|
@ -180,7 +184,7 @@ Models need to be tested only if there's something additional to them - like cus
|
||||||
|
|
||||||
If we are strict & don't do custom validation / properties, then we can test the models without actually writing anything to the database => we are going to get quicker tests.
|
If we are strict & don't do custom validation / properties, then we can test the models without actually writing anything to the database => we are going to get quicker tests.
|
||||||
|
|
||||||
Foe example, if we want to test the custom validation, here's how a test could look like:
|
For example, if we want to test the custom validation, here's how a test could look like:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
Loading…
Reference in New Issue
Block a user