Skip to content

Commit e9d6fee

Browse files
authored
Fix readme (#34)
1 parent 70b5ffb commit e9d6fee

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ For example, in the `Log` model of the source data, there are three boolean fiel
134134
For this model, we define the `color` property as follows.
135135

136136
- The `color` property has the value 'red' if the field `is_online == False`.
137-
- If `is_online == True` and both `is_trouble1` and `is_trouble1` fields are False, then the value of the property is 'green'.
138-
- If `is_online == True` and at least one of the fields `is_trouble1` and `is_trouble1` is True, then the property has the value 'yellow'.
137+
- If `is_online == True` and both `is_trouble1` and `is_trouble2` fields are False, then the value of the property is 'green'.
138+
- If `is_online == True` and at least one of the fields `is_trouble1` and `is_trouble2` is True, then the property has the value 'yellow'.
139139

140140
```python
141141
# models.py
@@ -233,12 +233,16 @@ class MyDateRange(DateRange):
233233

234234
You can override the following attributes.
235235

236+
- `FILTER_LABEL`: Title of the filter.
237+
- `BUTTON_LABEL`: Text on the apply filter button.
236238
- `FROM_LABEL`: The label of the start date field.
237239
- `TO_LABEL`: The label of the end date field.
238240
- `ALL_LABEL`: The label of the menu item for displaying all records.
239241
- `CUSTOM_LABEL`: The label of the menu item when date range is set.
240242
- `NULL_LABEL`: The label of the menu item for displaying records without date.
241243
- `is_null_option`: Set this attribute to `False` to remove the option to display record without date from the filter menu.
244+
- `parameter_start_mask`: Mask of the GET request parameter name for the start date of the date range.
245+
- `parameter_end_mask`: Mask of the GET request parameter name for the end date of the date range.
242246
- `DATE_FORMAT`: Hint about the format of the date and time fields.
243247

244248
You can change the date/time input format to your own.

READMEru.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ admin.site.register(Log, Admin)
126126
Для этой модели мы определяем свойство `color` следующим образом.
127127

128128
- Свойство `color` имеет значение 'red', если поле `is_online == False`.
129-
- Если `is_online == True` и оба поля `is_trouble1` и `is_trouble1` имеют значение False, то свойство имеет значение 'green'.
130-
- Если `is_online == True` и хотя бы одно из полей `is_trouble1` и `is_trouble1` имеет значение True, то свойство имеет значение 'yellow'.
129+
- Если `is_online == True` и оба поля `is_trouble1` и `is_trouble2` имеют значение False, то свойство имеет значение 'green'.
130+
- Если `is_online == True` и хотя бы одно из полей `is_trouble1` и `is_trouble2` имеет значение True, то свойство имеет значение 'yellow'.
131131

132132
```python
133133
# models.py
@@ -225,12 +225,16 @@ class MyDateRange(DateRange):
225225

226226
Можно переопределять следующие атрибуты.
227227

228+
- `FILTER_LABEL`: Заголовок фильтра.
229+
- `BUTTON_LABEL`: Текст кнопки применения фильтра.
228230
- `FROM_LABEL`: Текст у поля начальной даты.
229231
- `TO_LABEL`: Текст у поля конечной даты.
230232
- `ALL_LABEL`: Текст пункта меню фильтра для отображения всех записей.
231233
- `CUSTOM_LABEL`: Текст пункта меню фильтра при использовании интервала дат.
232234
- `NULL_LABEL`: Текст пункта меню фильтра для отображения записей без даты.
233235
- `is_null_option`: Установите этот атрибут в `False`, чтобы убрать из меню фильтра пункт отображения записей без даты.
236+
- `parameter_start_mask`: Маска имени параметра GET-запроса для начальной даты диапазона дат.
237+
- `parameter_end_mask`: Маска имени параметра GET-запроса для конечной даты диапазона дат.
234238
- `DATE_FORMAT`: Текст подсказки о формате полей даты и времени.
235239

236240
Вы можете изменить формат ввода даты/времени на собственный.

0 commit comments

Comments
 (0)