Skip to content

Commit d088f71

Browse files
committed
Remove dependency on the pyscaffold's warning module
1 parent 4087b76 commit d088f71

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/pyscaffoldext/django/extension.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@
2222
from pyscaffold.shell import ShellCommand
2323
from pyscaffold.structure import merge, reify_content, resolve_leaf
2424
from pyscaffold.templates import get_template
25-
from pyscaffold.warnings import UpdateNotSupported
2625

2726
from . import templates
2827

2928
django_admin = ShellCommand("django-admin")
3029
template = partial(get_template, relative_to=templates)
3130

31+
UPDATE_WARNING = (
32+
"Updating code generated using external tools is not "
33+
"supported. The extension `django` will be ignored, only "
34+
"changes in PyScaffold core features will take place."
35+
)
36+
3237

3338
class Django(Extension):
3439
"""Generate Django project files"""
@@ -59,7 +64,7 @@ def create_django(struct: Structure, opts: ScaffoldOpts) -> ActionParams:
5964
:obj:`RuntimeError`: raised if django-admin is not installed
6065
"""
6166
if opts.get("update"):
62-
logger.warning(UpdateNotSupported(extension="django"))
67+
logger.warning(UPDATE_WARNING)
6368
return struct, opts
6469

6570
try:

0 commit comments

Comments
 (0)