From 0789a621a35bc78f5c8663c25c11f8fd11a0c651 Mon Sep 17 00:00:00 2001 From: Marco Marche Date: Sat, 29 Mar 2014 10:20:50 +0100 Subject: [PATCH] default email address for new users can be defined in settings TWYTHON_DJANGO_DEFAULT_EMAIL --- twython_django_oauth/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twython_django_oauth/views.py b/twython_django_oauth/views.py index d2c942e..08cefb3 100644 --- a/twython_django_oauth/views.py +++ b/twython_django_oauth/views.py @@ -63,7 +63,7 @@ def thanks(request, redirect_url=settings.LOGIN_REDIRECT_URL): user = User.objects.get(username=authorized_tokens['screen_name']) except User.DoesNotExist: # We mock a creation here; no email, password is just the token, etc. - user = User.objects.create_user(authorized_tokens['screen_name'], "fjdsfn@jfndjfn.com", authorized_tokens['oauth_token_secret']) + user = User.objects.create_user(authorized_tokens['screen_name'], settings.TWYTHON_DJANGO_DEFAULT_EMAIL or "fjdsfn@jfndjfn.com", authorized_tokens['oauth_token_secret']) profile = TwitterProfile() profile.user = user profile.oauth_token = authorized_tokens['oauth_token']