diff --git a/README.rst b/README.rst index 8bddf4a5..490d0ca3 100644 --- a/README.rst +++ b/README.rst @@ -126,17 +126,17 @@ for having the demo running within a minute. Grab the latest `django_fobi_example_app_installer.sh`: -.. code-block:: none +.. code-block:: sh - $ wget https://raw.github.com/barseghyanartur/django-fobi/stable/examples/django_fobi_example_app_installer.sh + wget https://raw.github.com/barseghyanartur/django-fobi/stable/examples/django_fobi_example_app_installer.sh Assign execute rights to the installer and run the `django_fobi_example_app_installer.sh`: -.. code-block:: none +.. code-block:: sh - $ chmod +x django_fobi_example_app_installer.sh - $ ./django_fobi_example_app_installer.sh + chmod +x django_fobi_example_app_installer.sh + ./django_fobi_example_app_installer.sh Open your browser and test the app. @@ -165,21 +165,21 @@ Installation (1) Install latest stable version from PyPI: -.. code-block:: none +.. code-block:: sh - $ pip install django-fobi + pip install django-fobi Or latest stable version from GitHub: -.. code-block:: none +.. code-block:: sh - $ pip install -e git+https://github.com/barseghyanartur/django-fobi@stable#egg=django-fobi + pip install -e git+https://github.com/barseghyanartur/django-fobi@stable#egg=django-fobi Or latest stable version from BitBucket: -.. code-block:: none +.. code-block:: sh - $ pip install -e hg+https://bitbucket.org/barseghyanartur/django-fobi@stable#egg=django-fobi + pip install -e hg+https://bitbucket.org/barseghyanartur/django-fobi@stable#egg=django-fobi (2) Add `fobi` to ``INSTALLED_APPS`` of the your projects' Django settings. Furthermore, all themes and plugins to be used, shall be added to the @@ -328,7 +328,7 @@ There are several properties, each textarea should have. They are: Let's name that plugin `sample_textarea`. The plugin directory should then have the following structure. -.. code-block:: none +.. code-block:: sh path/to/sample_textarea/ ├── __init__.py @@ -560,9 +560,9 @@ Now, that everything is ready, make sure your plugin module is added to Afterwards, go to terminal and type the following command. -.. code-block:: none +.. code-block:: sh - $ ./manage.py fobi_sync_plugins + ./manage.py fobi_sync_plugins If your HTTP server is running, you would then be able to see the new plugin in the edit form interface. @@ -599,7 +599,7 @@ Define and register the form handler plugin Let's name that plugin `sample_mail`. The plugin directory should then have the following structure. -.. code-block:: none +.. code-block:: text path/to/sample_mail/ ├── __init__.py @@ -776,9 +776,9 @@ Do not forget to add the form handler plugin module to ``INSTALLED_APPS``. Afterwards, go to terminal and type the following command. -.. code-block:: none +.. code-block:: sh - $ ./manage.py fobi_sync_plugins + ./manage.py fobi_sync_plugins If your HTTP server is running, you would then be able to see the new plugin in the edit form interface. @@ -792,7 +792,7 @@ Let's place the callback in the `foo` module. The plugin directory should then have the following structure. -.. code-block:: none +.. code-block:: text path/to/foo/ ├── __init__.py @@ -904,7 +904,7 @@ Create a new theme Let's place the theme in the `sample_theme` module. The theme directory should then have the following structure. -.. code-block:: none +.. code-block:: text path/to/sample_theme/ ├── static @@ -1065,7 +1065,7 @@ want to. Templates that you likely would want to re-write in your custom theme implementation are marked with three asterisks (\*\*\*): -.. code-block:: none +.. code-block:: text generic ├── snippets @@ -1113,7 +1113,7 @@ example. In order to see it in action, run the project with `_ option: -.. code-block:: none +.. code-block:: sh ./manage.py runserver --settings=settings_override_simple_theme @@ -1121,7 +1121,7 @@ Details explained below. Directory structure ~~~~~~~~~~~~~~~~~~~ -.. code-block:: none +.. code-block:: text override_simple_theme/ ├── static @@ -1205,7 +1205,7 @@ once granted the right to use the news plugin to all users, but later on decided to limit it to Staff members group only). Note, that superusers have access to all plugins. -.. code-block:: none +.. code-block:: text Plugin access rights management interface in Django admin @@ -1365,13 +1365,13 @@ Below a short overview of the form handler plugins. See the README.rst file in directory of each plugin for details. - `DB store - `_: + `__: Stores form data in a database. - `HTTP repost - `_: + `__: Repost the POST request to another endpoint. - `Mail - `_: + `__: Send the form data by email. Bundled themes @@ -1460,7 +1460,7 @@ passed as a context variable. In your GUI, you should be refering to the initial values in the following way: -.. code-block:: none +.. code-block:: html {{ request.path }} {{ now }} {{ today }} @@ -1641,13 +1641,13 @@ somehow doesn't appear in the list of available plugins, do run the following management command since it not only syncs your plugins into the database, but also is a great way of checking for possible errors. -.. code-block:: none +.. code-block:: sh ./manage.py fobi_sync_plugins Run the following command in order to identify the broken plugins. -.. code-block:: none +.. code-block:: sh ./manage.py fobi_find_broken_entries