Commits

Johnny Goodnow  committed 989b8cf Merge

* Another merge, damn database.

  • Participants
  • Parent commits 4a9669f, b83ee24

Comments (0)

Files changed (3)

File geolocator/forms.py

 
 class HokieFinderForm(forms.Form):
 	FILTER_CHOICES = (
-	  ('display_name', 'Name'),
-	  ('pid', 'PID'),
+	  ('displayName', 'Name'),
+	  ('uupid', 'PID'),
 	  ('major', 'Major'),
 	)
-	query = forms.CharField()
-	filter_box = forms.ChoiceField(initial = 'display_name', choices = FILTER_CHOICES)
+	term = forms.CharField()
+	filter_type = forms.ChoiceField(initial = 'displayName', choices = FILTER_CHOICES)

File geolocator/views.py

         form = forms.HokieFinderForm(request.POST)
         if form.is_valid():
             query = form.cleaned_data
+            reader = Ldap_Reader(query['term'], query['filter_type'])
+            response = reader.get()
             return HttpResponseRedirect('/')
     else:
         form = forms.HokieFinderForm()
-    return render_to_response("index.html", {'form': form})
+    return render_to_response("index.html", {'form': form},
+                              context_instance=RequestContext(request))
 
 def user_invalid_view(request):
     return render_to_response("invalid.html")
         form = forms.UserLoginForm()
     return render_to_response("login.html", {'form': form})
 
+@login_required
 def user_logout_view(request):
     auth.logout(request)
     return HttpResponseRedirect('/accounts/logout/success/')

File resources/database/hokiefinderdb.sqlite3

Binary file modified.