Skip to content

Conversation

@srijan2607
Copy link
Contributor

This pull request enhances the parsing logic for list values in the setup_config management command, making it more robust and user-friendly when handling complex list inputs. The main improvements are the introduction of a dedicated parser for comma-separated lists with support for quoted strings, and clearer documentation/examples for end users.

Parsing and Input Handling Improvements:

  • Added a new _parse_list_values function that accurately parses comma-separated list values, supporting single-quoted, double-quoted, and unquoted items, and gracefully handling values with spaces or mixed quoting styles.
  • Updated parse_field_value to use _parse_list_values for list fields, ensuring consistent and correct parsing of complex list inputs.

Documentation and Usability:

  • Expanded and clarified the command-line usage examples in the create_parser docstring, demonstrating how to override, append, or remove multiple values (including those with spaces) from list fields, and emphasizing the need for quoting in such cases.

Code Maintenance:

  • Added the missing re import and updated type hints to include List, preparing the code for the new parsing logic.

Related issues : #499

@srijan2607
Copy link
Contributor Author

@Lorygold can you take a look

@Lorygold
Copy link
Collaborator

@Lorygold can you take a look

Could you please add some tests in the test_management_command.py file, please?

@srijan2607
Copy link
Contributor Author

@Lorygold take a look

@srijan2607
Copy link
Contributor Author

@Lorygold can you please update this

@Lorygold
Copy link
Collaborator

Lorygold commented Dec 31, 2025

@srijan2607 please check if the doc of this command has to be updated, with the correct possible command string here (without AI, please)

@Lorygold
Copy link
Collaborator

Lorygold commented Jan 3, 2026

@srijan2607 could you please update the doc related to this django command?

@Lorygold Lorygold closed this Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants