This file contains 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
A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration. |
This file contains 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
Request URL:ws://localhost:40006/notebook/api/kernels/edca6a48-f31c-4317-bf36-d28dca6daf8b/channels?session_id=FFED1D8CD3B14AE68F92FFDD174C419B | |
Request Method:GET | |
Status Code:403 Forbidden | |
Response Headers | |
view source | |
Content-Length:4617 | |
Content-Type:text/html | |
Date:Mon, 19 Dec 2016 01:38:17 GMT | |
Server:TornadoServer/4.4.2 |
This file contains 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
from websauna.system.http import Request | |
from websauna.utils.slug import slug_to_uuid | |
from websauna.system.core.route import simple_route | |
from pyramid.request import Response | |
from pyramid.httpexceptions import HTTPNotFound | |
from . import models | |
@simple_route("/questions/{question_uuid}", route_name="detail", renderer="myapp/detail.html") | |
def detail(request): | |
# Convert base64 encoded UUID string from request path to Python UUID object |
This file contains 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
from pyramid.httpexceptions import HTTPNotFound, HTTPFound | |
from websauna.utils.slug import uuid_to_slug | |
from websauna.utils.slug import slug_to_uuid | |
from websauna.system.core import messages | |
from websauna.system.http import Request | |
from websauna.system.core.route import simple_route | |
from .models import Media | |
import pafy | |
import transaction |
This file contains 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
from pyramid.httpexceptions import HTTPNotFound, HTTPFound | |
from websauna.utils.slug import uuid_to_slug | |
from websauna.utils.slug import slug_to_uuid | |
from websauna.system.core import messages | |
from websauna.system.http import Request | |
from websauna.system.core.route import simple_route | |
from email.header import Header | |
from email.utils import formataddr | |
from websauna.system.mail import send_templated_mail | |
from .models import Media |
This file contains 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
# pserve and command line configuration for a local development machine | |
[includes] | |
include_ini_files = | |
resource://websauna/conf/development.ini | |
resource://hearit/conf/base.ini | |
resource://websauna/conf/base.ini | |
[app:main] | |
websauna.site_id = hearit_dev |
This file contains 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
from pyramid.httpexceptions import HTTPNotFound, HTTPFound | |
from websauna.utils.slug import uuid_to_slug | |
from websauna.utils.slug import slug_to_uuid | |
from websauna.system.core import messages | |
from websauna.system.http import Request | |
from websauna.system.core.route import simple_route | |
from email.header import Header | |
from email.utils import formataddr | |
from websauna.system.mail import send_templated_mail | |
from .models import Media |
This file contains 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
"""Place your SQLAlchemy models in this file.""" | |
import datetime | |
from uuid import uuid4 | |
from sqlalchemy import Column, Unicode, String, Integer, ForeignKey, UnicodeText | |
from sqlalchemy.dialects.postgresql import UUID | |
from sqlalchemy.orm import relationship | |
from websauna.system.model.meta import Base |
This file contains 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
""" | |
allows users to sign up and login with their phone number, if that number is assoicated with an | |
existing customer record. | |
""" | |
import logging | |
import colander | |
from cornice.service import Service | |
from pyramid.exceptions import HTTPBadRequest | |
from pyramid_sms.utils import normalize_us_phone_number |
This file contains 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
from websauna.system.http import Request | |
from websauna.system.core.route import simple_route | |
from cornice.service import Service | |
# Configure view named home at path / using a template xact/home.html | |
@simple_route("/", route_name="home", renderer='xact/home.html') | |
def home(request: Request): | |
"""Render site homepage.""" | |
return {"project": "xact"} |