示例#1
0
	def set_url(self, url):
		if is_lazy_url(url, ignore=True):
			self.url = url
		elif is_str(url, ignore=True):
			self.url = LazyUrl(url)
		else:
			raise TypeError('Cannot set the url with %r. Use a LazyUrl or a str' % type(url))
示例#2
0
	def set_url(self, url):
		if is_lazy_url(url, ignore=True):
			self.url = url
		elif is_str(url):
			self.url = LazyUrl(url)