This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select count(distinct(posts.id)) from posts | |
left outer join comments on posts.id = comments.post_id | |
where comments.id is not null and posts.deleted is null and comments.deleted is null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Sign Up HTML: should take in user info and store to user table --> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="/style/mystyle.css"/> | |
<title>New Users!</title> | |
</head> | |
<body id="body"> | |
<div id="header"> | |
<h1 id="title"> clusterForum: Sign Up! </h1> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@view_config(route_name='sign_up', renderer='forumapp:templates/sign_up.mako', permission=NO_PERMISSION_REQUIRED) | |
def signup(request): | |
db = request.db | |
import pdb; pdb.set_trace() | |
if request.POST.get("submit", False): | |
user = User(username=request.POST['username'], | |
password=request.POST['password'], | |
email=request.POST['email'], | |
age=request.POST['age']) | |
db.add(user) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, shutil, csv | |
from xml.dom import minidom | |
from xml.etree import ElementTree as ET | |
from jinja2 import Template, Environment, PackageLoader | |
env = Environment(loader=PackageLoader('main', 'templates')) | |
template = env.get_template('template.html') | |
fileList = os.listdir('./data') | |
def get_XML_Files(fileList): | |
for f in fileList: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<script src="jquery-1.7.1.js"></script> | |
<script src="handlebars.js"></script> | |
<script src="underscore.js"></script> |