Permalink
Browse files

Always lowercase the user's email

  • Loading branch information...
1 parent 2e0cae2 commit 4f95c2fae7e049c58c180439fd3093f96a26596e Nitya Oberoi committed Apr 14, 2012
Showing with 13 additions and 35 deletions.
  1. +5 −4 app.yaml
  2. +7 −1 guest/forms.py
  3. +1 −0 guest/views.py
  4. BIN media/img/ganesh.jpg
  5. BIN media/img/transportation.jpg
  6. +0 −30 old/app.yaml
View
9 app.yaml
@@ -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
@@ -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
View
8 guest/forms.py
@@ -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
View
1 guest/views.py
@@ -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)
View
BIN 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.
View
BIN 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.
View
30 old/app.yaml
@@ -1,30 +0,0 @@
-application: nitya-and-sriram
-version: 1
-runtime: python27
-api_version: 1
-threadsafe: true
-
-handlers:
-- url: /img
- static_dir: media/img
-
-- url: /css
- static_dir: media/css
-
-- url: /js
- static_dir: media/js
-
-- url: /fancybox
- static_dir: media/fancybox
-
-- url: /.*
- script: wedding.app
-
-skip_files:
-- ^(.*/)?.*\.psd
-
-libraries:
-- name: PIL
- version: latest
-- name: django
- version: latest

0 comments on commit 4f95c2f

Please sign in to comment.