Parsing settings with manage.py... to the Python Social Core SAML backend / Django Admin

I’m looking for a best practice example for parsing settings from command line to the tpa-saml backend in Django Admin.

I want to run a command like ./manage.py lms create_saml_idp
and then all the variables so they get loaded in Django admin.

Possible?


https://python-social-auth-docs.readthedocs.io/en/latest/backends/saml.html

Or do I have to write to the models with Django shell? Pro/cons? Anyone?

Bump! Bump text so it’s 20 characters.

@andreask, there are multiple such management commands in the platform which accept settings from the command line.

The create_or_update_site_configuration command in the edx-platform repository here accepts JSON data for the SiteConfiguration values via the inline parameter or from a file.

The create_or_update_site management command in the ecommerce here defines flags/parameters for all expected configuration settings parameters.

1 Like