peewee Documentation Release 0.9.7
into the code Model API (smells like django) Creating tables Model instances Model options Model methods Fields Field types table Self-referential Foreign Keys Implementing Many to Many Field class API entry 1 entry 2 entry 3 entry 4 The entry_set attribute is just another select query and any methods available to SelectQuery are available: >>> for entry in blog.entry_set.order_by(('pub_date', 'desc')): are a few instance methods that encapsulate some user- specific functionality, i.e. following(): who is this user following? followers(): who is following this user? These methods are rather similar0 码力 | 78 页 | 143.68 KB | 1 年前3peewee Documentation Release 0.9.7
. entry 1 entry 2 entry 3 entry 4 The entry_set attribute is just another select query and any methods available to SelectQuery are available: >>> for entry in blog.entry_set.order_by((’pub_date’, ’desc’)): are a few instance methods that encapsulate some user-specific functionality, i.e. • following(): who is this user following? • followers(): who is following this user? These methods are rather similar kwargs[var_name] = qr.paginate(kwargs[’page’]) return render_template(template_name, **kwargs) • Simple authentication system with a login_required decorator. The first function simply adds user data into the current0 码力 | 53 页 | 347.03 KB | 1 年前3peewee Documentation Release 2.0.2
update(count=Counter.count + 1).where( Counter.url == request.url ) Check out the docs for notes on the methods of querying. 3 peewee Documentation, Release 2.0.0 1.1.1 Why? peewee began when I was working is fun look at this picture of my food The tweets attribute is just another select query and any methods available to SelectQuery are available: >>> for tweet in user.tweets.order_by(Tweet.created_date DateTimeField() class Meta: order_by = (’username’,) # it often makes sense to put convenience methods on model instances, for # example, "give me all the users this user is following": def following(self):0 码力 | 65 页 | 315.33 KB | 1 年前3peewee Documentation Release 1.0.0
into the code Model API (smells like django) Creating tables Model instances Model options Model methods Fields Field types table Self-referential Foreign Keys Implementing Many to Many Non-integer Primary (Tweet.pub_date >= today) & (User.active == True) ) Check out the docs for notes on the methods of querying. Why? peewee began when I was working on a small app in flask and found myself writing . entry 1 entry 2 entry 3 entry 4 The entry_set attribute is just another select query and any methods available to SelectQuery are available: >>> for entry in blog.entry_set.order_by(('pub_date', 'desc')):0 码力 | 101 页 | 163.20 KB | 1 年前3peewee Documentation Release 1.0.0
where( (Tweet.pub_date >= today) & (User.active == True) ) Check out the docs for notes on the methods of querying. 1.1.1 Why? peewee began when I was working on a small app in flask and found myself . entry 1 entry 2 entry 3 entry 4 The entry_set attribute is just another select query and any methods available to SelectQuery are available: >>> for entry in blog.entry_set.order_by((’pub_date’, ’desc’)): are a few instance methods that encapsulate some user-specific functionality, i.e. • following(): who is this user following? • followers(): who is following this user? These methods are rather similar0 码力 | 71 页 | 405.29 KB | 1 年前3peewee Documentation Release 2.10.2
data Let’s begin by populating the database with some people. We will use the save() and create() methods to add and update people’s records. >>> from datetime import date >>> uncle_bob = Person(name='Bob' there are a few instance methods that encapsulate some user- specific functionality: following(): who is this user following? followers(): who is following this user? These methods are similar in their implementation kwargs[var_name] = qr.paginate(kwargs['page']) return render_template(template_name, **kwargs) Simple authentication system with a login_required decorator. The first function simply adds user data into the current0 码力 | 275 页 | 276.96 KB | 1 年前3peewee Documentation Release 2.10.2
data Let’s begin by populating the database with some people. We will use the save() and create() methods to add and update people’s records. >>> from datetime import date >>> uncle_bob = Person(name='Bob' are a few instance methods that encapsulate some user-specific functionality: • following(): who is this user following? • followers(): who is following this user? These methods are similar in their kwargs[var_name] = qr.paginate(kwargs['page']) return render_template(template_name, **kwargs) • Simple authentication system with a login_required decorator. The first function simply adds user data into the current0 码力 | 221 页 | 844.06 KB | 1 年前3peewee Documentation Release 3.0.0
data Let’s begin by populating the database with some people. We will use the save() and create() methods to add and update people’s records. from datetime import date uncle_bob = Person(name='Bob', birthday=date(1960 there are a few instance methods that encapsulate some user- specific functionality: following(): who is this user following? followers(): who is following this user? These methods are similar in their implementation kwargs[var_name] = qr.paginate(kwargs['page']) return render_template(template_name, **kwargs) Simple authentication system with a login_required decorator. The first function simply adds user data into the current0 码力 | 319 页 | 361.50 KB | 1 年前3peewee Documentation Release 3.5.0
data Let’s begin by populating the database with some people. We will use the save() and create() methods to add and update people’s records. from datetime import date uncle_bob = Person(name='Bob', birthday=date(1960 there are a few instance methods that encapsulate some user- specific functionality: following(): who is this user following? followers(): who is following this user? These methods are similar in their implementation kwargs[var_name] = qr.paginate(kwargs['page']) return render_template(template_name, **kwargs) Simple authentication system with a login_required decorator. The first function simply adds user data into the current0 码力 | 347 页 | 380.80 KB | 1 年前3peewee Documentation Release 3.5.0
data Let’s begin by populating the database with some people. We will use the save() and create() methods to add and update people’s records. from datetime import date uncle_bob = Person(name='Bob', birthday=date(1960 are a few instance methods that encapsulate some user-specific functionality: • following(): who is this user following? • followers(): who is following this user? These methods are similar in their kwargs[var_name] = qr.paginate(kwargs['page']) return render_template(template_name, **kwargs) • Simple authentication system with a login_required decorator. The first function simply adds user data into the current0 码力 | 282 页 | 1.02 MB | 1 年前3
共 16 条
- 1
- 2