mirror of
https://github.com/Hopiu/django-embed-video.git
synced 2026-05-18 09:31:07 +00:00
44 lines
853 B
ReStructuredText
44 lines
853 B
ReStructuredText
Installation & Setup
|
|
====================
|
|
|
|
Installation
|
|
############
|
|
|
|
The simpliest way is to use pip to install the package:
|
|
|
|
.. code-block:: bash
|
|
|
|
pip install django-embed-video
|
|
|
|
|
|
If you want the latest version, you may use Git. It is fresh, but unstable.
|
|
|
|
.. code-block:: bash
|
|
|
|
pip install git+https://github.com/jazzband/django-embed-video
|
|
|
|
|
|
Setup
|
|
#####
|
|
|
|
Add ``embed_video`` to :py:data:`~django.settings.INSTALLED_APPS` in your Django
|
|
settings.
|
|
|
|
.. code-block:: python
|
|
|
|
INSTALLED_APPS = (
|
|
...
|
|
|
|
'embed_video',
|
|
)
|
|
|
|
To detect HTTP/S you must add the :py:class:`~django.template.context_processors.request`
|
|
(or :py:class:`~django.core.context_processors.request` for Django < 1.9) context
|
|
processor:
|
|
|
|
.. code-block:: python
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
|
...
|
|
'django.core.context_processors.request',
|
|
)
|