Skip to content

Commit

Permalink
* Removed some header comments in files
Browse files Browse the repository at this point in the history
* Added {% csrf_token %} to templates for django 1.2
  • Loading branch information
flashingpumpkin committed Apr 12, 2010
1 parent 4e883e6 commit 2557e39
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 43 deletions.
4 changes: 0 additions & 4 deletions socialregistration/admin.py
@@ -1,7 +1,3 @@
"""
"""
from django.contrib import admin
from socialregistration.models import (FacebookProfile, TwitterProfile,
OpenIDProfile, OpenIDStore, OpenIDNonce)
Expand Down
4 changes: 0 additions & 4 deletions socialregistration/auth.py
@@ -1,7 +1,3 @@
"""
"""
from django.contrib.auth.models import User
from django.contrib.sites.models import Site

Expand Down
4 changes: 0 additions & 4 deletions socialregistration/forms.py
@@ -1,7 +1,3 @@
"""
"""
from django import forms
from django.utils.translation import gettext as _

Expand Down
5 changes: 0 additions & 5 deletions socialregistration/models.py
@@ -1,8 +1,3 @@
"""
"""

from django.db import models

from django.contrib.auth import authenticate
Expand Down
@@ -1,5 +1,6 @@

<form class="connect-button" name="login" method="post" action="{% if logged_in %}{% url facebook_connect %}{% else %}{% url facebook_login %}{% endif %}">
{% csrf_token %}
{% if next %}
<input type="hidden" name="next" value="{{ next }}" />
{% endif %}
Expand Down
@@ -1,5 +1,6 @@
{% load twitter_tags %}
<form class="connect-button" name="login" method="post" action="{% url twitter_redirect %}">
{% csrf_token %}
{% if next %}
<input type="hidden" name="next" value="{{ next }}" />
{% endif %}
Expand Down
4 changes: 0 additions & 4 deletions socialregistration/templatetags/__init__.py
@@ -1,4 +0,0 @@
"""
"""
4 changes: 0 additions & 4 deletions socialregistration/templatetags/facebook_tags.py
@@ -1,7 +1,3 @@
"""
"""
from django import template
from django.conf import settings

Expand Down
4 changes: 0 additions & 4 deletions socialregistration/templatetags/friendfeed_tags.py
@@ -1,7 +1,3 @@
"""
"""
from django import template

register = template.Library()
Expand Down
5 changes: 0 additions & 5 deletions socialregistration/templatetags/openid_tags.py
@@ -1,8 +1,3 @@
"""
@author: alen, tom
"""
from django import template

register = template.Library()
Expand Down
4 changes: 0 additions & 4 deletions socialregistration/templatetags/twitter_tags.py
@@ -1,7 +1,3 @@
"""
"""
from django import template

register = template.Library()
Expand Down
7 changes: 2 additions & 5 deletions socialregistration/views.py
@@ -1,7 +1,3 @@
"""
"""
import uuid

from django.conf import settings
Expand All @@ -10,6 +6,7 @@
from django.shortcuts import render_to_response
from django.utils.translation import gettext as _
from django.http import HttpResponseRedirect
from django.views.decorators.csrf import csrf_protect

from django.contrib.auth.models import User
from django.contrib.auth import login, authenticate, logout as auth_logout
Expand Down Expand Up @@ -41,6 +38,7 @@ def _get_next(request):
else:
return getattr(settings, 'LOGIN_REDIRECT_URL', '/')

@csrf_protect
def setup(request, template='socialregistration/setup.html',
form_class=UserForm, extra_context=dict()):
"""
Expand Down Expand Up @@ -95,7 +93,6 @@ def setup(request, template='socialregistration/setup.html',
del request.session['socialregistration_profile']
return HttpResponseRedirect(_get_next(request))


def facebook_login(request, template='socialregistration/facebook.html',
extra_context=dict(), account_inactive_template='socialregistration/account_inactive.html'):
"""
Expand Down

0 comments on commit 2557e39

Please sign in to comment.