Skip to content

Commit

Permalink
Adding facebook connect support via my facebook connect packge; users…
Browse files Browse the repository at this point in the history
… can now login with facebook.
  • Loading branch information
noamsu committed Aug 19, 2012
1 parent 2cb324d commit ab5e309
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
10 changes: 9 additions & 1 deletion djangodash/settings.py
Expand Up @@ -140,7 +140,8 @@ def relative(*x):
# 'django.contrib.admindocs',
'djangodash',
'south',
'endless_pagination'
'endless_pagination',
'facebook_connect'
)

# A sample logging configuration. The only tangible logging
Expand Down Expand Up @@ -176,3 +177,10 @@ def relative(*x):
THREADS_PER_PAGE = 6
COMMENTS_PER_PROFILE_PAGE = 6
LOGIN_URL = "/login"

# Facebook settings

FACEBOOK_LOGIN_REDIRECT = "/" # (optional, defaults to "/")
FACEBOOK_APP_ID = "510960628929359" # required
FACEBOOK_APP_SECRET = "bd7493dc0e0763179fcbfebfb07a4cb9" # required
FACEBOOK_SCOPE = "email" # (optional, defaults to "email")
Binary file modified djangodash/settings.pyc
Binary file not shown.
10 changes: 10 additions & 0 deletions djangodash/templates/login.html
Expand Up @@ -14,4 +14,14 @@
Incorrect Login. Please try again.
{% endif %}

Or, you can login with your facebook account:

{% load facebook_connect %}

<p>
{% facebook_button %}
</p>

{% facebook_script %}

{% endblock %}
4 changes: 4 additions & 0 deletions djangodash/urls.py
Expand Up @@ -31,6 +31,10 @@
# Ajax urls
url(r'^ajax/vote', 'djangodash.views.vote', name="vote"),

# Facebook connect
(r'^facebook_connect/', include('facebook_connect.urls')),


# url(r'^djangodash/', include('djangodash.foo.urls')),

# Uncomment the admin/doc line below to enable admin documentation:
Expand Down
Binary file modified djangodash/urls.pyc
Binary file not shown.
3 changes: 2 additions & 1 deletion requirements.txt
Expand Up @@ -3,4 +3,5 @@ dj-database-url==0.2.1
psycopg2==2.4.5
wsgiref==0.1.2
south==0.7.6
django-endless-pagination==1.1
django-endless-pagination==1.1
django-facebook-connect==1.0.1

0 comments on commit ab5e309

Please sign in to comment.