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
When using django-admin-commands2 to run a management command with multiple parameters from the Django admin interface, the command fails to execute correctly. It appears that the single input field provided for arguments (args = forms.CharField(required=False, label=_('Arguments to send to command'))) is not correctly parsing or passing multiple arguments to the management command.
Command Details:
The management command in my project requires two arguments: --from-date (a date string) and --step (an integer). The command is implemented in Django and works as expected when run from the command line.
What I did:
Navigate to the Django admin interface where the command is listed.
In the provided text field for arguments, enter the arguments in various formats (e.g., --from-date="2021-01-01" --step=5, --from-date "2021-01-01" --step 5, etc.).
Execute the command.
The command does not run successfully and reports a missing --step argument.
Expected Behavior:
The admin interface should correctly parse and pass multiple arguments to the management command.
Actual Behavior:
The command fails with an error indicating that the --step argument is missing, regardless of how the arguments are formatted in the input field.
Environment:
Issue Summary:
When using
django-admin-commands2
to run a management command with multiple parameters from the Django admin interface, the command fails to execute correctly. It appears that the single input field provided for arguments (args = forms.CharField(required=False, label=_('Arguments to send to command'))) is not correctly parsing or passing multiple arguments to the management command.Command Details:
The management command in my project requires two arguments: --from-date (a date string) and --step (an integer). The command is implemented in Django and works as expected when run from the command line.
What I did:
Expected Behavior:
The admin interface should correctly parse and pass multiple arguments to the management command.
Actual Behavior:
The command fails with an error indicating that the --step argument is missing, regardless of how the arguments are formatted in the input field.
Environment:
The text was updated successfully, but these errors were encountered: