w10schools
Login Register
  • Home
  • Tutorials
    • HTML, CSS
      • HTML, HTML5
      • CSS, CSS3
    • XML
    • JavaScript, AJAX
    • PHP
    • Ruby on Rails
      • Ruby
      • Rails
    • ASP.NET
      • ASP
      • C# .NET
    • Java
      • JSP
    • Databases
      • MySQL
      • MSSQL Server
      • Oracle
    • Web Server
      • Windows
      • Linux
      • Apache
      • IIS
    • Design
      • Dreamweaver
      • Flash
      • Photoshop
      • Fireworks
      • CorelDRAW
      • Illustrator
  • References
    • HTML
      • Bootstrap
    • CSS
      • CSS Selectors
      • Sass
    • JavaScript
    • Mobile Apps
      • Cordova
    • Ruby on Rails
      • Ruby
      • Rails
    • PHP
      • Function
      • Language
      • CodeIgniter
      • Phalcon
      • PHPUnit
      • Symfony
      • Drupal
      • Yii
      • Laravel
    • Perl
      • Perl
    • Python
      • Python
      • Django
      • NumPy
      • Pandas
      • scikit-image
      • scikit-learn
      • Statsmodels
      • Matplotlib
    • Lua
      • Lua
    • C, C++
      • C
      • C++
    • Server
      • Docker
      • Apache HTTP Server
      • Nginx
    • Database
      • PostgreSQL
    • Big Data
      • TensorFlow
    • Game Development
      • Phaser
      • LÖVE
  • Articles
    • News
    • General
      • Website Promotion
      • Online Advertising
      • Make Money Online
    • Editorials
    • Interviews
    • Web Roundups
  • Resources
    • Design
      • Fonts
      • Graphics
      • Vectors
      • Templates
      • UI (User Interface)
      • Brushes
      • Patterns, Backgrounds
      • Textures
    • Web Development
      • HTML, CSS
      • XML
      • JavaScript, AJAX
      • Ruby on Rails
      • PHP
      • Java
      • .NET
      • Python
      • Perl
      • Flash
    • Mobile Application Development
      • Mobile Development Tools
      • Swift
    • Online Services
      • Online Storage
      • Web Hosting
  • Tools
    • Generators
Edit
In Place Editing Advanced Editing
  • References
  • Python
  • Django
  • API
  • Models
  • QuerySet API reference

db.models.query.QuerySet.earliest()

earliest(field_name=None)

Works otherwise like latest() except the direction is changed.

Links:
  • https://docs.djangoproject.com/en/1.10/ref/models/querysets/#django.db.models.query.QuerySet.earliest
doc_Django
doc_Django
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.

Popular Articles
db.models.query.QuerySet class QuerySet(model=None, query=None, using=None) [source] Usually when you’ll interact with a QuerySet you’ll use it by chaining filters. To mak
db.models.query.QuerySet.db db The database that will be used if this query is executed now. Note The query parameter to QuerySet exists so that specialized query subclasses
db.models.query.QuerySet.none() none() Calling none() will create a queryset that never returns any objects and no query will be executed when accessing the results. A qs.none()
db.models.query.QuerySet.only() only(*fields) The only() method is more or less the opposite of defer(). You call it with the fields that should not be deferred when retrieving a
db.models.query.QuerySet.exists() exists() Returns True if the QuerySet contains any results, and False if not. This tries to perform the query in the simplest and fastest way poss


Return to View
  • Facebook
  • Tweet
  • Digg it
  • Stumbleupon
  • Delicious
  • Plus Share

Designed by : w10schools

service@w10schools.com

Our Partners: aeeble – Providing content publishing and search solutions