You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ Please refer to the [full documentation](https://django-typer.readthedocs.io/) f
61
61
[TyperCommand](https://django-typer.readthedocs.io/en/latest/reference.html#django_typer.TyperCommand) is a very simple drop in replacement for [BaseCommand](https://docs.djangoproject.com/en/stable/howto/custom-management-commands/#django.core.management.BaseCommand). All of the documented features of [BaseCommand](https://docs.djangoproject.com/en/stable/howto/custom-management-commands/#django.core.management.BaseCommand) work the same way!
Or, you may also use an interface identical to [Typer](https://typer.tiangolo.com/)'s. Simply import [Typer](https://typer.tiangolo.com/) from django_typer instead of typer.
74
74
75
75
```python
76
-
from django_typer import Typer
76
+
from django_typer.managementimport Typer
77
77
78
78
app = Typer()
79
79
@@ -98,7 +98,7 @@ Commands with multiple subcommands can be defined:
98
98
from django.utils.translation import gettext_lazy as _
99
99
from typer import Argument
100
100
101
-
from django_typer import TyperCommand, command
101
+
from django_typer.managementimport TyperCommand, command
102
102
103
103
104
104
classCommand(TyperCommand):
@@ -128,7 +128,7 @@ Commands with multiple subcommands can be defined:
128
128
Or using the typer-style interface this could be written:
129
129
130
130
```python
131
-
from django_typer import Typer
131
+
from django_typer.managementimport Typer
132
132
import typing as t
133
133
134
134
from django.utils.translation import gettext_lazy as _
@@ -176,7 +176,7 @@ Using the class-based interface we could define the command like this:
176
176
from django.utils.translation import gettext_lazy as _
177
177
from typer import Argument, Option
178
178
179
-
from django_typer import TyperCommand, group
179
+
from django_typer.managementimport TyperCommand, group
180
180
181
181
182
182
classCommand(TyperCommand):
@@ -232,7 +232,7 @@ from functools import reduce
232
232
from django.utils.translation import gettext_lazy as _
233
233
from typer import Argument, Option
234
234
235
-
from django_typer import Typer
235
+
from django_typer.managementimport Typer
236
236
237
237
238
238
app = Typer(help=_("A more complex command that defines a hierarchy of subcommands."))
0 commit comments