1. Alex Kehayias
  2. Outbreak

Commits

Jordan Orelli  committed b9d4ba8

lots of stuff

  • Participants
  • Parent commits 6bb2534
  • Branches default

Comments (0)

Files changed (12)

File team/migrations/0007_auto__add_field_foursquareuser_auth_token.py

View file
  • Ignore whitespace
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+    def forwards(self, orm):
+        
+        # Adding field 'Foursquareuser.auth_token'
+        db.add_column('team_foursquareuser', 'auth_token', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True), keep_default=False)
+
+
+    def backwards(self, orm):
+        
+        # Deleting field 'Foursquareuser.auth_token'
+        db.delete_column('team_foursquareuser', 'auth_token')
+
+
+    models = {
+        'team.foursquareuser': {
+            'Meta': {'object_name': 'Foursquareuser'},
+            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+            'fid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '240'}),
+            'firstName': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'gender': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+            'homeCity': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'lastName': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'photo_url': ('django.db.models.fields.CharField', [], {'max_length': '2048'})
+        },
+        'team.infectionevent': {
+            'Meta': {'object_name': 'InfectionEvent'},
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'infectionplace': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['team.Venue']"}),
+            'infectiontime': ('django.db.models.fields.DateTimeField', [], {}),
+            'infector': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'uout'", 'to': "orm['team.Foursquareuser']"}),
+            'user_infected': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['team.Foursquareuser']", 'unique': 'True'})
+        },
+        'team.venue': {
+            'Meta': {'object_name': 'Venue'},
+            'address': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
+            'city': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+            'fid': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'lat': ('django.db.models.fields.CharField', [], {'max_length': '90'}),
+            'lon': ('django.db.models.fields.CharField', [], {'max_length': '90'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+            'postalCode': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
+            'state': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+        }
+    }
+
+    complete_apps = ['team']

File team/migrations/0007_auto__add_field_foursquareuser_auth_token.pyc

  • Ignore whitespace
Binary file added.

File team/models.py

View file
  • Ignore whitespace
     homeCity = models.CharField(max_length = 240)
     fid = models.CharField(max_length = 240, unique = True)
     photo_url = models.CharField(max_length = 2048)
+    auth_token = models.CharField(max_length = 200, null = True, blank = True)
 
     def __unicode__(self):
         return "%s %s" % (self.firstName, self.lastName)

File team/models.pyc

  • Ignore whitespace
Binary file modified.

File team/views.py

View file
  • Ignore whitespace
             u.save()
         except Exception:
             pass
-    return HttpResponse('hey')
+    return direct_to_template(request, 'at_ga.html', {'users': users})
+
+def all_users(request):
+    users = Foursquareuser.objects.all()
+    return direct_to_template(request, 'everyone.html', {'users':users})
+
+# def cough(request):
+#     users = Foursquareuser.objects.all()
+#     for user in users:
+#         current_location = fs.chkjuuuser.fid
+
+
+def signup():
+    auth = foursquare.FoursquareAUthHelper("", "", "http://www.jordanorelli.com/")
 
 
 def infect():

File team/views.pyc

  • Ignore whitespace
Binary file modified.

File templates/at_ga.html

View file
  • Ignore whitespace
+{% extends "base.html" %}
+{% block content %}
+users at GA (now):
+{% for user in users %}
+<li>{{ user.firstName}} {{ user.lastName }} <img src="{{ user.photo_url}}" /></li>
+{% endfor %}
+
+{% endblock %}

File templates/at_ga.html!

View file
  • Ignore whitespace
+{% extends "base.html" %}
+{% block content %}
+users at GA (now):
+{% for user in users %}
+<li>{{ user.firstName}} {{ user.lastName }} <img src="{{ user.photo_url}}" /></li>
+{% endfor %}
+
+{% endblock %}

File templates/everyone.html

View file
  • Ignore whitespace
+{% extends "base.html" %}
+{% block content %}
+users at GA (now):
+{% for user in users %}
+<li>{{ user.firstName}} {{ user.lastName }} <img src="{{ user.photo_url}}" /></li>
+{% endfor %}
+
+{% endblock %}

File test.db

  • Ignore whitespace
Binary file modified.

File urls.py

View file
  • Ignore whitespace
     # (r'^Fourskill/', include('Fourskill.foo.urls')),
     url(r'^$', "team.views.index", name="team-index"),
     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'),
     # 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.