{"action":"created","comment":{"url":"https://api.github.com/repos/Coverfox/cfblog/pulls/comments/41358233","id":41358233,"diff_hunk":"@@ -0,0 +1,283 @@\n+__author__ = 'vinay'\n+import datetime\n+from functools import wraps\n+import os\n+import re\n+\n+from bs4 import BeautifulSoup, Tag\n+from mistune import markdown\n+\n+from django.contrib.auth.models import AnonymousUser\n+from django.core.cache import cache\n+from django.core.exceptions import PermissionDenied\n+from django.core.urlresolvers import resolve\n+from django.http.request import HttpRequest\n+from django.template import TemplateSyntaxError\n+from django.utils.decorators import available_attrs\n+from django.utils.text import slugify\n+\n+from .exceptions import CmsInvalidTemplateException, CmsInvalidContent\n+from .settings import CMS_AUTH_TEST_FUNC, PAGE_CACHE_TIMEOUT\n+from .validators import validate_and_get_template, ValidationError\n+\n+dum_request = HttpRequest()\n+dum_request.user = AnonymousUser()\n+\n+CMS_ATTRIBUTES = ['data-cms-attr', 'data-cms-content', 'data-cms-include']\n+\n+attr_re = re.compile(r'^(?:(?:[a-z-]+:[a-z_0-9]+)+(?:\\|(?:[a-z-]+:[a-z_0-9]+))*)*$', re.IGNORECASE)\n+content_re = re.compile(r'^(?:md:)?([a-z_0-9])+$', re.IGNORECASE)\n+include_html_re = re.compile(r'^(?:(?:[a-z_0-9])+:)?.+$', re.IGNORECASE)\n+namespace_re = re.compile(r'^(?:[a-z_0-9])+$', re.IGNORECASE)\n+\n+NAMESPACE_DELIMITER = '-'","path":"cfblog/utils.py","position":33,"original_position":33,"commit_id":"4d4d4e2030b33c81955d8954f8082ccb083da33b","original_commit_id":"4d4d4e2030b33c81955d8954f8082ccb083da33b","user":{"login":"amitu","id":58662,"avatar_url":"https://avatars.githubusercontent.com/u/58662?v=3","gravatar_id":"","url":"https://api.github.com/users/amitu","html_url":"https://github.com/amitu","followers_url":"https://api.github.com/users/amitu/followers","following_url":"https://api.github.com/users/amitu/following{/other_user}","gists_url":"https://api.github.com/users/amitu/gists{/gist_id}","starred_url":"https://api.github.com/users/amitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitu/subscriptions","organizations_url":"https://api.github.com/users/amitu/orgs","repos_url":"https://api.github.com/users/amitu/repos","events_url":"https://api.github.com/users/amitu/events{/privacy}","received_events_url":"https://api.github.com/users/amitu/received_events","type":"User","site_admin":false},"body":"Can we use some other namespace delimiter? - is never a namespace delimiter and will be part of many template names. \":\" or \"|\" is better.","created_at":"2015-10-07T07:13:51Z","updated_at":"2015-10-07T07:13:51Z","html_url":"https://github.com/Coverfox/cfblog/pull/1#discussion_r41358233","pull_request_url":"https://api.github.com/repos/Coverfox/cfblog/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Coverfox/cfblog/pulls/comments/41358233"},"html":{"href":"https://github.com/Coverfox/cfblog/pull/1#discussion_r41358233"},"pull_request":{"href":"https://api.github.com/repos/Coverfox/cfblog/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Coverfox/cfblog/pulls/1","id":46991827,"html_url":"https://github.com/Coverfox/cfblog/pull/1","diff_url":"https://github.com/Coverfox/cfblog/pull/1.diff","patch_url":"https://github.com/Coverfox/cfblog/pull/1.patch","issue_url":"https://api.github.com/repos/Coverfox/cfblog/issues/1","number":1,"state":"open","locked":false,"title":"Dev","user":{"login":"vinayinvicible","id":8069666,"avatar_url":"https://avatars.githubusercontent.com/u/8069666?v=3","gravatar_id":"","url":"https://api.github.com/users/vinayinvicible","html_url":"https://github.com/vinayinvicible","followers_url":"https://api.github.com/users/vinayinvicible/followers","following_url":"https://api.github.com/users/vinayinvicible/following{/other_user}","gists_url":"https://api.github.com/users/vinayinvicible/gists{/gist_id}","starred_url":"https://api.github.com/users/vinayinvicible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinayinvicible/subscriptions","organizations_url":"https://api.github.com/users/vinayinvicible/orgs","repos_url":"https://api.github.com/users/vinayinvicible/repos","events_url":"https://api.github.com/users/vinayinvicible/events{/privacy}","received_events_url":"https://api.github.com/users/vinayinvicible/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-07T06:43:17Z","updated_at":"2015-10-07T07:13:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6f7bae7c31b54ff19f4aff99833090afb92016f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Coverfox/cfblog/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Coverfox/cfblog/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Coverfox/cfblog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Coverfox/cfblog/issues/1/comments","statuses_url":"https://api.github.com/repos/Coverfox/cfblog/statuses/4d4d4e2030b33c81955d8954f8082ccb083da33b","head":{"label":"vinayinvicible:dev","ref":"dev","sha":"4d4d4e2030b33c81955d8954f8082ccb083da33b","user":{"login":"vinayinvicible","id":8069666,"avatar_url":"https://avatars.githubusercontent.com/u/8069666?v=3","gravatar_id":"","url":"https://api.github.com/users/vinayinvicible","html_url":"https://github.com/vinayinvicible","followers_url":"https://api.github.com/users/vinayinvicible/followers","following_url":"https://api.github.com/users/vinayinvicible/following{/other_user}","gists_url":"https://api.github.com/users/vinayinvicible/gists{/gist_id}","starred_url":"https://api.github.com/users/vinayinvicible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinayinvicible/subscriptions","organizations_url":"https://api.github.com/users/vinayinvicible/orgs","repos_url":"https://api.github.com/users/vinayinvicible/repos","events_url":"https://api.github.com/users/vinayinvicible/events{/privacy}","received_events_url":"https://api.github.com/users/vinayinvicible/received_events","type":"User","site_admin":false},"repo":{"id":43292075,"name":"cfblog","full_name":"vinayinvicible/cfblog","owner":{"login":"vinayinvicible","id":8069666,"avatar_url":"https://avatars.githubusercontent.com/u/8069666?v=3","gravatar_id":"","url":"https://api.github.com/users/vinayinvicible","html_url":"https://github.com/vinayinvicible","followers_url":"https://api.github.com/users/vinayinvicible/followers","following_url":"https://api.github.com/users/vinayinvicible/following{/other_user}","gists_url":"https://api.github.com/users/vinayinvicible/gists{/gist_id}","starred_url":"https://api.github.com/users/vinayinvicible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinayinvicible/subscriptions","organizations_url":"https://api.github.com/users/vinayinvicible/orgs","repos_url":"https://api.github.com/users/vinayinvicible/repos","events_url":"https://api.github.com/users/vinayinvicible/events{/privacy}","received_events_url":"https://api.github.com/users/vinayinvicible/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vinayinvicible/cfblog","description":"Coverfox Blog","fork":true,"url":"https://api.github.com/repos/vinayinvicible/cfblog","forks_url":"https://api.github.com/repos/vinayinvicible/cfblog/forks","keys_url":"https://api.github.com/repos/vinayinvicible/cfblog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinayinvicible/cfblog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinayinvicible/cfblog/teams","hooks_url":"https://api.github.com/repos/vinayinvicible/cfblog/hooks","issue_events_url":"https://api.github.com/repos/vinayinvicible/cfblog/issues/events{/number}","events_url":"https://api.github.com/repos/vinayinvicible/cfblog/events","assignees_url":"https://api.github.com/repos/vinayinvicible/cfblog/assignees{/user}","branches_url":"https://api.github.com/repos/vinayinvicible/cfblog/branches{/branch}","tags_url":"https://api.github.com/repos/vinayinvicible/cfblog/tags","blobs_url":"https://api.github.com/repos/vinayinvicible/cfblog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinayinvicible/cfblog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinayinvicible/cfblog/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinayinvicible/cfblog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinayinvicible/cfblog/statuses/{sha}","languages_url":"https://api.github.com/repos/vinayinvicible/cfblog/languages","stargazers_url":"https://api.github.com/repos/vinayinvicible/cfblog/stargazers","contributors_url":"https://api.github.com/repos/vinayinvicible/cfblog/contributors","subscribers_url":"https://api.github.com/repos/vinayinvicible/cfblog/subscribers","subscription_url":"https://api.github.com/repos/vinayinvicible/cfblog/subscription","commits_url":"https://api.github.com/repos/vinayinvicible/cfblog/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinayinvicible/cfblog/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinayinvicible/cfblog/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinayinvicible/cfblog/issues/comments{/number}","contents_url":"https://api.github.com/repos/vinayinvicible/cfblog/contents/{+path}","compare_url":"https://api.github.com/repos/vinayinvicible/cfblog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinayinvicible/cfblog/merges","archive_url":"https://api.github.com/repos/vinayinvicible/cfblog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinayinvicible/cfblog/downloads","issues_url":"https://api.github.com/repos/vinayinvicible/cfblog/issues{/number}","pulls_url":"https://api.github.com/repos/vinayinvicible/cfblog/pulls{/number}","milestones_url":"https://api.github.com/repos/vinayinvicible/cfblog/milestones{/number}","notifications_url":"https://api.github.com/repos/vinayinvicible/cfblog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinayinvicible/cfblog/labels{/name}","releases_url":"https://api.github.com/repos/vinayinvicible/cfblog/releases{/id}","created_at":"2015-09-28T09:30:46Z","updated_at":"2015-09-28T08:18:19Z","pushed_at":"2015-10-05T14:25:11Z","git_url":"git://github.com/vinayinvicible/cfblog.git","ssh_url":"git@github.com:vinayinvicible/cfblog.git","clone_url":"https://github.com/vinayinvicible/cfblog.git","svn_url":"https://github.com/vinayinvicible/cfblog","homepage":null,"size":154,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Coverfox:master","ref":"master","sha":"8b6537c814c35f8609a31a3d3f41e22775d3caca","user":{"login":"Coverfox","id":13747240,"avatar_url":"https://avatars.githubusercontent.com/u/13747240?v=3","gravatar_id":"","url":"https://api.github.com/users/Coverfox","html_url":"https://github.com/Coverfox","followers_url":"https://api.github.com/users/Coverfox/followers","following_url":"https://api.github.com/users/Coverfox/following{/other_user}","gists_url":"https://api.github.com/users/Coverfox/gists{/gist_id}","starred_url":"https://api.github.com/users/Coverfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coverfox/subscriptions","organizations_url":"https://api.github.com/users/Coverfox/orgs","repos_url":"https://api.github.com/users/Coverfox/repos","events_url":"https://api.github.com/users/Coverfox/events{/privacy}","received_events_url":"https://api.github.com/users/Coverfox/received_events","type":"Organization","site_admin":false},"repo":{"id":43288554,"name":"cfblog","full_name":"Coverfox/cfblog","owner":{"login":"Coverfox","id":13747240,"avatar_url":"https://avatars.githubusercontent.com/u/13747240?v=3","gravatar_id":"","url":"https://api.github.com/users/Coverfox","html_url":"https://github.com/Coverfox","followers_url":"https://api.github.com/users/Coverfox/followers","following_url":"https://api.github.com/users/Coverfox/following{/other_user}","gists_url":"https://api.github.com/users/Coverfox/gists{/gist_id}","starred_url":"https://api.github.com/users/Coverfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coverfox/subscriptions","organizations_url":"https://api.github.com/users/Coverfox/orgs","repos_url":"https://api.github.com/users/Coverfox/repos","events_url":"https://api.github.com/users/Coverfox/events{/privacy}","received_events_url":"https://api.github.com/users/Coverfox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Coverfox/cfblog","description":"Coverfox Blog","fork":false,"url":"https://api.github.com/repos/Coverfox/cfblog","forks_url":"https://api.github.com/repos/Coverfox/cfblog/forks","keys_url":"https://api.github.com/repos/Coverfox/cfblog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Coverfox/cfblog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Coverfox/cfblog/teams","hooks_url":"https://api.github.com/repos/Coverfox/cfblog/hooks","issue_events_url":"https://api.github.com/repos/Coverfox/cfblog/issues/events{/number}","events_url":"https://api.github.com/repos/Coverfox/cfblog/events","assignees_url":"https://api.github.com/repos/Coverfox/cfblog/assignees{/user}","branches_url":"https://api.github.com/repos/Coverfox/cfblog/branches{/branch}","tags_url":"https://api.github.com/repos/Coverfox/cfblog/tags","blobs_url":"https://api.github.com/repos/Coverfox/cfblog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Coverfox/cfblog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Coverfox/cfblog/git/refs{/sha}","trees_url":"https://api.github.com/repos/Coverfox/cfblog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Coverfox/cfblog/statuses/{sha}","languages_url":"https://api.github.com/repos/Coverfox/cfblog/languages","stargazers_url":"https://api.github.com/repos/Coverfox/cfblog/stargazers","contributors_url":"https://api.github.com/repos/Coverfox/cfblog/contributors","subscribers_url":"https://api.github.com/repos/Coverfox/cfblog/subscribers","subscription_url":"https://api.github.com/repos/Coverfox/cfblog/subscription","commits_url":"https://api.github.com/repos/Coverfox/cfblog/commits{/sha}","git_commits_url":"https://api.github.com/repos/Coverfox/cfblog/git/commits{/sha}","comments_url":"https://api.github.com/repos/Coverfox/cfblog/comments{/number}","issue_comment_url":"https://api.github.com/repos/Coverfox/cfblog/issues/comments{/number}","contents_url":"https://api.github.com/repos/Coverfox/cfblog/contents/{+path}","compare_url":"https://api.github.com/repos/Coverfox/cfblog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Coverfox/cfblog/merges","archive_url":"https://api.github.com/repos/Coverfox/cfblog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Coverfox/cfblog/downloads","issues_url":"https://api.github.com/repos/Coverfox/cfblog/issues{/number}","pulls_url":"https://api.github.com/repos/Coverfox/cfblog/pulls{/number}","milestones_url":"https://api.github.com/repos/Coverfox/cfblog/milestones{/number}","notifications_url":"https://api.github.com/repos/Coverfox/cfblog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Coverfox/cfblog/labels{/name}","releases_url":"https://api.github.com/repos/Coverfox/cfblog/releases{/id}","created_at":"2015-09-28T08:18:19Z","updated_at":"2015-09-28T08:18:19Z","pushed_at":"2015-10-07T06:43:18Z","git_url":"git://github.com/Coverfox/cfblog.git","ssh_url":"git@github.com:Coverfox/cfblog.git","clone_url":"https://github.com/Coverfox/cfblog.git","svn_url":"https://github.com/Coverfox/cfblog","homepage":null,"size":84,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Coverfox/cfblog/pulls/1"},"html":{"href":"https://github.com/Coverfox/cfblog/pull/1"},"issue":{"href":"https://api.github.com/repos/Coverfox/cfblog/issues/1"},"comments":{"href":"https://api.github.com/repos/Coverfox/cfblog/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Coverfox/cfblog/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Coverfox/cfblog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Coverfox/cfblog/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Coverfox/cfblog/statuses/4d4d4e2030b33c81955d8954f8082ccb083da33b"}}}}