Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor updates here and there to bills contributions.

  • Loading branch information...
commit d75579f3d39407790af1a0aff36362640867799e 1 parent 93ef679
@progrium progrium authored
View
8 main.py
@@ -7,7 +7,7 @@
from icalendar import Calendar, Event as CalendarEvent
import logging, urllib
-from datetime import datetime, timedelta, time
+from datetime import datetime, timedelta, time, date
from pytz import timezone
import pytz
@@ -233,8 +233,8 @@ def get(self):
logout_url = users.create_logout_url('/')
else:
login_url = users.create_login_url('/')
- today = date.today()
- events = Event.all().filter('start_date < ', today).order('start_time DESC')
+ today = datetime.today()
+ events = Event.all().filter('start_time < ', today).order('-start_time')
is_admin = username(user) in dojo('/groups/events')
self.response.out.write(template.render('templates/past.html', locals()))
@@ -303,7 +303,7 @@ def main():
application = webapp.WSGIApplication([
('/', ApprovedHandler),
('/events\.(.+)', EventsHandler),
- ('/past\.(.+)', PastHandler),
+ ('/past', PastHandler),
('/pending', PendingHandler),
('/myevents', MyEventsHandler),
('/new', NewHandler),
View
2  templates/approved.html
@@ -6,7 +6,6 @@
<div id="primary">
<h3>Upcoming Events</h3>
- <p><a href='/past'>Past Events</a></p>
{% regroup events by start_date as grouped_events %}
{% for events in grouped_events %}
@@ -18,6 +17,7 @@
</table>
{% endfor %}
+ <p style="font-size: smaller;"><a href='/past'>Past Events</a></p>
<p style="font-size: x-small">Alternative formats: <a href="/events.ics">iCal</a> | RSS | JSON</p>
</div>
View
2  templates/base.html
@@ -23,7 +23,7 @@
<body>
<div id="top">
{% if user %}
- <span><strong>{{user.email}}</strong> <!--| <a href="/myevents">My Events</a--> | <a href="{{logout_url}}">Logout</a></span>
+ <span><strong>{{user.email}}</strong> | <a href="/myevents">My Events</a> | <a href="{{logout_url}}">Logout</a></span>
{% else %}
<span><a style="font-weight: bold;" href="{{login_url}}">Login</a> | <a href="http://signup.hackerdojo.com/upgrade/needaccount">Need an account?</a></span>
{% endif %}
View
2  templates/event.html
@@ -5,7 +5,7 @@
</div>
<div id="primary">
- <h3><a href='{{event.url}}'>{{event.name|title}}</a></h3>
+ <h3><a style="color: black;" href='{{event.url}}'>{{event.name|title}}</a></h3>
<p>
<form method="post" style="display: inline;">
{% if can_approve %}<input type="submit" name="state" value="Approve" />{% endif %}
View
2  templates/myevents.html
@@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% block content %}
<div id="menu" style="float: right; margin: 10px; font-size: smaller;">
- <a href="/">Approved</a> | Pending | <a href="/new" style="font-weight: bold;">New Event</a>
+ <a href="/">Approved</a> | <a href="/pending">Pending</a> | <a href="/new" style="font-weight: bold;">New Event</a>
</div>
<div id="primary">
View
2  templates/past.html
@@ -6,7 +6,7 @@
<div id="primary">
<h3>Past Events</h3>
- <p><a href='/'>Upcoming Events</a></p>
+ <p style="font-size: smaller;"><a href='/'>Upcoming Events</a></p>
{% regroup events by start_date as grouped_events %}
{% for events in grouped_events %}
Please sign in to comment.
Something went wrong with that request. Please try again.