当前位置: 首页>>代码示例>>Python>>正文


Python List.select方法代码示例

本文整理汇总了Python中models.List.select方法的典型用法代码示例。如果您正苦于以下问题:Python List.select方法的具体用法?Python List.select怎么用?Python List.select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在models.List的用法示例。


在下文中一共展示了List.select方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: index

# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import select [as 别名]
def index(password):
    print >> sys.stderr, "within index"
    try:
        if password == PASSWORD:
            print >> sys.stderr, "within try"
            sellerList = Seller.select()
            smsList = SMS.select()
            numberList = Number.select()
            l = List.select()
            marketList = Market.select()
            lrList = ListRelationship.select()
            outboxList = Outbox.select()
            return render_template("index.html", title = 'TABLES', sellerList = sellerList, smsList = smsList, l = l, marketList = marketList)
            #return 'hello world'
        else:
            print >> sys.stderr, "wrong password"
    except:
        print >> sys.stderr, "within except"
        print >> sys.stderr, str(sys.exc_info()[0]) # These write the nature of the error
        print >> sys.stderr, str(sys.exc_info()[1])
        statement = 'An exception has Occured'+ str(sys.exc_type) + '[' + str(sys.exc_value) + ']'
        return statement
开发者ID:elizabethmgin,项目名称:bugolobi_GIT,代码行数:24,代码来源:views.py

示例2: get_Mini_Sellers_ListNames

# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import select [as 别名]
def get_Mini_Sellers_ListNames(seller):
    sellersListNames = []
    for l in List.select().where(List.seller == seller):
        sellersListNames.append(l.name)
    return sellersListNames
开发者ID:elizabethmgin,项目名称:bugolobi_GIT,代码行数:7,代码来源:views.py

示例3: check_List_Exists

# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import select [as 别名]
def check_List_Exists(listName):
    for l in List.select():
        if listName == List.name:
            print 'this list exists!'
            return True
开发者ID:elizabethmgin,项目名称:bugolobi_GIT,代码行数:7,代码来源:views.py

示例4: check_Mini_Sellers_ListName_Exists

# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import select [as 别名]
def check_Mini_Sellers_ListName_Exists(seller, name):
    for l in List.select():
        if l.seller == seller and l.name == name:
            print 'seller already created this list!'
            return True
开发者ID:elizabethmgin,项目名称:bugolobi_GIT,代码行数:7,代码来源:views.py

示例5: Task

# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import select [as 别名]
import datetime

from models import Board, List, Task

highest_order = Task.select().where(Task.belongs_to_list == 1).order_by(Task.task_order.desc()).get()

new_task = Task(
    belongs_to_list=List.select().where(List.name == "Important List"),
    task_name="Learn Rails",
    task_description="I am trying to learn rails so I can build complex apps in the future and also my own api someday.",
    task_order=(highest_order.task_order + 1),
)
new_task.save()
开发者ID:SilverDevil,项目名称:To-Do-List,代码行数:15,代码来源:populate.py


注:本文中的models.List.select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。