mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Removed unneeded __init__() methods.
This commit is contained in:
committed by
Tim Graham
parent
44a6c27fd4
commit
8b2515a450
@@ -52,6 +52,10 @@ class AbstractBaseUser(models.Model):
|
||||
|
||||
REQUIRED_FIELDS = []
|
||||
|
||||
# Stores the raw password if set_password() is called so that it can
|
||||
# be passed to password_changed() after the model is saved.
|
||||
_password = None
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
@@ -59,12 +63,6 @@ class AbstractBaseUser(models.Model):
|
||||
"Return the identifying username for this User"
|
||||
return getattr(self, self.USERNAME_FIELD)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
# Stores the raw password if set_password() is called so that it can
|
||||
# be passed to password_changed() after the model is saved.
|
||||
self._password = None
|
||||
|
||||
def __str__(self):
|
||||
return self.get_username()
|
||||
|
||||
|
||||
@@ -374,9 +374,6 @@ class AnonymousUser:
|
||||
_groups = EmptyManager(Group)
|
||||
_user_permissions = EmptyManager(Permission)
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def __str__(self):
|
||||
return 'AnonymousUser'
|
||||
|
||||
|
||||
@@ -103,6 +103,14 @@ class PostGISOperations(BaseSpatialOperations, DatabaseOperations):
|
||||
|
||||
Adapter = PostGISAdapter
|
||||
|
||||
collect = geom_func_prefix + 'Collect'
|
||||
extent = geom_func_prefix + 'Extent'
|
||||
extent3d = geom_func_prefix + '3DExtent'
|
||||
length3d = geom_func_prefix + '3DLength'
|
||||
makeline = geom_func_prefix + 'MakeLine'
|
||||
perimeter3d = geom_func_prefix + '3DPerimeter'
|
||||
unionagg = geom_func_prefix + 'Union'
|
||||
|
||||
gis_operators = {
|
||||
'bbcontains': PostGISOperator(op='~', raster=True),
|
||||
'bboverlaps': PostGISOperator(op='&&', geography=True, raster=True),
|
||||
@@ -137,19 +145,6 @@ class PostGISOperations(BaseSpatialOperations, DatabaseOperations):
|
||||
select = '%s::bytea'
|
||||
select_extent = None
|
||||
|
||||
def __init__(self, connection):
|
||||
super().__init__(connection)
|
||||
|
||||
prefix = self.geom_func_prefix
|
||||
|
||||
self.collect = prefix + 'Collect'
|
||||
self.extent = prefix + 'Extent'
|
||||
self.extent3d = prefix + '3DExtent'
|
||||
self.length3d = prefix + '3DLength'
|
||||
self.makeline = prefix + 'MakeLine'
|
||||
self.perimeter3d = prefix + '3DPerimeter'
|
||||
self.unionagg = prefix + 'Union'
|
||||
|
||||
@cached_property
|
||||
def function_names(self):
|
||||
function_names = {
|
||||
|
||||
Reference in New Issue
Block a user