AdjustmentΒΆ
If you need to customize any serializer behaviour you can use
the DJOSER['SERIALIZERS']
setting to use your own serializer classes in the built-in views.
Or if you need to completely change the default djoser behaviour,
you can always override djoser views with your own custom ones.
Define custom urls
instead of reusing djoser.urls
:
urlpatterns = patterns('',
(...),
url(r'^register/$', views.CustomRegistrationView.as_view()),
)
Define custom view/serializer (inherit from one of djoser
class) and override necessary method/field:
class CustomRegistrationView(djoser.views.RegistrationView):
def send_activation_email(self, *args, **kwargs):
your_custom_email_sender(*args, **kwargs)
You could check djoser
API in source code: