Skip to content

Commit e4a7852

Browse files
committed
Improve english II
1 parent fa208a0 commit e4a7852

File tree

2 files changed

+29
-28
lines changed

2 files changed

+29
-28
lines changed

CHANGES.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
* Remove MSFList (`01dcad230dc368b88a39bfc36f90ddd145f381a2 <https://github.com/goinnn/django-multiselectfield/commit/01dcad230dc368b88a39bfc36f90ddd145f381a2>`_):
77

88
* Removed: (`50d3f785883e0a314f2dc89950e3fe1e88a7ede6 <https://github.com/goinnn/django-multiselectfield/commit/50d3f785883e0a314f2dc89950e3fe1e88a7ede6>`_)
9-
* It was created to add support for MultiSelectFields in Admin.list_display. But it never does work. If you add a multiselect field to list_display, django does not call to __str__ method of MSGList (renamed to MSFList)
10-
* It was created for integer choices too and it is a misconception. Explained in the README file.
9+
* It was created to support MultiSelectFields in admin.list_display, but it never actually worked. If you add a multiselect field to list_display, Django does not call to __str__ method of MSGList (renamed to MSFList)
10+
* It was created for integer choices too and it is a misconception. This is explained in the README file.
1111

1212
* Remove MSFFlatchoices (`01dcad230dc368b88a39bfc36f90ddd145f381a2 <https://github.com/goinnn/django-multiselectfield/commit/01dcad230dc368b88a39bfc36f90ddd145f381a2>`_):
1313

1414
* Removed: (`5638247c1d70670d4f81adf35143ef17a7d7575e <https://github.com/goinnn/django-multiselectfield/commit/5638247c1d70670d4f81adf35143ef17a7d7575e>`_)
15-
* Now, in list_display, the labels of the choices are shown (separated by commas) instead of the values (separated by commas).
15+
* In list_display, labels for the choices are now shown (comma-separated) instead of the values of the choices (comma-separated).
1616

17-
* In to_python method value is a list or a string. (`c4579138dda2833cbce26afbf57da5353aa45690 <https://github.com/goinnn/django-multiselectfield/commit/c4579138dda2833cbce26afbf57da5353aa45690>`_)
17+
* In to_python method, value is a list or a string. (`c4579138dda2833cbce26afbf57da5353aa45690 <https://github.com/goinnn/django-multiselectfield/commit/c4579138dda2833cbce26afbf57da5353aa45690>`_)
1818

1919
* Remove set case and dict case
20-
* Please, If this breaks something, you can create a test to understand the use case
20+
* If this breaks something, please create a test to help understand the use case.
2121

2222
* Removing integer choices:
2323

24-
* It was an error. MultiSelectField inheritances of CharField, not IntegerField.
24+
* It was a mistake. MultiSelectField inherits of CharField, not IntegerField.
2525
* It is impossible knows if original choice is (1, 'Item title 2.1') or ('1', 'Item title 2.1')
2626

2727

@@ -38,7 +38,7 @@
3838

3939
* Documentation:
4040

41-
* How add a filter to the Django administration:
41+
* How to add a filter to the Django administration:
4242

4343
* (`e36cbae4c3b39dac4a3fee03fdda9622a101f22d <https://github.com/goinnn/django-multiselectfield/commit/e36cbae4c3b39dac4a3fee03fdda9622a101f22d>`_)
4444
* Inspired by (`#116 <https://github.com/goinnn/django-multiselectfield/issues/116>`_)
@@ -48,23 +48,23 @@
4848
* (`5638247c1d70670d4f81adf35143ef17a7d7575e <https://github.com/goinnn/django-multiselectfield/commit/5638247c1d70670d4f81adf35143ef17a7d7575e>`_)
4949

5050

51-
* How add support for read-only fields in the Django administration:
51+
* How to add support for read-only fields in the Django administration:
5252

5353
* (`65376239ae7491414f896adb4d314349ff7c2667 <https://github.com/goinnn/django-multiselectfield/commit/65376239ae7491414f896adb4d314349ff7c2667>`_)
5454

55-
* Clean old code:
55+
* Cleanup: Removed outdated code and updated compatibility:
5656

57-
* Update syntax for targeted versions of Python and Django. (`#161 <https://github.com/goinnn/django-multiselectfield/pull/161>`_)
57+
* Updated syntax for the targeted Python and Django versions. (`#161 <https://github.com/goinnn/django-multiselectfield/pull/161>`_)
5858

59-
* Add pre-commit (`#161 <https://github.com/goinnn/django-multiselectfield/pull/161>`_)
59+
* Add pre-commit hooks (`#161 <https://github.com/goinnn/django-multiselectfield/pull/161>`_)
6060

61-
* Fix Github actions
61+
* Fixed GitHub Actions workflow.
6262

63-
* Remove travis configuration
63+
* Removed Travis CI configuration.
6464

65-
* Coveralls integrations
65+
* Fix Coveralls integrations
6666

67-
* Improve readme. Right version of Python / Django
67+
* Improved the README: clarified the correct versions of Python and Django.
6868

6969

7070
Thanks to:

README.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ django-multiselectfield
1111
.. image:: https://badge.fury.io/py/django-multiselectfield.png
1212
:target: https://badge.fury.io/py/django-multiselectfield
1313

14-
A new model field and form field. With this you can get a multiple select from a choices. Stores to the database as a CharField of comma-separated values.
14+
A new model field and form field. With this, you can get a multiple select from choices. It is stored to the database as a CharField of comma-separated values.
1515

