Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement configuration reference generation #283

Closed
lilioid opened this issue Apr 20, 2021 · 3 comments
Closed

Implement configuration reference generation #283

lilioid opened this issue Apr 20, 2021 · 3 comments

Comments

@lilioid
Copy link
Member

lilioid commented Apr 20, 2021

In my opinion there should be a way to automatically generate a configuration reference for my Django project when using django-configurations so that I can easily include it in project documentation without just referencing some source file.


I was thinking of a workflow like the following:

from configurations import Configuration, values

class MyConfiguration(Configuration):
    DEBUG = values.BooleanValue(default=True)
    SECRET_KEY = values.SecretValue(description="The django secret key", reference="https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-SECRET_KEY")
    IS_AWESOME_FEATURE_ENABLED = values.BooleanValue(description="Enables the awesome feature because of which you want to run this application")
manage.py create-configuration-reference --format github-markdown-table --out ./configuration-reference.md
Key | Type | Default | Description
--- | --- | --- | ---
DEBUG | [bool](https://django-configurations.readthedocs.io/en/stable/values/#configurations.values.BooleanValue) | True |
SECRET_KEY | [secret](https://django-configurations.readthedocs.io/en/stable/values/#configurations.values.SecretValue) | *not set* | [reference](https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-SECRET_KEY): The django secret key
IS_AWESOME_FEATURE_ENABLED | [bool](https://django-configurations.readthedocs.io/en/stable/values/#configurations.values.BooleanValue) | *not set* | Enables the awesome feature because of which you want to run this application

Which renders as

Key Type Default Description
DEBUG bool True
SECRET_KEY secret not set reference: The django secret key
IS_AWESOME_FEATURE_ENABLED bool not set Enables the awesome feature because of which you want to run this application

I am willing to implement and maintain this feature if it is desired.
I am also open for discussions about the details.

@uhurusurfa
Copy link
Contributor

Seems like a good idea to me but since you wrote this over 3 years ago I am not sure if you are still interested in doing it?
If you are lets have a discussion otherwise close this issue.

@lilioid
Copy link
Member Author

lilioid commented Nov 26, 2024

I still think, this is a good thing to have but right now I have other things on my plate. I'll close this then.

@lilioid lilioid closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@uhurusurfa
Copy link
Contributor

I would not bpother... this project seems doomed since the projects leads do not respond and the Jazzband owner seems to want to be unwilling to let people help
jazzband/help#379

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

No branches or pull requests

2 participants