-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #2 ImportError: cannot import name 'NoArgsCommand' with django 1.10
Thanks to @xusy2k
- Loading branch information
Showing
2 changed files
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
# [email protected] | ||
|
||
from django.core.management.base import NoArgsCommand | ||
try: | ||
from django.core.management.base import NoArgsCommand | ||
except ImportError: | ||
from django.core.management import BaseCommand as NoArgsCommand | ||
|
||
from kaio import Options | ||
|
||
|
@@ -88,3 +91,5 @@ def handle_noargs(self, **options): | |
colored.green(user_settings[key]))) | ||
#colored.white(default_settings[key]))) | ||
|
||
def handle(self, **options): | ||
return self.handle_noargs(**options) |