mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-01-31 03:36:41 +03:00
Move introduction docs to the top level
This commit is contained in:
parent
a6a67a2b3d
commit
3204582143
|
@ -58,7 +58,7 @@ Contents
|
|||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
main/introduction/index
|
||||
introduction/index
|
||||
main/installation
|
||||
providers/index
|
||||
catalogs/index
|
||||
|
|
|
@ -86,12 +86,12 @@ Example
|
|||
|
||||
Let's go through next example:
|
||||
|
||||
.. literalinclude:: ../../../examples/ioc_di_demos/car_engine_1.py
|
||||
.. literalinclude:: ../../examples/ioc_di_demos/car_engine_1.py
|
||||
:language: python
|
||||
|
||||
``Car`` **creates** an ``Engine`` during its creation. Really? Does it make
|
||||
more sense then creating an ``Engine`` separatelly and then
|
||||
**put (inject) it into** ``Car`` when ``Car`` is being created?
|
||||
|
||||
.. literalinclude:: ../../../examples/ioc_di_demos/car_engine_2.py
|
||||
.. literalinclude:: ../../examples/ioc_di_demos/car_engine_2.py
|
||||
:language: python
|
|
@ -74,19 +74,19 @@ Example
|
|||
|
||||
Let's go through the code of ``example.py``:
|
||||
|
||||
.. literalinclude:: ../../../examples/ioc_di_demos/example.py
|
||||
.. literalinclude:: ../../examples/ioc_di_demos/example.py
|
||||
:language: python
|
||||
|
||||
At some point, things defined above mean, that the code from ``example.py``,
|
||||
could look different, like in ``ioc_example.py``:
|
||||
|
||||
.. literalinclude:: ../../../examples/ioc_di_demos/ioc_example.py
|
||||
.. literalinclude:: ../../examples/ioc_di_demos/ioc_example.py
|
||||
:language: python
|
||||
|
||||
Also the code from ``ioc_example.py`` could be upgraded with inversion of
|
||||
control container, like in ``ioc_container_example.py``:
|
||||
|
||||
.. literalinclude:: ../../../examples/ioc_di_demos/ioc_container_example.py
|
||||
.. literalinclude:: ../../examples/ioc_di_demos/ioc_container_example.py
|
||||
:language: python
|
||||
|
||||
.. note::
|
|
@ -9,10 +9,14 @@ follows `Semantic versioning`_
|
|||
|
||||
Development version
|
||||
-------------------
|
||||
|
||||
1.15.2
|
||||
------
|
||||
- [Refactoring] split ``catalogs`` module into smaller modules,
|
||||
``catalogs`` module become a package.
|
||||
- [Refactoring] split ``providers`` module into smaller modules,
|
||||
``providers`` module become a package.
|
||||
- Update introduction documentation.
|
||||
|
||||
1.15.1
|
||||
------
|
||||
|
|
Loading…
Reference in New Issue
Block a user