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

Docs: State that the configuration is done by setting a given config var in settings.py #240

Open
banagale opened this issue Jan 17, 2024 · 2 comments

Comments

@banagale
Copy link

banagale commented Jan 17, 2024

I see it in app_settings that the project's settings file is looked at to derive the various properties.

Might not hurt to put that in prose at the top of configuration.

Maybe an example:

Example settings.py config:

...
# django-invitations configuration
INVITATION_EXPIRY = 5
ALLOW_JSON_INVITES = True
...
@valberg
Copy link
Contributor

valberg commented Jan 17, 2024

The configuration uses a namespace for the variables defined by the prefix attribute on app_settings.AppSettings, which we set to INVITATIONS_. So all configuration options in invitations.app_settings can be overridden with INVITATIONS_{configuration name} in settings.py.

If you have a suggestion on how to make this more clear in the documentation feel free to create a PR 😄

@Flimm
Copy link
Contributor

Flimm commented Jun 14, 2024

I also was thrown by this issue in the documentation. I fixed it with this commit: a05ad23

I now realise that my fix might have been a bit premature, as you can create settings either in AppSettings without the prefix, or in settings.py with the prefix. I feel that most people are using configuration in settings.py, since the installation instructions don't mention how to install a custom app. I apologise if it would have been better to create a pull request for review.

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

3 participants