16-
This egg is inspired by this `snippet <https://djangosnippets.org/snippets/1200/>`_.
16+
This package is inspired by this `snippet <https://djangosnippets.org/snippets/1200/>`_.
1717

1818
Supported Python versions: 3.8+
1919

@@ -67,14 +67,15 @@ Supported Django versions: 3.2+
6767
(4, 'Item title 2.4'),
6868
(5, 'Item title 2.5'))
6969
70-
# Because when MultiSelectField gets data from db, it can not know if the values are integers or strings.
70+
# Because when MultiSelectField retrieves data from db, it cannot know if the values are integers or strings.
7171
# In other words, MultiSelectField save the same data for MY_CHOICES2 and MY_INTEGER_CHOICES2
72+
# Or in practice it should be the same MY_CHOICES2 and MY_INTEGER_CHOICES2
7273
7374
7475
1.3 In your settings.py
7576
-----------------------
7677

77-
Only you need it, if you want the translation of django-multiselectfield or you need static files.
78+
Only required if you want the translation of django-multiselectfield or need its static files.
7879

7980
.. code-block:: python
8081
@@ -93,7 +94,7 @@ Only you need it, if you want the translation of django-multiselectfield or you
9394
1.4 SortMultiSelectField
9495
------------------------
9596

96-
Since version 0.1.14, this package also includes a second field type called: SortMultiSelectField.
97+
Since version 0.1.14, this package also includes a another field type called: SortMultiSelectField.
9798

9899
For this field to work, you need to include `jQuery <https://jquery.com/download/>`_ (already included in the Django admin) and `jQuery UI <https://jqueryui.com/download/>`_.
99100

@@ -102,9 +103,9 @@ You can include them by updating the ModelAdmin’s form or directly in change_f
102103
1.5 Other recommendations
103104
-------------------------
104105

105-
`Like django recommended: <https://docs.djangoproject.com/en/5.2/ref/models/fields/#django.db.models.Field.null>`_ Avoid using null on string-based fields such as CharField and TextField.
106+
`As django recommended: <https://docs.djangoproject.com/en/5.2/ref/models/fields/#django.db.models.Field.null>`_ Avoid using null on string-based fields such as CharField and TextField.
106107

107-
MultiSelectField is based on CharField (MultiSelectField inheritances of CharField). So, if you need a not required use only blank=True (null=False by default):
108+
MultiSelectField is based on CharField (MultiSelectField inheritances of CharField). So, if the field is not required, use only blank=True (null=False by default):
108109

109110
.. code-block:: python
110111
@@ -121,7 +122,7 @@ MultiSelectField is based on CharField (MultiSelectField inheritances of CharFie
121122
2.1 Customizing templates
122123
--------------------------
123124

124-
It is possible to customize the HTML of this widget in your form template. To do so, you will need to loop through ``form.{field}.field.choices``. Here is an example that displays the field label underneath/after the checkbox for a ``MultiSelectField`` called ``providers``:
125+
You can customize the HTML of this widget in your form template. To do so, you will need to loop through ``form.{field}.field.choices``. Here is an example that displays the field label underneath/after the checkbox for a ``MultiSelectField`` called ``providers``:
125126

126127
.. code-block:: HTML+Django
127128

@@ -136,7 +137,7 @@ It is possible to customize the HTML of this widget in your form template. To do
136137
2.2 Fixing CSS alignment in the Django administration
137138
------------------------------------------------------
138139

139-
Fixing alignment. The labels appear slightly lower than the checkboxes, and the label width is very small.
140+
This fixes alignment. The labels appear slightly lower than the checkboxes, and the label width is very small.
140141

141142
Include the following CSS file: multiselectfield/css/admin-multiselectfield.css
142143

@@ -190,13 +191,13 @@ You can see it in `example project <https://github.com/goinnn/django-multiselect
190191
2.4 Add a django multiselect field to list_display in Django administration
191192
----------------------------------------------------------------------------
192193

193-
Django has no built-in way to add support for custom fields.
194+
Django doesn't provide built-in support for custom fields.
194195

195196

196197
2.4.1 Option 1. Use get_FOO_display
197198
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
198199

199-
Change one by one
200+
Change them individually
200201

201202
.. code-block:: python
202203
@@ -212,7 +213,7 @@ Change one by one
212213
2.4.2 Option 2. Monkey patching Django
213214
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
214215

215-
If you have a lot of django multiselect fields in list_display previous option can be much work.
216+
If you have many django multiselect fields in list_display, the previous option can be much work.
216217

217218
You can see it in the `example project <https://github.com/goinnn/django-multiselectfield/blob/65376239ae7491414f896adb4d314349ff7c2667/example/app/apps.py#L34>`_.
218219

@@ -258,7 +259,7 @@ This code is inspired by django code. It is possible that for other versions of
258259
2.5 Add support for read-only fields in the Django administration
259260
-----------------------------------------------------------------
260261

261-
Django has no built-in way to add support for custom fields.
262+
Django doesn't provide built-in support for custom fields.
262263

263264
You can see it in the `example project <https://github.com/goinnn/django-multiselectfield/blob/65376239ae7491414f896adb4d314349ff7c2667/example/app/apps.py#L52>`_. Log in to the Django admin in the sample project using the following credentials: user-readonly / DMF-123.
264265

0 commit comments

Comments
 (0)