1111
1212from platformdirs import PlatformDirs
1313
14- from .utils import classproperty
15-
1614IS_WINDOWS = platform .system () == "Windows"
1715IS_MACOS = platform .system () == "Darwin"
1816IS_LINUX = platform .system () == "Linux"
@@ -119,9 +117,6 @@ class ReflexHostingCLI(SimpleNamespace):
119117class Templates (SimpleNamespace ):
120118 """Constants related to Templates."""
121119
122- # The route on Reflex backend to query which templates are available and their URLs.
123- APP_TEMPLATES_ROUTE = "/app-templates"
124-
125120 # The default template
126121 DEFAULT = "blank"
127122
@@ -132,58 +127,12 @@ class Templates(SimpleNamespace):
132127 CHOOSE_TEMPLATES = "choose-templates"
133128
134129 # The URL to find reflex templates.
135- REFLEX_TEMPLATES_URL = "https://reflex.dev/templates"
136-
137- # Demo url for the default template.
138- DEFAULT_TEMPLATE_URL = "https://blank-template.reflex.run"
130+ REFLEX_TEMPLATES_URL = (
131+ "https://reflex.dev/docs/getting-started/open-source-templates/"
132+ )
139133
140134 # The reflex.build frontend host
141- REFLEX_BUILD_FRONTEND = "https://reflex.build"
142-
143- # The reflex.build backend host
144- REFLEX_BUILD_BACKEND = "https://flexgen-prod-flexgen.fly.dev"
145-
146- @classproperty
147- @classmethod
148- def REFLEX_BUILD_URL (cls ):
149- """The URL to redirect to reflex.build.
150-
151- Returns:
152- The URL to redirect to reflex.build.
153- """
154- from reflex .environment import environment
155-
156- return (
157- environment .REFLEX_BUILD_FRONTEND .get ()
158- + "/gen?reflex_init_token={reflex_init_token}"
159- )
160-
161- @classproperty
162- @classmethod
163- def REFLEX_BUILD_POLL_URL (cls ):
164- """The URL to poll waiting for the user to select a generation.
165-
166- Returns:
167- The URL to poll waiting for the user to select a generation.
168- """
169- from reflex .environment import environment
170-
171- return environment .REFLEX_BUILD_BACKEND .get () + "/api/init/{reflex_init_token}"
172-
173- @classproperty
174- @classmethod
175- def REFLEX_BUILD_CODE_URL (cls ):
176- """The URL to fetch the generation's reflex code.
177-
178- Returns:
179- The URL to fetch the generation's reflex code.
180- """
181- from reflex .environment import environment
182-
183- return (
184- environment .REFLEX_BUILD_BACKEND .get ()
185- + "/api/gen/{generation_hash}/refactored"
186- )
135+ REFLEX_BUILD_FRONTEND = "https://build.reflex.dev"
187136
188137 class Dirs (SimpleNamespace ):
189138 """Folders used by the template system of Reflex."""
@@ -204,9 +153,6 @@ class Javascript(SimpleNamespace):
204153 # The node modules directory.
205154 NODE_MODULES = "node_modules"
206155
207- # The package lock file.
208- PACKAGE_LOCK = "package-lock.json"
209-
210156
211157class ReactRouter (Javascript ):
212158 """Constants related to React Router."""
0 commit comments