Skip to content

Commit

Permalink
Merge pull request #1 from rossnanop/master
Browse files Browse the repository at this point in the history
Added templates folder for organization
  • Loading branch information
hpsin committed Jan 18, 2013
2 parents f28db68 + 94a17d6 commit a4993cb
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 85 deletions.
2 changes: 1 addition & 1 deletion Views.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get(self):
#Verified status
#Events (later)

path = os.path.join(os.path.dirname(__file__), 'viewUser.html')
path = os.path.join(os.path.dirname(__file__), './templates/viewUser.html')
self.response.out.write(template.render(path, template_values))


Expand Down
150 changes: 75 additions & 75 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import os
from google.appengine.ext.webapp import template

import webapp2
from dbClasses import Event
from dbClasses import AppUser

import gQuery

from eventInteraction import Make
from eventInteraction import Report
from eventInteraction import Attend
from eventInteraction import Verify

from Views import ViewUser

from google.appengine.ext import db
from google.appengine.api import users

class IntroPage(webapp2.RequestHandler):
def get(self):
limit=20

user=AppUser.getUser()
message=self.request.get('message')
pageNum=self.request.get('page')
if not pageNum:
pageNum=0
events = gQuery.getEvents(limit, pageNum, user)
if events == None:
events=[]

if users.get_current_user():
url = users.create_logout_url(self.request.uri)
url_linktext = 'Logout'
else:
url = users.create_login_url(self.request.uri)
url_linktext = 'Login'

template_values = {
'events': events,
'url': url,
'url_linktext': url_linktext,
"user":user,
"message":message,
"pageNum":pageNum
}

path = os.path.join(os.path.dirname(__file__), 'main.html')
self.response.out.write(template.render(path, template_values))


app = webapp2.WSGIApplication([('/',IntroPage),
('/Make', Make),
('/Report', Report),
('/Attend', Attend),
('/Verify', Verify),
('/User/.*', ViewUser)],
debug=True)
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import os
from google.appengine.ext.webapp import template

import webapp2
from dbClasses import Event
from dbClasses import AppUser

import gQuery

from eventInteraction import Make
from eventInteraction import Report
from eventInteraction import Attend
from eventInteraction import Verify

from Views import ViewUser

from google.appengine.ext import db
from google.appengine.api import users

class IntroPage(webapp2.RequestHandler):
def get(self):
limit=20

user=AppUser.getUser()
message=self.request.get('message')
pageNum=self.request.get('page')
if not pageNum:
pageNum=0
events = gQuery.getEvents(limit, pageNum, user)
if events == None:
events=[]

if users.get_current_user():
url = users.create_logout_url(self.request.uri)
url_linktext = 'Logout'
else:
url = users.create_login_url(self.request.uri)
url_linktext = 'Login'

template_values = {
'events': events,
'url': url,
'url_linktext': url_linktext,
"user":user,
"message":message,
"pageNum":pageNum
}

path = os.path.join(os.path.dirname(__file__), './templates/main.html')
self.response.out.write(template.render(path, template_values))


app = webapp2.WSGIApplication([('/',IntroPage),
('/Make', Make),
('/Report', Report),
('/Attend', Attend),
('/Verify', Verify),
('/User/.*', ViewUser)],
debug=True)
17 changes: 8 additions & 9 deletions stylesheets/main.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@charset "utf-8";
body {
font: 100%/1.4 Georgia, "Times New Roman", Times, serif;
background: #000;
background: #FF5533;
margin: 10px;
padding: 0;
color: #242424;
Expand All @@ -27,19 +27,18 @@ h3, h4, h5, h6, p {
}

a:link {
color: #FFF;
color: #000;
text-decoration: underline;
padding: 12px 10px 12px 10px;
padding: 5px 5px 5px 5px;
}
a:visited {
color: #FFF;
color: #000;
text-decoration: underline;
padding: 12px 10px 12px 10px;
}
a:hover, a:active, a:focus {
color: #000;
text-decoration: none;
background: #242424;
padding: 12px 10px 12px 10px;
padding: 5px 5px 5px 5px;
}

a img {
Expand All @@ -60,7 +59,7 @@ a img {
left: 0;
width: 100%;
height: 180px;
background: #000;
background: #FFCC44;
padding: 10px 0 0 25px;
}

Expand All @@ -84,7 +83,7 @@ a img {
height: 300px;
margin: 0 auto;
overflow: auto;
background: #222;
background: #FF5533;
padding: 10px 0 0 25px;
}

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit a4993cb

Please sign in to comment.