Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:billsaysthis/hd-events

Conflicts:
  main.py
  models.py
  templates/base.html
  • Loading branch information...
commit 314cdc8a2b5b3f740812586109e1b23b3766c506 2 parents 5459516 + 718db43
@billsaysthis authored
Showing with 20 additions and 15 deletions.
  1. +9 −4 main.py
  2. +6 −6 models.py
  3. +5 −5 templates/base.html
View
13 main.py
@@ -182,6 +182,7 @@ def get(self, id):
logout_url = users.create_logout_url('/')
rooms = ROOM_OPTIONS
hours = [1,2,3,4,5,6,7,8,9,10,11,12]
+ page_title = event.name
self.response.out.write(template.render('templates/edit.html', locals()))
else:
self.response.out.write("Access denied")
@@ -281,6 +282,7 @@ def get(self, id):
event.details = db.Text(event.details.replace('\n','<br/>'))
show_all_nav = user
event.notes = db.Text(event.notes.replace('\n','<br/>'))
+ page_title = event.name
self.response.out.write(template.render('templates/event.html', locals()))
def post(self, id):
@@ -339,6 +341,7 @@ def get(self):
today = local_today()
show_all_nav = user
events = Event.get_approved_list()
+ page_title = 'Approved Events'
tomorrow = today + timedelta(days=1)
whichbase = 'base.html'
if self.request.get('base'):
@@ -356,6 +359,7 @@ def get(self):
login_url = users.create_login_url('/')
events = Event.all().filter('member = ', user).order('start_time')
show_all_nav = user
+ page_title = 'My Events'
today = local_today()
tomorrow = today + timedelta(days=1)
self.response.out.write(template.render('templates/myevents.html', locals()))
@@ -371,6 +375,7 @@ def get(self):
today = local_today()
show_all_nav = user
events = Event.all().filter('start_time < ', today).order('-start_time')
+ page_title = 'Past Events'
self.response.out.write(template.render('templates/past.html', locals()))
@@ -405,6 +410,7 @@ def get(self):
events = Event.get_all_future_list()
today = local_today()
tomorrow = today + timedelta(days=1)
+ page_title = 'All Future Events'
self.response.out.write(template.render('templates/all_future.html', locals()))
class LargeHandler(webapp.RequestHandler):
@@ -430,6 +436,7 @@ def get(self):
login_url = users.create_login_url('/')
events = Event.get_pending_list()
show_all_nav = user
+ page_title = 'Pending Events'
today = local_today()
tomorrow = today + timedelta(days=1)
self.response.out.write(template.render('templates/pending.html', locals()))
@@ -445,10 +452,7 @@ def get(self):
else:
login_url = users.create_login_url('/')
rooms = ROOM_OPTIONS
- rules = memcache.get("rules")
- if(rules is None):
- rules = urlfetch.fetch("http://wiki.hackerdojo.com/api_v2/op/GetPage/page/Event+Policies/_type/html", "GET").content
- memcache.add("rules", rules, 86400)
+ page_title = 'Adding New Event'
self.response.out.write(template.render('templates/new.html', locals()))
@@ -536,6 +540,7 @@ def get(self):
else:
login_url = users.create_login_url('/')
show_all_nav = user
+ page_title = 'Event Logs'
self.response.out.write(template.render('templates/logs.html', locals()))
class FeedbackHandler(webapp.RequestHandler):
View
12 models.py
@@ -33,14 +33,14 @@ class Event(db.Model):
notes = db.TextProperty()
type = db.StringProperty(required=True)
estimated_size = db.StringProperty(required=True)
- reminded = db.BooleanProperty(default=False)
+ reminded = db.BooleanProperty(default=False)
- contact_name = db.StringProperty()
- contact_phone = db.StringProperty()
+ contact_name = db.StringProperty()
+ contact_phone = db.StringProperty()
- expired = db.DateTimeProperty()
- created = db.DateTimeProperty(auto_now_add=True)
- updated = db.DateTimeProperty(auto_now=True)
+ expired = db.DateTimeProperty()
+ created = db.DateTimeProperty(auto_now_add=True)
+ updated = db.DateTimeProperty(auto_now=True)
@classmethod
def check_conflict(cls,proposed_start_time,proposed_end_time,proposed_rooms,optional_existing_event_id = 0):
View
10 templates/base.html
@@ -1,10 +1,10 @@
<html>
<head>
<title>{% block title %}Events at Hacker Dojo{% endblock %}</title>
- <link href="/static/style.css" type="text/css" rel="stylesheet" />
- {% block feed %}
+ <link href="/static/style.css" type="text/css" rel="stylesheet" />
+ {% block feed %}
<link rel="alternate" type="application/xml" title="Hacker Dojo events feed" href="/events.rss" />
- {% endblock %}
+ {% endblock %}
<link type="text/css" href="/static/css/blitzer/jquery-ui-1.8.1.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/static/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.cookies.js"></script>
@@ -41,7 +41,7 @@ <h2 style="font-size: x-large;">at Hacker Dojo</h2>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-27117910-3']);
- _gaq.push(['_setDomainName', '.hackerdojo.com']);
+ _gaq.push(['_setDomainName', '.hackerdojo.com']);
_gaq.push(['_trackPageview']);
(function() {
@@ -50,5 +50,5 @@ <h2 style="font-size: x-large;">at Hacker Dojo</h2>
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
-</script>
+</script>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.