Hi!

I think you've found the wrong mailing list for this post. This mailing
list is for discussing the development of Django itself, not for support
using Django. This means the discussions of bugs and features in Django
itself, rather than in your code using it. People on this list are unlikely
to answer your support query with their limited time and energy.

For support, please follow the "Getting Help" page:
https://docs.djangoproject.com/en/stable/faq/help/ . This will help you
find people who are willing to support you, and to ask your question in a
way that makes it easy for them to answer.

Thanks for your understanding and all the best,

Adam

On Mon, Oct 31, 2022 at 1:16 PM Lakhvinder Singh <lksingh.in...@gmail.com>
wrote:

> i try it
>
> https://github.com/sunscrapers/djoser/blob/master/djoser/conf.py
>
>  user->settings.py use for settings load on global
>
> from copy import deepcopy
>
> from django.core.exceptions import ImproperlyConfigured
> from django.conf import settings
>
>
> default_settings = {
> 'SEND_ACTIVATION_EMAIL': False,
> 'SEND_CONFIRMATION_EMAIL': False,
> 'SET_PASSWORD_RETYPE': False,
> 'SET_USERNAME_RETYPE': False,
> 'PASSWORD_RESET_CONFIRM_RETYPE': False,
> 'PASSWORD_RESET_SHOW_EMAIL_NOT_FOUND': False,
> 'ROOT_VIEW_URLS_MAPPING': {},
> 'PASSWORD_VALIDATORS': [],
> 'SERIALIZERS': {
> 'activation': 'user.serializers.ActivationSerializer',
> 'login': 'user.serializers.LoginSerializer',
>
> },
> 'LOGOUT_ON_PASSWORD_CHANGE': False,
> }
>
>
> def get(key):
> user_settings = merge_settings_dicts(
> deepcopy(default_settings), getattr(settings, 'USER_APP', {}))
> try:
> return user_settings[key]
> except KeyError:
> raise ImproperlyConfigured('Missing settings:
> USER_APP[\'{}\']'.format(key))
>
>
> def merge_settings_dicts(a, b, path=None, overwrite_conflicts=True):
> """merges b into a, modify a in place
>
> Found at http://stackoverflow.com/a/7205107/1472229
> """
> if path is None:
> path = []
> for key in b:
> if key in a:
> if isinstance(a[key], dict) and isinstance(b[key], dict):
> merge_settings_dicts(a[key], b[key], path + [str(key)],
> overwrite_conflicts=overwrite_conflicts)
> elif a[key] == b[key]:
> pass # same leaf value
> else:
> if overwrite_conflicts:
> a[key] = b[key]
> else:
> conflict_path = '.'.join(path + [str(key)])
> raise Exception('Conflict at %s' % conflict_path)
> else:
> a[key] = b[key]
> # Don't let this fool you that a is not modified in place
> return a
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/2370e781-b2a6-404e-b943-b96892b49137n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/2370e781-b2a6-404e-b943-b96892b49137n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM37vqxMJyx4VAch_QV3icNmKBc692XpwnXHQYNY9Mn5bw%40mail.gmail.com.
  • How... Lakhvinder Singh
    • ... 'Adam Johnson' via Django developers (Contributions to Django itself)

Reply via email to