{"action":"created","comment":{"url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/comments/22397786","id":22397786,"diff_hunk":"@@ -0,0 +1,363 @@\n+from flask import request, session, g, redirect, url_for, abort, \\\n+    render_template, flash\n+from sqlalchemy import text\n+import datetime\n+import re\n+\n+from RuddockWebsite import app, auth\n+from RuddockWebsite.constants import *\n+from RuddockWebsite.common_helpers import *\n+from RuddockWebsite.decorators import *","path":"RuddockWebsite/routes.py","position":10,"original_position":10,"commit_id":"50367a607ff0149f8e09d384e100f9d4ae97e0d0","original_commit_id":"50367a607ff0149f8e09d384e100f9d4ae97e0d0","user":{"login":"dkong1796","id":1891237,"avatar_url":"https://avatars.githubusercontent.com/u/1891237?v=3","gravatar_id":"","url":"https://api.github.com/users/dkong1796","html_url":"https://github.com/dkong1796","followers_url":"https://api.github.com/users/dkong1796/followers","following_url":"https://api.github.com/users/dkong1796/following{/other_user}","gists_url":"https://api.github.com/users/dkong1796/gists{/gist_id}","starred_url":"https://api.github.com/users/dkong1796/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkong1796/subscriptions","organizations_url":"https://api.github.com/users/dkong1796/orgs","repos_url":"https://api.github.com/users/dkong1796/repos","events_url":"https://api.github.com/users/dkong1796/events{/privacy}","received_events_url":"https://api.github.com/users/dkong1796/received_events","type":"User","site_admin":false},"body":"We should really avoid using `from _ import *`, since that makes it difficult to figure out where functions are being defined as such. I really like using `from RuddockWebsite import module` and later `module.function()`, but otherwise we can also do `from Ruddockwebsite.decorators import login_required` instead of `import *`.\r\n\r\nFor constants I prefer `import RuddockWebsite.constants as const` and `const.VALUE` over `import *` also.","created_at":"2015-01-01T02:18:04Z","updated_at":"2015-01-01T02:18:04Z","html_url":"https://github.com/RuddockHouse/RuddockWebsite/pull/71#discussion_r22397786","pull_request_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/comments/22397786"},"html":{"href":"https://github.com/RuddockHouse/RuddockWebsite/pull/71#discussion_r22397786"},"pull_request":{"href":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/71","id":26619415,"html_url":"https://github.com/RuddockHouse/RuddockWebsite/pull/71","diff_url":"https://github.com/RuddockHouse/RuddockWebsite/pull/71.diff","patch_url":"https://github.com/RuddockHouse/RuddockWebsite/pull/71.patch","issue_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues/71","number":71,"state":"open","locked":false,"title":"Start of restructuring with blueprints and modules","user":{"login":"epelz","id":1750576,"avatar_url":"https://avatars.githubusercontent.com/u/1750576?v=3","gravatar_id":"","url":"https://api.github.com/users/epelz","html_url":"https://github.com/epelz","followers_url":"https://api.github.com/users/epelz/followers","following_url":"https://api.github.com/users/epelz/following{/other_user}","gists_url":"https://api.github.com/users/epelz/gists{/gist_id}","starred_url":"https://api.github.com/users/epelz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epelz/subscriptions","organizations_url":"https://api.github.com/users/epelz/orgs","repos_url":"https://api.github.com/users/epelz/repos","events_url":"https://api.github.com/users/epelz/events{/privacy}","received_events_url":"https://api.github.com/users/epelz/received_events","type":"User","site_admin":false},"body":"We've been talking about using blueprints for ages (started in #14), so this is a start in that direction. This moves the room hassle section of the site into a new module. Once we do this with the entire site, it should make everything easier to work with.\r\n\r\nI hoping to get comments on this organization structure, and if it's good then I'll continue with the rest of the site. The general structure for all blueprints would be the same as this, so let me know if anything seems complicated/confusing/non-pythonic.","created_at":"2014-12-28T00:16:30Z","updated_at":"2015-01-01T02:18:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5935cc191778ee8c11bb595ae8eab7206796b47","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/71/commits","review_comments_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/71/comments","review_comment_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/comments/{number}","comments_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues/71/comments","statuses_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/statuses/50367a607ff0149f8e09d384e100f9d4ae97e0d0","head":{"label":"RuddockHouse:blueprint","ref":"blueprint","sha":"50367a607ff0149f8e09d384e100f9d4ae97e0d0","user":{"login":"RuddockHouse","id":3302629,"avatar_url":"https://avatars.githubusercontent.com/u/3302629?v=3","gravatar_id":"","url":"https://api.github.com/users/RuddockHouse","html_url":"https://github.com/RuddockHouse","followers_url":"https://api.github.com/users/RuddockHouse/followers","following_url":"https://api.github.com/users/RuddockHouse/following{/other_user}","gists_url":"https://api.github.com/users/RuddockHouse/gists{/gist_id}","starred_url":"https://api.github.com/users/RuddockHouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RuddockHouse/subscriptions","organizations_url":"https://api.github.com/users/RuddockHouse/orgs","repos_url":"https://api.github.com/users/RuddockHouse/repos","events_url":"https://api.github.com/users/RuddockHouse/events{/privacy}","received_events_url":"https://api.github.com/users/RuddockHouse/received_events","type":"Organization","site_admin":false},"repo":{"id":9571998,"name":"RuddockWebsite","full_name":"RuddockHouse/RuddockWebsite","owner":{"login":"RuddockHouse","id":3302629,"avatar_url":"https://avatars.githubusercontent.com/u/3302629?v=3","gravatar_id":"","url":"https://api.github.com/users/RuddockHouse","html_url":"https://github.com/RuddockHouse","followers_url":"https://api.github.com/users/RuddockHouse/followers","following_url":"https://api.github.com/users/RuddockHouse/following{/other_user}","gists_url":"https://api.github.com/users/RuddockHouse/gists{/gist_id}","starred_url":"https://api.github.com/users/RuddockHouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RuddockHouse/subscriptions","organizations_url":"https://api.github.com/users/RuddockHouse/orgs","repos_url":"https://api.github.com/users/RuddockHouse/repos","events_url":"https://api.github.com/users/RuddockHouse/events{/privacy}","received_events_url":"https://api.github.com/users/RuddockHouse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RuddockHouse/RuddockWebsite","description":"Source code for the Ruddock House website.","fork":false,"url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite","forks_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/forks","keys_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/teams","hooks_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/hooks","issue_events_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues/events{/number}","events_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/events","assignees_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/assignees{/user}","branches_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/branches{/branch}","tags_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/tags","blobs_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/refs{/sha}","trees_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/statuses/{sha}","languages_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/languages","stargazers_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/stargazers","contributors_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/contributors","subscribers_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/subscribers","subscription_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/subscription","commits_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/commits{/sha}","git_commits_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/commits{/sha}","comments_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/comments{/number}","issue_comment_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues/comments/{number}","contents_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/contents/{+path}","compare_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/merges","archive_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/downloads","issues_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues{/number}","pulls_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls{/number}","milestones_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/milestones{/number}","notifications_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/labels{/name}","releases_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/releases{/id}","created_at":"2013-04-20T23:12:12Z","updated_at":"2014-12-28T06:07:41Z","pushed_at":"2014-12-31T08:41:39Z","git_url":"git://github.com/RuddockHouse/RuddockWebsite.git","ssh_url":"git@github.com:RuddockHouse/RuddockWebsite.git","clone_url":"https://github.com/RuddockHouse/RuddockWebsite.git","svn_url":"https://github.com/RuddockHouse/RuddockWebsite","homepage":"http://ruddock.caltech.edu/","size":1811,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":2,"default_branch":"master"}},"base":{"label":"RuddockHouse:master","ref":"master","sha":"b59188458d009de0421f05dfd3b1cb59d2a05c72","user":{"login":"RuddockHouse","id":3302629,"avatar_url":"https://avatars.githubusercontent.com/u/3302629?v=3","gravatar_id":"","url":"https://api.github.com/users/RuddockHouse","html_url":"https://github.com/RuddockHouse","followers_url":"https://api.github.com/users/RuddockHouse/followers","following_url":"https://api.github.com/users/RuddockHouse/following{/other_user}","gists_url":"https://api.github.com/users/RuddockHouse/gists{/gist_id}","starred_url":"https://api.github.com/users/RuddockHouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RuddockHouse/subscriptions","organizations_url":"https://api.github.com/users/RuddockHouse/orgs","repos_url":"https://api.github.com/users/RuddockHouse/repos","events_url":"https://api.github.com/users/RuddockHouse/events{/privacy}","received_events_url":"https://api.github.com/users/RuddockHouse/received_events","type":"Organization","site_admin":false},"repo":{"id":9571998,"name":"RuddockWebsite","full_name":"RuddockHouse/RuddockWebsite","owner":{"login":"RuddockHouse","id":3302629,"avatar_url":"https://avatars.githubusercontent.com/u/3302629?v=3","gravatar_id":"","url":"https://api.github.com/users/RuddockHouse","html_url":"https://github.com/RuddockHouse","followers_url":"https://api.github.com/users/RuddockHouse/followers","following_url":"https://api.github.com/users/RuddockHouse/following{/other_user}","gists_url":"https://api.github.com/users/RuddockHouse/gists{/gist_id}","starred_url":"https://api.github.com/users/RuddockHouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RuddockHouse/subscriptions","organizations_url":"https://api.github.com/users/RuddockHouse/orgs","repos_url":"https://api.github.com/users/RuddockHouse/repos","events_url":"https://api.github.com/users/RuddockHouse/events{/privacy}","received_events_url":"https://api.github.com/users/RuddockHouse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RuddockHouse/RuddockWebsite","description":"Source code for the Ruddock House website.","fork":false,"url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite","forks_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/forks","keys_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/teams","hooks_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/hooks","issue_events_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues/events{/number}","events_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/events","assignees_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/assignees{/user}","branches_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/branches{/branch}","tags_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/tags","blobs_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/refs{/sha}","trees_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/statuses/{sha}","languages_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/languages","stargazers_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/stargazers","contributors_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/contributors","subscribers_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/subscribers","subscription_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/subscription","commits_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/commits{/sha}","git_commits_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/git/commits{/sha}","comments_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/comments{/number}","issue_comment_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues/comments/{number}","contents_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/contents/{+path}","compare_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/merges","archive_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/downloads","issues_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues{/number}","pulls_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls{/number}","milestones_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/milestones{/number}","notifications_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/labels{/name}","releases_url":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/releases{/id}","created_at":"2013-04-20T23:12:12Z","updated_at":"2014-12-28T06:07:41Z","pushed_at":"2014-12-31T08:41:39Z","git_url":"git://github.com/RuddockHouse/RuddockWebsite.git","ssh_url":"git@github.com:RuddockHouse/RuddockWebsite.git","clone_url":"https://github.com/RuddockHouse/RuddockWebsite.git","svn_url":"https://github.com/RuddockHouse/RuddockWebsite","homepage":"http://ruddock.caltech.edu/","size":1811,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/71"},"html":{"href":"https://github.com/RuddockHouse/RuddockWebsite/pull/71"},"issue":{"href":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues/71"},"comments":{"href":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/RuddockHouse/RuddockWebsite/statuses/50367a607ff0149f8e09d384e100f9d4ae97e0d0"}}}}