mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #23919 -- Stopped inheriting from object to define new style classes.
Tests and docs complement to cecc079168
.
This commit is contained in:
parent
fba0eaa5d6
commit
081e787160
18 changed files with 24 additions and 24 deletions
|
@ -36,7 +36,7 @@ You only need to know that 52 cards are dealt out equally to four players, who
|
|||
are traditionally called *north*, *east*, *south* and *west*. Our class looks
|
||||
something like this::
|
||||
|
||||
class Hand(object):
|
||||
class Hand:
|
||||
"""A hand of cards (bridge style)"""
|
||||
|
||||
def __init__(self, north, east, south, west):
|
||||
|
|
|
@ -71,7 +71,7 @@ the assembly and transmission of a large CSV file::
|
|||
|
||||
from django.http import StreamingHttpResponse
|
||||
|
||||
class Echo(object):
|
||||
class Echo:
|
||||
"""An object that implements just the write method of the file-like
|
||||
interface.
|
||||
"""
|
||||
|
|
|
@ -42,7 +42,7 @@ method of database routers as ``**hints``:
|
|||
.. snippet::
|
||||
:filename: myapp/dbrouters.py
|
||||
|
||||
class MyRouter(object):
|
||||
class MyRouter:
|
||||
|
||||
def allow_migrate(self, db, app_label, model_name=None, **hints):
|
||||
if 'target_db' in hints:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue