reorder page evaluation
This commit is contained in:
parent
1053a316fc
commit
955907a095
@ -9,6 +9,7 @@ import dataclasses
|
|||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
import io
|
import io
|
||||||
|
import dill
|
||||||
import multiprocess
|
import multiprocess
|
||||||
from pathos import multiprocessing, pools
|
from pathos import multiprocessing, pools
|
||||||
import os
|
import os
|
||||||
@ -50,6 +51,7 @@ from reflex.compiler import compiler
|
|||||||
from reflex.compiler import utils as compiler_utils
|
from reflex.compiler import utils as compiler_utils
|
||||||
from reflex.compiler.compiler import (
|
from reflex.compiler.compiler import (
|
||||||
ExecutorSafeFunctions,
|
ExecutorSafeFunctions,
|
||||||
|
compile_uncompiled_page_helper,
|
||||||
)
|
)
|
||||||
from reflex.components.base.app_wrap import AppWrap
|
from reflex.components.base.app_wrap import AppWrap
|
||||||
from reflex.components.base.error_boundary import ErrorBoundary
|
from reflex.components.base.error_boundary import ErrorBoundary
|
||||||
@ -554,56 +556,6 @@ class App(MiddlewareMixin, LifespanMixin, Base):
|
|||||||
meta=meta,
|
meta=meta,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _compile_page(self, route: str):
|
|
||||||
"""Compile a page.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
route: The route of the page to compile.
|
|
||||||
"""
|
|
||||||
uncompiled_page = self.uncompiled_pages[route]
|
|
||||||
|
|
||||||
on_load = uncompiled_page.on_load
|
|
||||||
|
|
||||||
if on_load:
|
|
||||||
self.load_events[route] = (
|
|
||||||
on_load if isinstance(on_load, list) else [on_load]
|
|
||||||
)
|
|
||||||
|
|
||||||
self.uncompiled_pages[route] = UncompiledPage(
|
|
||||||
component=component,
|
|
||||||
route=route,
|
|
||||||
title=title or constants.DefaultPage.TITLE,
|
|
||||||
description=description or constants.DefaultPage.DESCRIPTION,
|
|
||||||
image=image,
|
|
||||||
on_load=on_load,
|
|
||||||
meta=meta,
|
|
||||||
)
|
|
||||||
|
|
||||||
def _compile_page(self, route: str):
|
|
||||||
"""Compile a page.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
route: The route of the page to compile.
|
|
||||||
"""
|
|
||||||
uncompiled_page = self.uncompiled_pages[route]
|
|
||||||
|
|
||||||
on_load = uncompiled_page.on_load
|
|
||||||
|
|
||||||
if on_load:
|
|
||||||
self.load_events[route] = (
|
|
||||||
on_load if isinstance(on_load, list) else [on_load]
|
|
||||||
)
|
|
||||||
|
|
||||||
self.uncompiled_pages[route] = UncompiledPage(
|
|
||||||
component=component,
|
|
||||||
route=route,
|
|
||||||
title=title,
|
|
||||||
description=description,
|
|
||||||
image=image,
|
|
||||||
on_load=on_load,
|
|
||||||
meta=meta,
|
|
||||||
)
|
|
||||||
|
|
||||||
def _compile_page(self, route: str):
|
def _compile_page(self, route: str):
|
||||||
"""Compile a page.
|
"""Compile a page.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user