Creating executable with pyinstaller:
Create a file called "hook-django.contrib.py" in PyInstaller/hooks/ with the following content:
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2016, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
from PyInstaller.utils.hooks import collect_submodules
hiddenimports = collect_submodules('django.contrib')
How to look for the dir:
find / -type d -name "pyinstaller/hooks"