Skip to content

Commit

Permalink
removed debugging print stmts
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmeow committed Dec 21, 2024
1 parent 6383de6 commit a6adf30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 37 deletions.
4 changes: 1 addition & 3 deletions fasthtml/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,7 @@ def __getattr__(self, name):

def to_app(self, app):
"Add routes to `app`"
for args in self.routes:
print(args)
app._add_route(*args)
for args in self.routes: app._add_route(*args)
for args in self.wss: app._add_ws(*args)

def ws(self, path:str, conn=None, disconn=None, name=None, middleware=None):
Expand Down
40 changes: 6 additions & 34 deletions nbs/api/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2423,13 +2423,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Set to 2024-12-20 19:13:21.676722\n"
"Set to 2024-12-20 19:21:33.748637\n"
]
},
{
"data": {
"text/plain": [
"'Session time: 2024-12-20 19:13:21.676722'"
"'Session time: 2024-12-20 19:21:33.748637'"
]
},
"execution_count": null,
Expand Down Expand Up @@ -2665,9 +2665,7 @@
"\n",
" def to_app(self, app):\n",
" \"Add routes to `app`\"\n",
" for args in self.routes: \n",
" print(args)\n",
" app._add_route(*args)\n",
" for args in self.routes: app._add_route(*args)\n",
" for args in self.wss: app._add_ws(*args)\n",
" \n",
" def ws(self, path:str, conn=None, disconn=None, name=None, middleware=None):\n",
Expand Down Expand Up @@ -2715,20 +2713,7 @@
"execution_count": null,
"id": "cd413b0d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(<function get>, '/hi', None, None, True, <function noop_body>)\n",
"(<function post>, '/hi', None, None, True, <function noop_body>)\n",
"(<function ho>, '/ho', None, None, True, <function noop_body>)\n",
"(<function show_host>, '/hostie', None, None, True, <function noop_body>)\n",
"(<function yoyo>, '/yoyo', None, None, True, <function noop_body>)\n",
"(<function index>, '/', None, None, True, <function noop_body>)\n"
]
}
],
"outputs": [],
"source": [
"app,cli,_ = get_cli(FastHTML())\n",
"ar.to_app(app)"
Expand Down Expand Up @@ -2820,20 +2805,7 @@
"execution_count": null,
"id": "77ce8548",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(<function get>, '/products/hi', None, None, True, <function noop_body>)\n",
"(<function post>, '/products/hi', None, None, True, <function noop_body>)\n",
"(<function ho>, '/products/ho', None, None, True, <function noop_body>)\n",
"(<function show_host>, '/products/hostie', None, None, True, <function noop_body>)\n",
"(<function yoyo>, '/products/yoyo', None, None, True, <function noop_body>)\n",
"(<function index>, '/products/', None, None, True, <function noop_body>)\n"
]
}
],
"outputs": [],
"source": [
"app,cli,_ = get_cli(FastHTML())\n",
"ar2.to_app(app)"
Expand Down Expand Up @@ -2978,7 +2950,7 @@
{
"data": {
"text/plain": [
"'Cookie was set at time 19:13:22.543473'"
"'Cookie was set at time 19:21:34.644743'"
]
},
"execution_count": null,
Expand Down

0 comments on commit a6adf30

Please sign in to comment.