Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
maximz committed Apr 6, 2016
2 parents b960892 + ca859b2 commit 81524fe
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 47 deletions.
2 changes: 0 additions & 2 deletions course_selection/management/commands/clear_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@ def handle(self, *args, **kwargs):
self.stdout.write('Your default cache has been cleared!\n')
caches['courses'].clear()
self.stdout.write('Your courses cache has been cleared!\n')
caches['courseapi'].clear()
self.stdout.write('Your courseapi cache has been cleared!\n')
except AttributeError:
raise CommandError('You have no cache configured!\n')
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ def handle(self, *args, **options):
data = json.dumps(results)
caches['courses'].set(term_code, data)
self.stdout.write('course selection: cache regenerated for term ' + str(term_code))
caches['courseapi'].clear()
self.stdout.write('course selection: courseapi cache cleared.')
31 changes: 2 additions & 29 deletions course_selection/templates/landing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h5>RIP ICE 2010 &mdash; 2015</h5>
<h1>Frustrated with TigerHub?</h1>
<h3>Use ReCal to pick your courses.</h3>
<h1>Use ReCal to pick your courses.</h1>
<h3>A fast, sleek, and intuitive way to do course selection.</h3>
<h5>
<a href="/login?next=/" class="btn btn-warning btn-lg">Log in to Select Courses</a>
</h5>
Expand All @@ -80,32 +79,6 @@ <h5>
</div><!-- /headerwrap -->




<!-- *****************************************************************************************************************
MIDDLE CONTENT
***************************************************************************************************************** -->

<div class="container mtb">
<div class="row">
<div class="col-lg-4 col-lg-offset-2">
<h4>Why ReCal instead of TigerHub?</h4>
<p>We're so proud of the University for releasing TigerHub, but we know it's a work in progress. We built a nicer course selection interface from our independent work project, named ReCal &mdash; short for Rethinking Calendar. We figured we'd release it while TigerHub is being improved.</p>
<p>ReCal is faster, sleeker, and easier to use.</p>
<p style="text-align:center;"><a href="/login?next=/" class="btn btn-theme">Start finding courses &rarr;</a></p>
</div>

<div class="col-lg-4 col-lg-offset-1">
<h4>Coming in Fall 2015:</h4>
<!--<div class="hline"></div>-->
<p>We'll be launching the full ReCal project. The idea: </p>
<p>Everyone can track deadlines, exam times, and office hours in one shared class calendar, so changes are instant and it's always up to date. No more searching through Blackboard or email for when office hours are this week or when the next homework is due.</p>
</div>

</div><! --/row -->
</div><! --/container -->


<!-- *****************************************************************************************************************
FOOTER
***************************************************************************************************************** -->
Expand Down
2 changes: 1 addition & 1 deletion course_selection/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_users_json(request):


@require_GET
@cache_page(60 * 30, cache="courseapi") # cache for 30 minutes
@cache_page(60 * 30) # cache for 30 minutes
def get_courses_json(request, term_code):
"""
Returns list of courses for a semester
Expand Down
2 changes: 1 addition & 1 deletion course_selection/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise

application = DjangoWhiteNoise(get_wsgi_application())
application = DjangoWhiteNoise(get_wsgi_application())
2 changes: 1 addition & 1 deletion extern/cron_jobs/continuity.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def sendEmail(base_url, tested_url, test_time_utc):
msg.attach(MIMEText("URL tested: " + base_url + tested_url + ". Time (UTC): " + test_time_utc))
msg.attach(MIMEText('\nsent via python from ' + socket.gethostname(), 'plain'))
username = '[email protected]'
password = 'MailMarvin'
password = 'PASSWORD'
server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
server.ehlo()
#server.starttls()
Expand Down
3 changes: 0 additions & 3 deletions settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@
'courses': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache', # overwritten in prod.py
},
'courseapi': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache', # overwritten in prod.py
},
'resources': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 60
Expand Down
15 changes: 7 additions & 8 deletions settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ def get_cache():
'LOCATION': 'courses_cache_table',
'TIMEOUT': 60 * 60
},
'courseapi': {
'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
'LOCATION': 'courseapi_cache_table',
'TIMEOUT': 60 * 60
'memcache': {
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
'TIMEOUT': 500,
'BINARY': True,
'OPTIONS': {
'tcp_nodelay': True
}
}
}
except:
Expand All @@ -67,11 +70,7 @@ def get_cache():
},
'courses': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'
},
'courseapi': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'
}

}

CACHES = get_cache()
Expand Down

0 comments on commit 81524fe

Please sign in to comment.