소스 검색

Format docs

Denis K 8 년 전
부모
커밋
ccf7c99221
4개의 변경된 파일23개의 추가작업 그리고 25개의 파일을 삭제
  1. 1 1
      docs/autocomplete.rst
  2. 15 17
      docs/dashboard_custom_module.rst
  3. 6 6
      docs/dashboard_modules.rst
  4. 1 1
      docs/install_dashboard.rst

+ 1 - 1
docs/autocomplete.rst

@@ -65,7 +65,7 @@ Example from Django JET demo site:
 .. note::
 .. note::
     This work for both ForeignKey and ManyToManyField fields.
     This work for both ForeignKey and ManyToManyField fields.
 
 
-Disabling autocomplete for form fields
+Disabling Autocomplete For Form Fields
 --------------------------------------
 --------------------------------------
 
 
 Autocomplete is nice, but sometimes you don't want this behaviour (e.x. because you want to limit the provided
 Autocomplete is nice, but sometimes you don't want this behaviour (e.x. because you want to limit the provided

+ 15 - 17
docs/dashboard_custom_module.rst

@@ -5,9 +5,9 @@ Custom Dashboard module
 
 
 In order create your own dashboard module you need to follow these steps:
 In order create your own dashboard module you need to follow these steps:
 
 
-- Inherit :ref:`Dashboard Module <Dashboard Module>`
-- Create module template
-- *(optional) Add module views*
+* Inherit :ref:`Dashboard Module <Dashboard Module>`
+* Create module template
+* *(optional) Add module views*
 
 
 Also you can always see build-in modules as examples in ``jet/dashboard/modules.py`` file and
 Also you can always see build-in modules as examples in ``jet/dashboard/modules.py`` file and
 ``jet/dashboard/dashboard_modules/`` directory on the repository.
 ``jet/dashboard/dashboard_modules/`` directory on the repository.
@@ -16,12 +16,11 @@ Inherit Dashboard Module
 ------------------------
 ------------------------
 
 
 
 
-- Create dashboard modules file ``dashboard_modules.py`` (or any other you prefer) inside your Django application
--
-    Create dashboard module class inherited from base :ref:`dashboard module <Dashboard Module>` class and add it to
-    ``dashboard_modules.py`` file. You can see list of all available module attributes :ref:`here <Dashboard Module>`.
-    ``init_with_context`` method allows you to load data and initialize module's state. You can store data in
-    module's fields as this instance will be passed to template.
+* Create dashboard modules file ``dashboard_modules.py`` (or any other you prefer) inside your Django application
+* Create dashboard module class inherited from base :ref:`dashboard module <Dashboard Module>` class and add it to
+  ``dashboard_modules.py`` file. You can see list of all available module attributes :ref:`here <Dashboard Module>`.
+  ``init_with_context`` method allows you to load data and initialize module's state. You can store data in
+  module's fields as this instance will be passed to template.
 
 
 Example of ``dashboard_modules.py``:
 Example of ``dashboard_modules.py``:
 
 
@@ -40,12 +39,11 @@ Example of ``dashboard_modules.py``:
             def init_with_context(self, context):
             def init_with_context(self, context):
                 self.children = Ticket.objects.order_by('-date_add')[:self.limit]
                 self.children = Ticket.objects.order_by('-date_add')[:self.limit]
 
 
--
-    Optionally you can add customizable module settings and content which will be seen in administration interface.
-    For customizable settings ``settings_form`` should be set, also ``settings_dict`` and ``load_settings`` methods
-    should be implemented. For customizable content items ``child_form``, ``child_name`` and ``child_name_plural``
-    should be set, also ``store_children`` should return ``True``. You can validate loaded from database children
-    in ``__init__`` method.
+* Optionally you can add customizable module settings and content which will be seen in administration interface.
+  For customizable settings ``settings_form`` should be set, also ``settings_dict`` and ``load_settings`` methods
+  should be implemented. For customizable content items ``child_form``, ``child_name`` and ``child_name_plural``
+  should be set, also ``store_children`` should return ``True``. You can validate loaded from database children
+  in ``__init__`` method.
 
 
 .. image:: _static/dashboard_module_settings.png
 .. image:: _static/dashboard_module_settings.png
     :width: 100%
     :width: 100%
@@ -99,7 +97,7 @@ Example of ``LinkList`` dashboard module which has custom settings and editable
             title = forms.CharField(label='Title')
             title = forms.CharField(label='Title')
             external = forms.BooleanField(label='External link', required=False)
             external = forms.BooleanField(label='External link', required=False)
 
 
-Create module template
+Create Module Template
 ----------------------
 ----------------------
 
 
 Create template at path specified in module class. Module instance is passed to template as ``module`` variable
 Create template at path specified in module class. Module instance is passed to template as ``module`` variable
@@ -134,7 +132,7 @@ so you can get data directly from it.
         </ul>
         </ul>
 
 
 
 
-Add module views (optional)
+Add Module Views (Optional)
 ---------------------------
 ---------------------------
 
 
 If your dashboard module needs to have own views you can register them the following way and store for example
 If your dashboard module needs to have own views you can register them the following way and store for example

+ 6 - 6
docs/dashboard_modules.rst

@@ -1,8 +1,8 @@
 =================
 =================
-Dashboard modules
+Dashboard Modules
 =================
 =================
 
 
-Build-in dashboard modules
+Build-In Dashboard Modules
 ==========================
 ==========================
 
 
 LinkList
 LinkList
@@ -50,7 +50,7 @@ Feed
 .. autoclass:: jet.dashboard.modules.Feed
 .. autoclass:: jet.dashboard.modules.Feed
    :members:
    :members:
 
 
-Google Analytics widgets
+Google Analytics Widgets
 ========================
 ========================
 
 
 .. attention::
 .. attention::
@@ -81,7 +81,7 @@ Extra Installation
    from jet.dashboard.dashboard_modules import google_analytics_views
    from jet.dashboard.dashboard_modules import google_analytics_views
 
 
 
 
-Usage example
+Usage Example
 -------------
 -------------
    .. code-block:: python
    .. code-block:: python
 
 
@@ -107,7 +107,7 @@ Usage example
 .. autoclass:: jet.dashboard.dashboard_modules.google_analytics.GoogleAnalyticsPeriodVisitors
 .. autoclass:: jet.dashboard.dashboard_modules.google_analytics.GoogleAnalyticsPeriodVisitors
    :members:
    :members:
 
 
-Yandex Metrika widgets
+Yandex Metrika Widgets
 ======================
 ======================
 
 
 .. attention::
 .. attention::
@@ -133,7 +133,7 @@ Extra Installation
    from jet.dashboard.dashboard_modules import yandex_metrika_views
    from jet.dashboard.dashboard_modules import yandex_metrika_views
 
 
 
 
-Usage example
+Usage Example
 -------------
 -------------
    .. code-block:: python
    .. code-block:: python
 
 

+ 1 - 1
docs/install_dashboard.rst

@@ -1,5 +1,5 @@
 ======================
 ======================
-Dashboard installation
+Dashboard Installation
 ======================
 ======================
 
 
 .. note::
 .. note::