Permalink
Browse files

fix for ray server

  • Loading branch information...
reedlabotz committed Mar 29, 2012
1 parent e5662c3 commit 55a68620879a01ac47193f23505fcf1ed4ab77d0
Showing with 26 additions and 24 deletions.
  1. +10 −2 intranet/member_manager/views.py
  2. +11 −7 settings.py
  3. +0 −9 templates/main.html
  4. +4 −2 urls.py
  5. +1 −4 views.py
@@ -13,10 +13,18 @@ def main(request):
def search(request):
q = request.GET.get('q')
if q:
- members = Member.objects.filter(Q(netid__icontains=q) | Q(first_name__icontains=q) | Q(last_name__icontains=q)).order_by('last_name', 'first_name')
+ members = Member.objects.filter(Q(netid__icontains=q) | \
+ Q(first_name__icontains=q) | \
+ Q(last_name__icontains=q)) \
+ .order_by('last_name', 'first_name')
else:
members = Member.objects.order_by('last_name', 'first_name')
- return render_to_response('intranet/member_manager/search.html',{"section":"intranet","page":'members','members':members,'q':q})
+
+ return render_to_response('intranet/member_manager/search.html',{
+ "section":"intranet",
+ "page":'members',
+ 'members':members,
+ 'q':q})
def new(request):
c = {}
View
@@ -131,13 +131,7 @@
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
- #'django.contrib.sites',
- #'django.contrib.messages',
- 'django.contrib.staticfiles',
- # Uncomment the next line to enable the admin:
- #'django.contrib.admin',
- # Uncomment the next line to enable admin documentation:
- #'django.contrib.admindocs',
+
'abouta',
'intranet',
'account',
@@ -173,3 +167,13 @@
# Append slashes if not found in URLConf
APPEND_SLASH = True
+
+SERVE_STATIC = True
+
+if SERVE_STATIC:
+ INSTALLED_APPS += ('django.contrib.staticfiles',)
+
+try:
+ from local_settings import *
+except ImportError, exp:
+ pass
View
@@ -20,15 +20,6 @@ <h1>Welcome to ACM@UIUC!</h1>
<div class="span4">
<h2>GitHub</h2>
<p>Code straight from the ACM@UIUC GitHub</p>
- <ul class="unstyled">
- {% for e in events %}
- {% if e.type == "PushEvent" %}
- <li>
- <a href="https://github.com/{{e.actor.login}}">{{e.actor.login}}</a> pushed to <a href="http://github.com/{{e.repo.name}}">{{e.repo.name}}</a>.
- </li>
- {% endif %}
- {% endfor %}
- </ul>
<p><a class="btn" href="http://github.com/acm-uiuc/">View GitHub &raquo;</a></p>
</div>
View
@@ -1,5 +1,5 @@
from django.conf.urls.defaults import patterns, include, url
-from django.contrib.staticfiles.urls import staticfiles_urlpatterns
+import settings
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
@@ -16,4 +16,6 @@
url(r'^intranet/', include('intranet.urls')),
)
-urlpatterns += staticfiles_urlpatterns()
+if settings.SERVE_STATIC:
+ from django.contrib.staticfiles.urls import staticfiles_urlpatterns
+ urlpatterns += staticfiles_urlpatterns()
View
@@ -4,10 +4,7 @@
import simplejson
def main(request):
- # Build GitHub activity
- feed = urllib.urlopen("https://api.github.com/orgs/acm-uiuc/events")
- events = simplejson.loads(feed.read())[0:5]
- return render_to_response('main.html', {'events':events})
+ return render_to_response('main.html')
def contact(request):
return render_to_response('contact.html',{"section":"contact"})

0 comments on commit 55a6862

Please sign in to comment.