Attempts to determine the URL a directory would be web-accessible at.
If ``url`` is specified, automatically use it. Returns a generator whic
produces a list of candidate urls.
+
+ This function implements a plugin interface named :ref:`wizard.deploy.web`.
"""
if url:
yield url
return
- for f in pkg_resources.iter_entry_points("deploy.web"):
+ for entry in pkg_resources.iter_entry_points("wizard.deploy.web"):
+ f = entry.load()
for r in f(dir):
if isinstance(r, str):
r = urlparse.urlparse(r)
def dsn(self):
"""The :class:`sqlalchemy.engine.url.URL` for this deployment."""
if not self._dsn:
- self._dsn = sql.fill_url(self.application.dsn(self))
+ self._dsn = sql.auth(self.application.dsn(self))
return self._dsn
@property
def url(self):
return self._url
except StopIteration:
raise UnknownWebPath
- def enableOldStyleUrls(self):
- """
- Switches to using http://user.scripts.mit.edu/~user/app URLs.
- No effect if they have an explicit .scripts/url override.
- """
- # XXX: This is pretty scripts specific
- self._url = scripts.fill_url(self.location, self.application.url(self), old_style = True)
@staticmethod
def parse(line):
"""