mirror of
https://github.com/django/daphne.git
synced 2025-07-29 00:19:45 +03:00
Merge 8907d8355c
into 9f4f057e4c
This commit is contained in:
commit
88098d1fab
|
@ -126,6 +126,12 @@ class CommandLineInterface(object):
|
|||
default=False,
|
||||
action='store_true',
|
||||
)
|
||||
self.parser.add_argument(
|
||||
'--chdir',
|
||||
dest='chdir',
|
||||
help='chdir to specified directory before apps loading',
|
||||
default=".",
|
||||
)
|
||||
|
||||
self.server = None
|
||||
|
||||
|
@ -162,7 +168,7 @@ class CommandLineInterface(object):
|
|||
elif args.verbosity >= 1:
|
||||
access_log_stream = sys.stdout
|
||||
# Import channel layer
|
||||
sys.path.insert(0, ".")
|
||||
sys.path.insert(0, args.chdir)
|
||||
module_path, object_path = args.channel_layer.split(":", 1)
|
||||
channel_layer = importlib.import_module(module_path)
|
||||
for bit in object_path.split("."):
|
||||
|
|
Loading…
Reference in New Issue
Block a user