Skip to content

Commit

Permalink
Always lowercase the user's email
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitya Oberoi committed Apr 14, 2012
1 parent 2e0cae2 commit 4f95c2f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 35 deletions.
9 changes: 5 additions & 4 deletions app.yaml
Expand Up @@ -5,6 +5,11 @@ api_version: 1
threadsafe: no

handlers:

- url: /remote_api
script: $APPENGINE/google/appengine/ext/remote_api/handler.py
login: admin

- url: /img
static_dir: media/img

Expand All @@ -20,10 +25,6 @@ handlers:
- url: /.*
script: djangoappengine/main/main.py

- url: /remote_api
script: $APPENGINE/google/appengine/ext/remote_api/handler.py
login: admin

skip_files:
- ^(.*/)?.*\.psd

Expand Down
8 changes: 7 additions & 1 deletion guest/forms.py
Expand Up @@ -26,4 +26,10 @@ class GuestEmailForm(forms.ModelForm):

class Meta:
model = Guest
fields = ('email', )
fields = ('email', )

def clean_email(self):
email = self.cleaned_data.get('email', '')
if email:
email = email.lower()
return email
1 change: 1 addition & 0 deletions guest/views.py
Expand Up @@ -16,6 +16,7 @@ def rsvp_login(request):
#email = request.session.get('email')
if request.method == "POST":
email = request.POST.get('email')
email = email.lower()
request.session['email'] = email
guest, created = Guest.objects.get_or_create(email=email)
form = GuestEmailForm(request.POST, instance=guest)
Expand Down
Binary file added media/img/ganesh.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/img/transportation.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 0 additions & 30 deletions old/app.yaml

This file was deleted.

0 comments on commit 4f95c2f

Please sign in to comment.