1. Alex Kehayias
  2. Outbreak

Commits

Jordan Orelli  committed 56b9a16

mothfucker motherfucker

  • Participants
  • Parent commits b9d4ba8
  • Branches default

Comments (0)

Files changed (8)

File team/forms.py

View file
  • Ignore whitespace
+from django import forms
+from models import *
+from django.db import models
+
+# class SignupForm(forms.Form):
+

File team/views.py

View file
  • Ignore whitespace
 # Create your views here.
 #from lib.foursquare import foursquare
 import foursquare2 as foursquare
+from django.conf import settings
+from django.core.urlresolvers import reverse
+from django.contrib.sites.models import Site
 from django.http import HttpResponse
 from team.models import *
 from django.views.generic.simple import direct_to_template
 #         current_location = fs.chkjuuuser.fid
 
 
-def signup():
-    auth = foursquare.FoursquareAUthHelper("", "", "http://www.jordanorelli.com/")
+def signup(request):
+    auth = foursquare.FoursquareAuthHelper("NGMJXRXNAUYGFCYRXPBWDY2SXYFOEHVI1WIAYJET0RUJOJVK", "V2VPO2OEHWFE3V1F2SECATW1V24NLK0OLYXMUES310CENMMR", 'http://outbreak.jordanorelli.com' + reverse('team-thanks'))
+    signup_url = auth.get_authentication_url()
+    return direct_to_template(request, 'team/signup.html', { 'signup_url' : signup_url})
 
+def thanks(request):
+    return direct_to_template(request, 'team/thanks.html')
 
 def infect():
     #for "list of foursquare IDs":

File team/views.pyc

  • Ignore whitespace
Binary file modified.

File templates/team/signup.html

View file
  • Ignore whitespace
+{% extends "base.html" %}
+
+{% block content %}
+<a href="{{ signup_url }}">sign up.</a>
+{% endblock %}

File templates/team/thanks.html

View file
  • Ignore whitespace
+{% extends "base.html" %}
+{% block contet %}
+thanks.
+
+{% endblock %}

File test.db

  • Ignore whitespace
Binary file modified.

File urls.py

View file
  • Ignore whitespace
     url(r'^infected/', "team.views.infected", name="team-infected"),
     url(r'^everyone/', "team.views.all_users", name="team-everyone"),
     url(r'^getGA/$', 'team.views.get_ga', name = 'team-get-ga'),
+    url(r'^thanks/$', 'team.views.thanks', name = 'team-thanks'),
+    url(r'^signup/$', 'team.views.signup', name = 'team-signup'),
     # Uncomment the admin/doc line below to enable admin documentation:
     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
 

File urls.pyc

  • Ignore whitespace
Binary file modified.