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

Suggestion - define default settings value #78

Closed
danizen opened this issue Sep 30, 2021 · 2 comments
Closed

Suggestion - define default settings value #78

danizen opened this issue Sep 30, 2021 · 2 comments

Comments

@danizen
Copy link

danizen commented Sep 30, 2021

In

IPWARE_META_PRECEDENCE_ORDER = getattr(settings,
, django-ipware defines a local constant which leaves it unclear to Django users what the default setting is without reading the code.

django-cas-ng has a different approach, but I would move django-cas-ng's settings to the apps module.

Suggesting similar so that settings.IPWARE_META_PRECEDENCE_ORDER will be defined with default value if it is not set when app is readied by Django.

@un33k
Copy link
Owner

un33k commented Sep 30, 2021

Not true!

People who want to read instructions can do that by looking at the readme. https://github.com/un33k/django-ipware#precedence-order

Those who are coders and want to look around should see that

IPWARE_META_PRECEDENCE_ORDER = getattr(settings, ...)

It means => get the constant from the global settings.py, & if it's not found, then define a default value.

So, users have the power to set their own precedence order in their settings.py.

Those who want per-call precedence orders can also pass those in, on each call, as per the link above.

@un33k un33k closed this as completed Dec 4, 2021
@un33k
Copy link
Owner

un33k commented Mar 8, 2023

@danizen django-ipware is on its way to being deprecated.

With that said, I have a python package that is going to replace it.

Have a look at python-ipware and if works for you switch to it.

Feedback is welcomed.

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