peewee Documentation
Release 2.0.2e’) # 2.0 Tweet.select().join(User).where(User.username == ’charlie’) Get me a list of tweets ordered by the authors username, then newest to oldest: # 1.0 -- this is one where there are like 10 ways aggregate functions like count and max • columns, which may be selected, joined on, grouped by, ordered by, used as parameters for functions and aggregates, etc. • python objects to use as query parameters things like: Employee.select().where(Employee.salary < (Employee.tenure * 1000) + 40000) Note: I totally went crazy with operator overloading. If you’re interested in looking, the QueryCompiler.parse_expr0 码力 | 65 页 | 315.33 KB | 1 年前3
peewee Documentation Release 2.10.2have noticed in the above model code that there is a class defined on the base model named Meta that sets the database attribute. Peewee allows every model to specify which database it uses. There are many iterate without caching each model returned, using much less memory when iterating over large result sets. # Let's assume we've got 10 million stat objects to dump to a csv file. stats = Stat.select() # presented below. term (str) – Search term to use. weights – A list of weights for the columns, ordered with respect to the column’s position in the table. Or, a dictionary keyed by the field or field0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2have noticed in the above model code that there is a class defined on the base model named Meta that sets the database attribute. Peewee allows every model to specify which database it uses. There are many iterate without caching each model returned, using much less memory when iterating over large result sets. # Let's assume we've got 10 million stat objects to dump to a csv file. stats = Stat.select() # Parameters • term (str) – Search term to use. • weights – A list of weights for the columns, ordered with respect to the column’s po- sition in the table. Or, a dictionary keyed by the field or field0 码力 | 221 页 | 844.06 KB | 1 年前3
Django 2.2.x Documentationcommand: $ python manage.py shell We’re using this instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your However, in bigger projects – especially those comprised of multiple apps – dealing with the multiple sets of static files provided by each application starts to get tricky. That’s what django.contrib.staticfiles one adjustment to the Meta class of an abstract base class: before installing the Meta attribute, it sets abstract=False. This means that children of abstract base classes don’t automatically become abstract0 码力 | 2915 页 | 2.83 MB | 1 年前3
Django 1.8.x Documentationcommand: $ python manage.py shell We’re using this instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your However, in bigger projects – especially those comprised of multiple apps – dealing with the multiple sets of static files provided by each application starts to get tricky. That’s what django.contrib.staticfiles one adjustment to the Meta class of an abstract base class: before installing the Meta attribute, it sets abstract=False. This means that children of abstract base classes don’t automatically become abstract0 码力 | 1685 页 | 6.01 MB | 1 年前3
Django 1.8.x Documentationcommand: $ python manage.py shell We’re using this instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your However, in bigger projects – especially those comprised of multiple apps – dealing with the multiple sets of static files provided by each application starts to get tricky. That’s what django.contrib.staticfiles one adjustment to the Meta class of an abstract base class: before installing the Meta attribute, it sets abstract=False. This means that children of abstract base classes don’t automatically become abstract0 码力 | 2454 页 | 2.85 MB | 1 年前3
Django 2.1.x Documentationcommand: $ python manage.py shell We’re using this instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your However, in bigger projects – especially those comprised of multiple apps – dealing with the multiple sets of static files provided by each application starts to get tricky. That’s what django.contrib.staticfiles one adjustment to the Meta class of an abstract base class: before installing the Meta attribute, it sets abstract=False. This means that children of abstract base classes don’t automatically become abstract0 码力 | 1910 页 | 6.49 MB | 1 年前3
Django 2.1.x Documentationcommand: $ python manage.py shell We’re using this instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your However, in bigger projects – especially those comprised of multiple apps – dealing with the multiple sets of static files provided by each application starts to get tricky. That’s what django.contrib.staticfiles one adjustment to the Meta class of an abstract base class: before installing the Meta attribute, it sets abstract=False. This means that children of abstract base classes don’t automatically become abstract0 码力 | 2790 页 | 2.71 MB | 1 年前3
Django 2.0.x Documentationcommand: $ python manage.py shell We’re using this instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your However, in bigger projects – especially those comprised of multiple apps – dealing with the multiple sets of static files provided by each application starts to get tricky. That’s what django.contrib.staticfiles one adjustment to the Meta class of an abstract base class: before installing the Meta attribute, it sets abstract=False. This means that children of abstract base classes don’t automatically become abstract0 码力 | 1880 页 | 6.41 MB | 1 年前3
Django 2.0.x Documentationcommand: $ python manage.py shell We’re using this instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your However, in bigger projects – especially those comprised of multiple apps – dealing with the multiple sets of static files provided by each application starts to get tricky. That’s what django.contrib.staticfiles one adjustment to the Meta class of an abstract base class: before installing the Meta attribute, it sets abstract=False. This means that children of abstract base classes don’t automatically become abstract0 码力 | 2746 页 | 2.67 MB | 1 年前3
共 401 条
- 1
- 2
- 3
- 4
- 5
- 6
- 41













