Installation¶
Getting the package¶
Note
Regardless of the installation method that you choose, it is recommended that you use a virtual environment to keep you Python environment clean. If you are using Python 3.6 or greater, the tools you will to create virtual environments ship with the interpreter as the venv module. For older versions of Python, or for further customization, see the virtualenv and virtualenvwrapper packages.
The recommended way to install django-htcpcp-tea is via pip:
$ pip install django-htcpcp-tea
Alternatively, you can install django-htcpcp-tea from its source:
$ git clone git://github.com/blueschu/django-htcpcp-tea.git
$ cd django-htcpc-tea
$ python3 setup.py install
Installing the Django App¶
Add 'django_htcpcp_tea' to your INSTALLED_APPS setting:
INSTALLED_APPS = [
# ...
'django_htcpcp_tea',
# ...
]
If you intend to use interactive pot sessions, make sure that the Django sessions framework is also installed and properly configured (it’s installed by default).
Then, enable the django-htcpcp-tea middleware in your settings:
MIDDLEWARE = [
# ...
'django_htcpcp_tea.middleware.HTCPCPTeaMiddleware',
# ...
]
And finally, update your project’s URLconf to include the HTCPCP urls:
from django.urls import include, path
urlspatterns = [
# ...
path('htcpcp/', include('django_htcpcp_tea.urls')),
# ...
]