Skip to content

Commit

Permalink
update social auth logins
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Bächler committed Jun 1, 2012
1 parent 1c84db6 commit d7f7901
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 5 additions & 4 deletions feincmsorg/settings.py
Expand Up @@ -59,6 +59,7 @@
'django.core.context_processors.static',
'feincms.context_processors.add_page_if_missing',
'feincmsorg.context_processors.meta_navigation',
'social_auth.context_processors.social_auth_backends',
)

ROOT_URLCONF = APP_MODULE+'.urls'
Expand All @@ -71,8 +72,6 @@
'social_auth.backends.twitter.TwitterBackend',
'social_auth.backends.facebook.FacebookBackend',
'social_auth.backends.contrib.github.GithubBackend',
'social_auth.backends.OpenIDBackend',
'social_auth.backends.contrib.bitbucket.BitbucketBackend',
'django.contrib.auth.backends.ModelBackend',
)

Expand Down Expand Up @@ -124,10 +123,12 @@
GRID = {'column': 30, 'spacing': 10, 'vertical': 18}

ACCOUNT_ACTIVATION_DAYS = 7
LOGIN_URL = '/login/'
LOGIN_URL = 'accounts/login/'
LOGIN_REDIRECT_URL = '/'
SOCIAL_AUTH_LOGIN_REDIRECT_URL = 'http://feincms.org/'


SOCIAL_AUTH_DEFAULT_USERNAME = 'new_social_auth_user'
FACEBOOK_EXTENDED_PERMISSIONS = ['email']

#PINGING_WEBLOG_NAME = 'Mein grossartiger Blog!'
#PINGING_WEBLOG_URL = 'http://www.feinheit.ch/blog'
Expand Down
8 changes: 7 additions & 1 deletion feincmsorg/templates/registration/login.html
Expand Up @@ -16,4 +16,10 @@ <h2>Log in</h2>
<p class="submit"><button type="submit" name="submit" value="Login">Log in</button></p>
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
</form>
{% endblock %}
<div class="social-auth">
{% for name in social_auth.backends %}
<li><a rel="nofollow" href="{% url socialauth_begin name %}">{{ name|title }}</a></li>
{% endfor %}
</div>

{% endblock %}

0 comments on commit d7f7901

Please sign in to comment.