fix random typos found while reading the project

This commit is contained in:
crccheck 2013-11-19 18:44:28 -06:00
parent d00ba18db1
commit 66a0ebfe99
7 changed files with 20 additions and 20 deletions

6
README
View file

@ -17,9 +17,9 @@ Installation
3. When deploying on production server, run :-
python manage.py collectstatic
4. Add `django_select` to your urlconf if you use any 'Auto' fields.
url(r'^select2/', include('django_select2.urls')),
@ -71,7 +71,7 @@ Changelog Summary
* Updated Select2 to version 3.4.1. **Please note**, that if you need any of the Select2 locale files, then you need to download them yourself from http://ivaynberg.github.com/select2/ and add to your project.
* Address isssue[#36](https://github.com/applegrew/django-select2/issues/36) - Fix importerror under django1.6.
* Fuxed the way `setup.py` handles unicode files while minfying them during package build.
* Fixed the way `setup.py` handles unicode files while minfying them during package build.
* Address isssue[#39](https://github.com/applegrew/django-select2/issues/39) - MultipleSelect2HiddenInput.render() should use mark_safe().
* Address isssue[#45](https://github.com/applegrew/django-select2/issues/45) - MultipleSelect2HiddenInput returns bad has_changed value.

View file

@ -17,9 +17,9 @@ Installation
3. When deploying on production server, run :-
python manage.py collectstatic
4. Add `django_select` to your urlconf if you use any 'Auto' fields.
url(r'^select2/', include('django_select2.urls')),
@ -71,7 +71,7 @@ Changelog Summary
* Updated Select2 to version 3.4.1. **Please note**, that if you need any of the Select2 locale files, then you need to download them yourself from http://ivaynberg.github.com/select2/ and add to your project.
* Address isssue[#36](https://github.com/applegrew/django-select2/issues/36) - Fix importerror under django1.6.
* Fuxed the way `setup.py` handles unicode files while minfying them during package build.
* Fixed the way `setup.py` handles unicode files while minfying them during package build.
* Address isssue[#39](https://github.com/applegrew/django-select2/issues/39) - MultipleSelect2HiddenInput.render() should use mark_safe().
* Address isssue[#45](https://github.com/applegrew/django-select2/issues/45) - MultipleSelect2HiddenInput returns bad has_changed value.

View file

@ -23,13 +23,13 @@ Widgets are generally of two types :-
2. **Heavy** --
They are suited for scenarios when the number of options are large and need complex queries
(from maybe different sources) to get the options. This dynamic fetching of options undoubtably requires
(from maybe different sources) to get the options. This dynamic fetching of options undoubtedly requires
Ajax communication with the server. Django-Select2 includes a helper JS file which is included automatically,
so you need not worry about writing any Ajax related JS code. Although on the server side you do need to
create a view specifically to respond to the queries.
Heavies have further specialized versions called -- **Auto Heavy**. These do not require views to server Ajax
request. When they are instantiated, they register themselves with one central view which handels Ajax requests
request. When they are instantiated, they register themselves with one central view which handles Ajax requests
for them.
Heavy widgets have the word 'Heavy' in their name. Light widgets are normally named, i.e. there is no 'Light' word

View file

@ -24,8 +24,8 @@ class JSFunction(JSVar):
"""
A JS function name.
From rendering point of view, rendering this is no different from :py:class:`JSVar`. After all, a JS varible
can refer a function instance, primitive constant or any other object. They are still all varibles.
From rendering point of view, rendering this is no different from :py:class:`JSVar`. After all, a JS variable
can refer a function instance, primitive constant or any other object. They are still all variables.
.. tip:: Do use this marker for JS functions. This will make the code clearer, and the purpose more easier to
understand.
@ -41,7 +41,7 @@ class JSFunctionInContext(JSVar):
needs to be invoked in the context of a Html DOM, such that, ``this`` inside the function refers to that DOM instead of
``window``.
.. tip:: JS functions of this type are warapped inside special another JS function -- ``django_select2.runInContextHelper``.
.. tip:: JS functions of this type are wrapped inside special another JS function -- ``django_select2.runInContextHelper``.
"""
pass

View file

@ -71,7 +71,7 @@ class Select2Mixin(object):
This mixin is responsible for rendering the necessary Javascript and CSS codes which turns normal ``<select>``
markups into Select2 choice list.
The following Select2 otions are added by this mixin:-
The following Select2 options are added by this mixin:-
* minimumResultsForSearch: ``6``
* placeholder: ``''``

View file

@ -20,9 +20,9 @@ Installation
3. When deploying on production server, run::
python manage.py collectstatic
4. Add `django_select` to your urlconf **if** you use any 'Auto' fields::
url(r'^select2/', include('django_select2.urls')),
5. (Optionally) If you need multiple processes support, then::
@ -35,7 +35,7 @@ Available Settings
``AUTO_RENDER_SELECT2_STATICS`` [Default ``True``]
..................................................
This, when specified and set to ``False`` in ``settings.py`` then Django_Select2 widgets won't automatically include the required scripts and stylesheets. When this setting is ``True`` then every Select2 field on the page will output ``<script>`` and ``<link>`` tags to include the required JS and CSS files. This is convinient but will output the same JS and CSS files multiple times if there are more than one Select2 fields on the page.
This, when specified and set to ``False`` in ``settings.py`` then Django_Select2 widgets won't automatically include the required scripts and stylesheets. When this setting is ``True`` then every Select2 field on the page will output ``<script>`` and ``<link>`` tags to include the required JS and CSS files. This is convenient but will output the same JS and CSS files multiple times if there are more than one Select2 fields on the page.
When this settings is ``False`` then you are responsible for including the JS and CSS files. To help you with this the following template tags are available in ``django_select2_tags``.
@ -43,9 +43,9 @@ When this settings is ``False`` then you are responsible for including the JS an
* ``import_django_select2_css`` - Outputs ``<link>`` tags to include all the CSS files, required by Light and Heavy widgets.
* ``import_django_select2_js_css`` - Outputs both ``<script>`` and ``<link>`` tags to include all the JS and CSS files, required by Light and Heavy widgets.
.. tip:: Make sure to include them at the top of the page, prefereably in ``<head>...</head>``.
.. tip:: Make sure to include them at the top of the page, preferably in ``<head>...</head>``.
.. note:: (Since version 3.3.1) The above temaple tags accept one argument ``light``. Default value for that is ``0``.
.. note:: (Since version 3.3.1) The above template tags accept one argument ``light``. Default value for that is ``0``.
If that is set to ``1`` then only the JS and CSS libraries needed by Select2Widget (Light fields) are rendered.
That effectively leaves out ``heavy.js`` and ``extra.css``.
@ -65,7 +65,7 @@ This setting cannot be enabled as it is not required when ``GENERATE_RANDOM_SELE
In production servers usually multiple server processes are run to handle the requests. This poses a problem for Django Select2's Auto fields since they generate unique Id at runtime when ``GENERATE_RANDOM_SELECT2_ID`` is enabled. The clients can identify the fields in ajax query request using only these generated ids. In multi-processes scenario there is no guarantee that the process which rendered the page is the one which will respond to ajax queries.
When this mode is enabled then Django Select2 maintains an id to field key mapping in DB for all processes. Whenever a process does not find an id in its internal map it looks-up in the central DB. From DB it finds the field key. Using the key, the process then looks-up a field instance with that key, since all instaces with same key are assumed to be equivalent.
When this mode is enabled then Django Select2 maintains an id to field key mapping in DB for all processes. Whenever a process does not find an id in its internal map it looks-up in the central DB. From DB it finds the field key. Using the key, the process then looks-up a field instance with that key, since all instances with same key are assumed to be equivalent.
.. tip:: Make sure to run ``python manage.py syncdb`` to create the ``KeyMap`` table.
@ -88,7 +88,7 @@ External Dependencies
---------------------
* Django - This is obvious.
* jQuery - This is not included in the package since it is expected that in most scenarios this would already be available. The above template tags also won't out ``<script>`` tag to include this. You need to do this yourself.
* jQuery - This is not included in the package since it is expected that in most scenarios this would already be available. The above template tags also won't output ``<script>`` tag to include this. You need to do this yourself.
* Memcached (python-memcached) - If you plan on running multiple python processes, which is usually the case in production, then you need to turn on ``ENABLE_SELECT2_MULTI_PROCESS_SUPPORT``. In that mode it is highly recommended that you use Memcached, to minimize DB hits.
Example Application

View file

@ -177,7 +177,7 @@ AUTO_RENDER_SELECT2_STATICS = False
#GENERATE_RANDOM_SELECT2_ID = True
##
# To test for multiple processes in developement system w/o WSGI, runserver at
# To test for multiple processes in development system w/o WSGI, runserver at
# different ports. Use $('#select2_field_html_id').data('field_id') to get the id
# in one process. Now switch to another port and use
# $('#select2_field_html_id').data('field_id', "id from previous process") to set