本文整理汇总了Python中Base.processurl方法的典型用法代码示例。如果您正苦于以下问题:Python Base.processurl方法的具体用法?Python Base.processurl怎么用?Python Base.processurl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base.processurl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: post
# 需要导入模块: import Base [as 别名]
# 或者: from Base import processurl [as 别名]
def post(self):
title = fromq(self.q("blogtitle"))
subtitle = fromq(self.q("blogsubtitle"))
charset = fromq(self.q("charset"))
headlink = fromq(self.q("headlink").replace("\r", "").split("\n"))
hub = fromq(self.q("hub").replace("\r", "").split("\n"))
footer = fromq(self.q("footer"))
posturl = fromq(self.q("posturl"))
commentstatus = fromq(self.q("commentstatus"))
commentneedcheck = fromq(self.q("commentneedcheck")) == "True"
localtimezone = int(self.q("localtimezone")) if self.q("localtimezone").isdigit() else 8
author = fromq(self.q("author"))
feed = fromq(self.q("feed"))
feednumber = int(self.q("feednumber")) if self.q("feednumber").isdigit() else 20
feedshowpre = fromq(self.q("feedshowpre")) == "True"
indexnumber = int(self.q("indexnumber")) if self.q("indexnumber").isdigit() else 20
indexshowpre = fromq(self.q("indexshowpre")) == "True"
domain = self.q("domain")
Config.title = title
Config.subtitle = subtitle
Config.charset = charset
Config.headlink = headlink
Config.footer = footer
Config.localtimezone = localtimezone
if Config.posturl != posturl:
Config.posturl = posturl
i = 0;
posts = Model.Post.all().fetch(1000)
postslen = len(posts)
while postslen > 0:
for p in posts:
p.realurl = Base.processurl(p)
p.put()
i += postslen
posts = Model.Post.all().fetch(1000, offset=i)
Config.commentstatus = commentstatus
Config.commentneedcheck = commentneedcheck
Config.author = author
Config.feed = feed
Config.feednumber = feednumber
Config.feedshowpre = feedshowpre
Config.indexnumber = indexnumber
Config.indexshowpre = indexshowpre
Config.hub = hub
Config.domain = domain
self.redirect_self()