2 Commits f4c5e6c9bb ... 1d6bacbb37

Auteur SHA1 Message Date
  Étienne Deparis 1d6bacbb37 Be more chatty about the customizable options in the README il y a 6 ans
  Étienne Deparis f4c5e6c9bb Be more chatty about the customizable options in the README il y a 6 ans
1 fichiers modifiés avec 20 ajouts et 34 suppressions
  1. 20 34
      README.md

+ 20 - 34
README.md

@@ -98,49 +98,21 @@ want to customize to fit your needs:
 | `DEBUG`                        | [Django debug mode][3]                                                               | `False`               | *development mode only* |
 | `ORGANIZATION_NAME`            | Name of your organization, for which you want to edit transparency reports.          | `"Transparency inc."` |                         |
 | `SETUP_COST_STAGGERING_MONTHS` | How many months do you want setup costs to be staggering accross                     | `36`                  |                         |
+| `PROVISIONING_DURATIONS`       | What provisionning durations will be available in the report forms.                  | See below             |                         |
+| `RESOURCES_UNITS`              | What resources units will be available in the report forms.                          | See below             |                         |
 
 [2]: https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-SECRET_KEY
 [3]: https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-DEBUG
 
-Two more options are customizable:
-
-**`PROVISIONING_DURATIONS`**
-
-This is a list of tuples, allowing you to define what provisionning
-durations will be available in the report forms.
-
-The default values are:
+Both `PROVISIONING_DURATIONS` and `RESOURCES_UNITS` are lists of
+tuples. Their default values are respectively:
 
 ```python
 PROVISIONING_DURATIONS = [
     (datetime.timedelta(days=365*3), '3 ans'),
     (datetime.timedelta(days=365*5), '5 ans'),
 ]
-```
-
-You can overwrite it, or adding new possibility, like this:
-
-```python
-PROVISIONING_DURATIONS.append((datetime.timedelta(days=182), '6 mois'))
-```
-
-or
-
-```python
-PROVISIONING_DURATIONS += [
-    (datetime.timedelta(days=182), '6 mois'),
-    (datetime.timedelta(days=365*8), '8 ans'),
-]
-```
 
-**`RESOURCES_UNITS`**
-
-This is a list of tuples, allowing you to define what resources units
-will be available in the report forms.
-
-The default values are:
-
-```python
 RESOURCES_UNITS = [
     ('a', 'A'),
     ('mbps', 'Mbps'),
@@ -151,8 +123,7 @@ RESOURCES_UNITS = [
 ]
 ```
 
-As for the previous list, you can overwrite it or just append new values
-to it:
+You can totally overwrite them:
 
 ```python
 RESOURCES_UNITS = [
@@ -160,3 +131,18 @@ RESOURCES_UNITS = [
     ('cube', 'Brique')
 ]
 ```
+
+Or just add new possibility, like this:
+
+```python
+PROVISIONING_DURATIONS.append((datetime.timedelta(days=182), '6 mois'))
+```
+
+or this:
+
+```python
+PROVISIONING_DURATIONS += [
+    (datetime.timedelta(days=182), '6 mois'),
+    (datetime.timedelta(days=365*8), '8 ans'),
+]
+```