KUWAITNET / django-admin-commands

Tool to execute management commands from admin with ease and control.
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Difficulty Parsing Multiple Arguments in Admin Interface #2

Open MahdiJafari1 opened 10 months ago

MahdiJafari1 commented 10 months ago

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:

Django Version: 3.2
django-admin-commands2 Version: 1.1.3
Python Version: 3.9
RamezIssac commented 10 months ago

Thank you for the report. I will check and feed you back