Commit ea6121a9 authored by Michael Fladischer's avatar Michael Fladischer

New upstream version 0.7.0

parent a294649e
Metadata-Version: 1.1
Name: djoser
Version: 0.6.0
Version: 0.7.0
Summary: REST version of Django authentication system.
Home-page: https://github.com/sunscrapers/djoser
Author: SUNSCRAPERS
Author-email: info@sunscrapers.com
License: MIT
Description: # djoser
Description: ======
djoser
======
[![Build Status](https://travis-ci.org/sunscrapers/djoser.svg?branch=master)](https://travis-ci.org/sunscrapers/djoser)
[![Coverage Status](https://coveralls.io/repos/sunscrapers/djoser/badge.png?branch=master)](https://coveralls.io/r/sunscrapers/djoser?branch=master)
.. image:: https://img.shields.io/pypi/v/djoser.svg
:target: https://pypi.org/project/djoser
REST implementation of [Django](https://www.djangoproject.com/) authentication
system. **Djoser** library provides a set of [Django Rest Framework](http://www.django-rest-framework.org/)
.. image:: https://img.shields.io/travis/sunscrapers/djoser.svg
:target: https://travis-ci.org/sunscrapers/djoser
.. image:: https://img.shields.io/codecov/c/github/sunscrapers/djoser.svg
:target: https://codecov.io/gh/sunscrapers/djoser
.. image:: https://img.shields.io/scrutinizer/g/sunscrapers/djoser.svg
:target: https://scrutinizer-ci.com/g/sunscrapers/djoser
REST implementation of `Django <https://www.djangoproject.com/>`_ authentication
system. **djoser** library provides a set of `Django Rest Framework <http://www.django-rest-framework.org/>`_
views to handle basic actions such as registration, login, logout, password
reset and account activation. It works with [custom user model](https://docs.djangoproject.com/en/dev/topics/auth/customizing/).
reset and account activation. It works with `custom user model <https://docs.djangoproject.com/en/dev/topics/auth/customizing/>`_.
Instead of reusing Django code (e.g. `PasswordResetForm`), we reimplemented
few things to fit better into [Single Page App](http://en.wikipedia.org/wiki/Single-page_application)
Instead of reusing Django code (e.g. ``PasswordResetForm``), we reimplemented
few things to fit better into `Single Page App <http://en.wikipedia.org/wiki/Single-page_application)>`_
architecture.
Developed by [SUNSCRAPERS](http://sunscrapers.com/) with passion & patience.
Developed by `SUNSCRAPERS <http://sunscrapers.com/>`_ with passion & patience.
## Documentation
Documentation
=============
Documentation is available to study at
[http://djoser.readthedocs.io](http://djoser.readthedocs.io) and in
`docs` directory.
`http://djoser.readthedocs.io <http://djoser.readthedocs.io>`_ and in
``docs`` directory.
## Contributing and development
Contributing and development
============================
To start developing on **djoser**, clone the repository:
`$ git clone git@github.com:sunscrapers/djoser.git`
.. code-block:: bash
$ git clone git@github.com:sunscrapers/djoser.git
If you are a **pipenv** user you can quickly setup testing environment by
using Make commands:
`$ make init`
`$ make test`
.. code-block:: bash
You do not need to create virtualenv in this case -
it's automatically created for you.
$ make init
$ make test
Otherwise, if you cannot use Make commands, please create virtualenv and install
requirements manually:
requirements manually:
`$ pip install django djangorestframework`
`$ pip install -r requirements.txt`
.. code-block:: bash
If you are running djoser tests on Python 2.7 you also need to install `mock` library.
$ pip install django djangorestframework
$ pip install -r requirements.txt
`$ pip install mock # only on Python 2.7`
`$ cd testproject`
`$ ./manage.py test`
If you are running djoser tests on Python 2.7 you also need to install **mock** library.
.. code-block:: bash
$ pip install mock # only on Python 2.7
$ cd testproject
$ ./manage.py test
If you need to run tests against all supported Python and Django versions then invoke:
`$ pip install tox`
`$ tox`
.. code-block:: bash
$ pip install tox
$ tox
You can also play with test project by running following commands:
`$ ./manage.py migrate`
`$ ./manage.py runserver`
.. code-block:: bash
$ ./manage.py migrate
$ ./manage.py runserver
## Similar projects
Similar projects
================
List of projects related to Django, REST and authentication:
- [django-rest-auth](https://github.com/Tivix/django-rest-auth)
- [django-rest-framework-digestauth](https://github.com/juanriaza/django-rest-framework-digestauth)
- [django-oauth-toolkit](https://github.com/evonove/django-oauth-toolkit)
- [doac](https://github.com/Rediker-Software/doac)
- [django-rest-framework-jwt](https://github.com/GetBlimp/django-rest-framework-jwt)
- [django-rest-framework-httpsignature](https://github.com/etoccalino/django-rest-framework-httpsignature)
- [hawkrest](https://github.com/kumar303/hawkrest)
- `django-rest-auth <https://github.com/Tivix/django-rest-auth>`_
- `django-rest-framework-digestauth <https://github.com/juanriaza/django-rest-framework-digestauth>`_
- `django-oauth-toolkit <https://github.com/evonove/django-oauth-toolkit>`_
- `doac <https://github.com/Rediker-Software/doac>`_
- `django-rest-framework-jwt <https://github.com/GetBlimp/django-rest-framework-jwt>`_
- `django-rest-framework-httpsignature <https://github.com/etoccalino/django-rest-framework-httpsignature>`_
- `hawkrest <https://github.com/kumar303/hawkrest>`_
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
......
# djoser
[![Build Status](https://travis-ci.org/sunscrapers/djoser.svg?branch=master)](https://travis-ci.org/sunscrapers/djoser)
[![Coverage Status](https://coveralls.io/repos/sunscrapers/djoser/badge.png?branch=master)](https://coveralls.io/r/sunscrapers/djoser?branch=master)
REST implementation of [Django](https://www.djangoproject.com/) authentication
system. **Djoser** library provides a set of [Django Rest Framework](http://www.django-rest-framework.org/)
views to handle basic actions such as registration, login, logout, password
reset and account activation. It works with [custom user model](https://docs.djangoproject.com/en/dev/topics/auth/customizing/).
Instead of reusing Django code (e.g. `PasswordResetForm`), we reimplemented
few things to fit better into [Single Page App](http://en.wikipedia.org/wiki/Single-page_application)
architecture.
Developed by [SUNSCRAPERS](http://sunscrapers.com/) with passion & patience.
## Documentation
Documentation is available to study at
[http://djoser.readthedocs.io](http://djoser.readthedocs.io) and in
`docs` directory.
## Contributing and development
To start developing on **djoser**, clone the repository:
`$ git clone git@github.com:sunscrapers/djoser.git`
If you are a **pipenv** user you can quickly setup testing environment by
using Make commands:
`$ make init`
`$ make test`
You do not need to create virtualenv in this case -
it's automatically created for you.
Otherwise, if you cannot use Make commands, please create virtualenv and install
requirements manually:
`$ pip install django djangorestframework`
`$ pip install -r requirements.txt`
If you are running djoser tests on Python 2.7 you also need to install `mock` library.
`$ pip install mock # only on Python 2.7`
`$ cd testproject`
`$ ./manage.py test`
If you need to run tests against all supported Python and Django versions then invoke:
`$ pip install tox`
`$ tox`
You can also play with test project by running following commands:
`$ ./manage.py migrate`
`$ ./manage.py runserver`
## Similar projects
List of projects related to Django, REST and authentication:
- [django-rest-auth](https://github.com/Tivix/django-rest-auth)
- [django-rest-framework-digestauth](https://github.com/juanriaza/django-rest-framework-digestauth)
- [django-oauth-toolkit](https://github.com/evonove/django-oauth-toolkit)
- [doac](https://github.com/Rediker-Software/doac)
- [django-rest-framework-jwt](https://github.com/GetBlimp/django-rest-framework-jwt)
- [django-rest-framework-httpsignature](https://github.com/etoccalino/django-rest-framework-httpsignature)
- [hawkrest](https://github.com/kumar303/hawkrest)
======
djoser
======
.. image:: https://img.shields.io/pypi/v/djoser.svg
:target: https://pypi.org/project/djoser
.. image:: https://img.shields.io/travis/sunscrapers/djoser.svg
:target: https://travis-ci.org/sunscrapers/djoser
.. image:: https://img.shields.io/codecov/c/github/sunscrapers/djoser.svg
:target: https://codecov.io/gh/sunscrapers/djoser
.. image:: https://img.shields.io/scrutinizer/g/sunscrapers/djoser.svg
:target: https://scrutinizer-ci.com/g/sunscrapers/djoser
REST implementation of `Django <https://www.djangoproject.com/>`_ authentication
system. **djoser** library provides a set of `Django Rest Framework <http://www.django-rest-framework.org/>`_
views to handle basic actions such as registration, login, logout, password
reset and account activation. It works with `custom user model <https://docs.djangoproject.com/en/dev/topics/auth/customizing/>`_.
Instead of reusing Django code (e.g. ``PasswordResetForm``), we reimplemented
few things to fit better into `Single Page App <http://en.wikipedia.org/wiki/Single-page_application)>`_
architecture.
Developed by `SUNSCRAPERS <http://sunscrapers.com/>`_ with passion & patience.
Documentation
=============
Documentation is available to study at
`http://djoser.readthedocs.io <http://djoser.readthedocs.io>`_ and in
``docs`` directory.
Contributing and development
============================
To start developing on **djoser**, clone the repository:
.. code-block:: bash
$ git clone git@github.com:sunscrapers/djoser.git
If you are a **pipenv** user you can quickly setup testing environment by
using Make commands:
.. code-block:: bash
$ make init
$ make test
Otherwise, if you cannot use Make commands, please create virtualenv and install
requirements manually:
.. code-block:: bash
$ pip install django djangorestframework
$ pip install -r requirements.txt
If you are running djoser tests on Python 2.7 you also need to install **mock** library.
.. code-block:: bash
$ pip install mock # only on Python 2.7
$ cd testproject
$ ./manage.py test
If you need to run tests against all supported Python and Django versions then invoke:
.. code-block:: bash
$ pip install tox
$ tox
You can also play with test project by running following commands:
.. code-block:: bash
$ ./manage.py migrate
$ ./manage.py runserver
Similar projects
================
List of projects related to Django, REST and authentication:
- `django-rest-auth <https://github.com/Tivix/django-rest-auth>`_
- `django-rest-framework-digestauth <https://github.com/juanriaza/django-rest-framework-digestauth>`_
- `django-oauth-toolkit <https://github.com/evonove/django-oauth-toolkit>`_
- `doac <https://github.com/Rediker-Software/doac>`_
- `django-rest-framework-jwt <https://github.com/GetBlimp/django-rest-framework-jwt>`_
- `django-rest-framework-httpsignature <https://github.com/etoccalino/django-rest-framework-httpsignature>`_
- `hawkrest <https://github.com/kumar303/hawkrest>`_
Metadata-Version: 1.1
Name: djoser
Version: 0.6.0
Version: 0.7.0
Summary: REST version of Django authentication system.
Home-page: https://github.com/sunscrapers/djoser
Author: SUNSCRAPERS
Author-email: info@sunscrapers.com
License: MIT
Description: # djoser
Description: ======
djoser
======
[![Build Status](https://travis-ci.org/sunscrapers/djoser.svg?branch=master)](https://travis-ci.org/sunscrapers/djoser)
[![Coverage Status](https://coveralls.io/repos/sunscrapers/djoser/badge.png?branch=master)](https://coveralls.io/r/sunscrapers/djoser?branch=master)
.. image:: https://img.shields.io/pypi/v/djoser.svg
:target: https://pypi.org/project/djoser
REST implementation of [Django](https://www.djangoproject.com/) authentication
system. **Djoser** library provides a set of [Django Rest Framework](http://www.django-rest-framework.org/)
.. image:: https://img.shields.io/travis/sunscrapers/djoser.svg
:target: https://travis-ci.org/sunscrapers/djoser
.. image:: https://img.shields.io/codecov/c/github/sunscrapers/djoser.svg
:target: https://codecov.io/gh/sunscrapers/djoser
.. image:: https://img.shields.io/scrutinizer/g/sunscrapers/djoser.svg
:target: https://scrutinizer-ci.com/g/sunscrapers/djoser
REST implementation of `Django <https://www.djangoproject.com/>`_ authentication
system. **djoser** library provides a set of `Django Rest Framework <http://www.django-rest-framework.org/>`_
views to handle basic actions such as registration, login, logout, password
reset and account activation. It works with [custom user model](https://docs.djangoproject.com/en/dev/topics/auth/customizing/).
reset and account activation. It works with `custom user model <https://docs.djangoproject.com/en/dev/topics/auth/customizing/>`_.
Instead of reusing Django code (e.g. `PasswordResetForm`), we reimplemented
few things to fit better into [Single Page App](http://en.wikipedia.org/wiki/Single-page_application)
Instead of reusing Django code (e.g. ``PasswordResetForm``), we reimplemented
few things to fit better into `Single Page App <http://en.wikipedia.org/wiki/Single-page_application)>`_
architecture.
Developed by [SUNSCRAPERS](http://sunscrapers.com/) with passion & patience.
Developed by `SUNSCRAPERS <http://sunscrapers.com/>`_ with passion & patience.
## Documentation
Documentation
=============
Documentation is available to study at
[http://djoser.readthedocs.io](http://djoser.readthedocs.io) and in
`docs` directory.
`http://djoser.readthedocs.io <http://djoser.readthedocs.io>`_ and in
``docs`` directory.
## Contributing and development
Contributing and development
============================
To start developing on **djoser**, clone the repository:
`$ git clone git@github.com:sunscrapers/djoser.git`
.. code-block:: bash
$ git clone git@github.com:sunscrapers/djoser.git
If you are a **pipenv** user you can quickly setup testing environment by
using Make commands:
`$ make init`
`$ make test`
.. code-block:: bash
You do not need to create virtualenv in this case -
it's automatically created for you.
$ make init
$ make test
Otherwise, if you cannot use Make commands, please create virtualenv and install
requirements manually:
requirements manually:
`$ pip install django djangorestframework`
`$ pip install -r requirements.txt`
.. code-block:: bash
If you are running djoser tests on Python 2.7 you also need to install `mock` library.
$ pip install django djangorestframework
$ pip install -r requirements.txt
`$ pip install mock # only on Python 2.7`
`$ cd testproject`
`$ ./manage.py test`
If you are running djoser tests on Python 2.7 you also need to install **mock** library.
.. code-block:: bash
$ pip install mock # only on Python 2.7
$ cd testproject
$ ./manage.py test
If you need to run tests against all supported Python and Django versions then invoke:
`$ pip install tox`
`$ tox`
.. code-block:: bash
$ pip install tox
$ tox
You can also play with test project by running following commands:
`$ ./manage.py migrate`
`$ ./manage.py runserver`
.. code-block:: bash
$ ./manage.py migrate
$ ./manage.py runserver
## Similar projects
Similar projects
================
List of projects related to Django, REST and authentication:
- [django-rest-auth](https://github.com/Tivix/django-rest-auth)
- [django-rest-framework-digestauth](https://github.com/juanriaza/django-rest-framework-digestauth)
- [django-oauth-toolkit](https://github.com/evonove/django-oauth-toolkit)
- [doac](https://github.com/Rediker-Software/doac)
- [django-rest-framework-jwt](https://github.com/GetBlimp/django-rest-framework-jwt)
- [django-rest-framework-httpsignature](https://github.com/etoccalino/django-rest-framework-httpsignature)
- [hawkrest](https://github.com/kumar303/hawkrest)
- `django-rest-auth <https://github.com/Tivix/django-rest-auth>`_
- `django-rest-framework-digestauth <https://github.com/juanriaza/django-rest-framework-digestauth>`_
- `django-oauth-toolkit <https://github.com/evonove/django-oauth-toolkit>`_
- `doac <https://github.com/Rediker-Software/doac>`_
- `django-rest-framework-jwt <https://github.com/GetBlimp/django-rest-framework-jwt>`_
- `django-rest-framework-httpsignature <https://github.com/etoccalino/django-rest-framework-httpsignature>`_
- `hawkrest <https://github.com/kumar303/hawkrest>`_
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
......
MANIFEST.in
README.md
README.rst
requirements.txt
setup.cfg
setup.py
djoser/__init__.py
djoser/compat.py
djoser/conf.py
djoser/constants.py
djoser/serializers.py
djoser/settings.py
djoser/signals.py
djoser/utils.py
djoser/views.py
......@@ -13,10 +15,13 @@ djoser.egg-info/PKG-INFO
djoser.egg-info/SOURCES.txt
djoser.egg-info/dependency_links.txt
djoser.egg-info/top_level.txt
djoser/templates/activation_email_body.html
djoser/templates/activation_email_body.txt
djoser/templates/activation_email_subject.txt
djoser/templates/confirmation_email_body.html
djoser/templates/confirmation_email_body.txt
djoser/templates/confirmation_email_subject.txt
djoser/templates/password_reset_email_body.html
djoser/templates/password_reset_email_body.txt
djoser/templates/password_reset_email_subject.txt
djoser/urls/__init__.py
......
from djoser.conf import settings
try:
from django.contrib.auth.password_validation import validate_password
except ImportError:
from password_validation import validate_password
__all__ = ['settings', 'validate_password']
def get_user_email(user):
email_field_name = get_user_email_field_name(user)
return getattr(user, email_field_name, None)
def get_user_email_field_name(user):
try: # Assume we are Django >= 1.11
return user.get_email_field_name()
except AttributeError: # we are using Django < 1.11
return settings.USER_EMAIL_FIELD_NAME
import warnings
from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured
from django.test.signals import setting_changed
from django.utils import six
from django.utils.functional import LazyObject
from django.utils.module_loading import import_string
DJOSER_SETTINGS_NAMESPACE = 'DJOSER'
class ObjDict(dict):
def __getattribute__(self, item):
try:
if isinstance(self[item], str):
self[item] = import_string(self[item])
value = self[item]
except KeyError:
value = super(ObjDict, self).__getattribute__(item)
return value
default_settings = {
'USE_HTML_EMAIL_TEMPLATES': False,
'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': [],
'TOKEN_MODEL': 'rest_framework.authtoken.models.Token',
'SERIALIZERS': ObjDict({
'activation':
'djoser.serializers.ActivationSerializer',
'login':
'djoser.serializers.LoginSerializer',
'password_reset':
'djoser.serializers.PasswordResetSerializer',
'password_reset_confirm':
'djoser.serializers.PasswordResetConfirmSerializer',
'password_reset_confirm_retype':
'djoser.serializers.PasswordResetConfirmRetypeSerializer',
'set_password':
'djoser.serializers.SetPasswordSerializer',
'set_password_retype':
'djoser.serializers.SetPasswordRetypeSerializer',
'set_username':
'djoser.serializers.SetUsernameSerializer',
'set_username_retype':
'djoser.serializers.SetUsernameRetypeSerializer',
'user_registration':
'djoser.serializers.UserRegistrationSerializer',
'user':
'djoser.serializers.UserSerializer',
'token':
'djoser.serializers.TokenSerializer',
}),
'LOGOUT_ON_PASSWORD_CHANGE': False,
'USER_EMAIL_FIELD_NAME': 'email',
}
SETTINGS_TO_IMPORT = ['TOKEN_MODEL']
class Settings(object):
def __init__(self, default_settings, explicit_overriden_settings=None):
if explicit_overriden_settings is None:
explicit_overriden_settings = {}
overriden_settings = getattr(
django_settings, DJOSER_SETTINGS_NAMESPACE, {}
) or explicit_overriden_settings
self._load_default_settings()
self._override_settings(overriden_settings)
self._init_settings_to_import()
def _load_default_settings(self):
for setting_name, setting_value in six.iteritems(default_settings):
if setting_name.isupper():
setattr(self, setting_name, setting_value)
def _override_settings(self, overriden_settings):
for setting_name, setting_value in six.iteritems(overriden_settings):
value = setting_value
if isinstance(setting_value, dict):
value = getattr(self, setting_name, {})
value.update(ObjDict(setting_value))
setattr(self, setting_name, value)
def _init_settings_to_import(self):
for setting_name in SETTINGS_TO_IMPORT:
value = getattr(self, setting_name)
if isinstance(value, str):
setattr(self, setting_name, import_string(value))
class LazySettings(LazyObject):
def _setup(self, explicit_overriden_settings=None):
self._wrapped = Settings(default_settings, explicit_overriden_settings)
def get(self, key):
"""
This function is here only to provide backwards compatibility in
case anyone uses old settings interface.
It is strongly encouraged to use dot notation.
"""
warnings.warn(
'The settings.get(key) is superseded by the dot attribute access.',
PendingDeprecationWarning
)
try:
return getattr(self, key)
except AttributeError:
raise ImproperlyConfigured('Missing settings: {}[\'{}\']'.format(
DJOSER_SETTINGS_NAMESPACE, key)
)
settings = LazySettings()
def reload_djoser_settings(*args, **kwargs):
global settings
setting, value = kwargs['setting'], kwargs['value']
if setting == DJOSER_SETTINGS_NAMESPACE:
settings._setup(explicit_overriden_settings=value)
setting_changed.connect(reload_djoser_settings)
from django.utils.translation import ugettext_lazy as _
INVALID_CREDENTIALS_ERROR = _('Unable to login with provided credentials.')
INACTIVE_ACCOUNT_ERROR = _('User account is disabled.')
INVALID_TOKEN_ERROR = _('Invalid token for given user.')
......@@ -10,3 +11,8 @@ USERNAME_MISMATCH_ERROR = _('The two {0} fields didn\'t match.')
INVALID_PASSWORD_ERROR = _('Invalid password.')
EMAIL_NOT_FOUND = _('User with given email does not exist.')
CANNOT_CREATE_USER_ERROR = _('Unable to create account.')
USER_WITHOUT_EMAIL_FIELD_ERROR = _(
'User model does not contain specified email field. '
'Please see http://djoser.readthedocs.io/en/latest/settings.html#'
'USER_EMAIL_FIELD_NAME for more details.'
)
This diff is collapsed.
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': 'djoser.serializers.ActivationSerializer',
'login': 'djoser.serializers.LoginSerializer',
'password_reset': 'djoser.serializers.PasswordResetSerializer',
'password_reset_confirm': 'djoser.serializers.PasswordResetConfirmSerializer',
'password_reset_confirm_retype': 'djoser.serializers.PasswordResetConfirmRetypeSerializer',
'set_password': 'djoser.serializers.SetPasswordSerializer',
'set_password_retype': 'djoser.serializers.SetPasswordRetypeSerializer',
'set_username': 'djoser.serializers.SetUsernameSerializer',
'set_username_retype': 'djoser.serializers.SetUsernameRetypeSerializer',
'user_registration': 'djoser.serializers.UserRegistrationSerializer',
'user': 'djoser.serializers.UserSerializer',
'token': 'djoser.serializers.TokenSerializer',
},
'LOGOUT_ON_PASSWORD_CHANGE': False,
}
def get(key):
user_settings = merge_settings_dicts(
deepcopy(default_settings), getattr(settings, 'DJOSER', {}))
try:
return user_settings[key]
except KeyError:
raise ImproperlyConfigured('Missing settings: DJOSER[\'{}\']'.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
{% load i18n %}{% autoescape off %}
<html>
<body>
{% blocktrans %}<p>
You're receiving this email because you need to finish activation process on {{ site_name }}.
</p>{% endblocktrans %}
<p>{% trans "Please go to the following page to activate account:" %}</p>
<p>{% block reset_link %}</p>
<p><a href="{{ protocol }}://{{ domain }}/{{ url }}">{{ protocol }}://{{ domain }}/{{ url }}</a></p>
{% endblock %}
<p>{% trans "Thanks for using our site!" %}</p>
<p>{% blocktrans %}The {{ site_name }} team{% endblocktrans %}</p>
{% endautoescape %}
</body>
</html>
\ No newline at end of file
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this email because you created an account on {{ site_name }}.{% endblocktrans %}
{% blocktrans %}You're receiving this email because you need to finish activation process on {{ site_name }}.{% endblocktrans %}
{% trans "Please go to the following page to activate account:" %}
{% block reset_link %}
......
{% load i18n %}{% autoescape off %}
<html>
<body>
<p>{% trans "Your account has been created and is ready to use!" %}</p>
<p>{% trans "Thanks for using our site!" %}</p>
<p>{% blocktrans %}The {{ site_name }} team{% endblocktrans %}</p>
{% endautoescape %}
</body>
</html>
\ No newline at end of file