Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
c69e4bc6
Kaydet (Commit)
c69e4bc6
authored
Kas 06, 2017
tarafından
Дилян Палаузов
Kaydeden (comit)
Tim Graham
Kas 07, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #28769 -- Replaced 'x if x else y' with 'x or y'.
üst
00b93c2b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
27 deletions
+20
-27
compress.py
django/contrib/admin/bin/compress.py
+1
-1
base.py
django/contrib/gis/gdal/raster/base.py
+1
-1
file.py
django/contrib/sessions/backends/file.py
+3
-4
wsgi.py
django/core/handlers/wsgi.py
+3
-7
makemessages.py
django/core/management/commands/makemessages.py
+3
-5
introspection.py
django/db/backends/base/introspection.py
+1
-1
creation.py
django/db/backends/sqlite3/creation.py
+1
-3
query.py
django/db/models/sql/query.py
+1
-1
widgets.py
django/forms/widgets.py
+1
-1
dateparse.py
django/utils/dateparse.py
+5
-3
No files found.
django/contrib/admin/bin/compress.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -28,7 +28,7 @@ Compiler library and Java version 6 or later."""
...
@@ -28,7 +28,7 @@ Compiler library and Java version 6 or later."""
parser
.
add_argument
(
"-q"
,
"--quiet"
,
action
=
"store_false"
,
dest
=
"verbose"
)
parser
.
add_argument
(
"-q"
,
"--quiet"
,
action
=
"store_false"
,
dest
=
"verbose"
)
options
=
parser
.
parse_args
()
options
=
parser
.
parse_args
()
compiler
=
Path
(
closure_compiler
if
closure_compiler
else
options
.
compiler
)
.
expanduser
()
compiler
=
Path
(
closure_compiler
or
options
.
compiler
)
.
expanduser
()
if
not
compiler
.
exists
():
if
not
compiler
.
exists
():
sys
.
exit
(
sys
.
exit
(
"Google Closure compiler jar file
%
s not found. Please use the -c "
"Google Closure compiler jar file
%
s not found. Please use the -c "
...
...
django/contrib/gis/gdal/raster/base.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -56,7 +56,7 @@ class GDALRasterBase(GDALBase):
...
@@ -56,7 +56,7 @@ class GDALRasterBase(GDALBase):
counter
+=
1
counter
+=
1
item
=
data
[
counter
]
item
=
data
[
counter
]
# The default domain values are returned if domain is None.
# The default domain values are returned if domain is None.
result
[
domain
if
domain
else
'DEFAULT'
]
=
domain_meta
result
[
domain
or
'DEFAULT'
]
=
domain_meta
return
result
return
result
@metadata.setter
@metadata.setter
...
...
django/contrib/sessions/backends/file.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -73,10 +73,9 @@ class SessionStore(SessionBase):
...
@@ -73,10 +73,9 @@ class SessionStore(SessionBase):
"""
"""
Return the expiry time of the file storing the session's content.
Return the expiry time of the file storing the session's content.
"""
"""
expiry
=
session_data
.
get
(
'_session_expiry'
)
return
session_data
.
get
(
'_session_expiry'
)
or
(
if
not
expiry
:
self
.
_last_modification
()
+
datetime
.
timedelta
(
seconds
=
settings
.
SESSION_COOKIE_AGE
)
expiry
=
self
.
_last_modification
()
+
datetime
.
timedelta
(
seconds
=
settings
.
SESSION_COOKIE_AGE
)
)
return
expiry
def
load
(
self
):
def
load
(
self
):
session_data
=
{}
session_data
=
{}
...
...
django/core/handlers/wsgi.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -66,13 +66,9 @@ class LimitedStream:
...
@@ -66,13 +66,9 @@ class LimitedStream:
class
WSGIRequest
(
HttpRequest
):
class
WSGIRequest
(
HttpRequest
):
def
__init__
(
self
,
environ
):
def
__init__
(
self
,
environ
):
script_name
=
get_script_name
(
environ
)
script_name
=
get_script_name
(
environ
)
path_info
=
get_path_info
(
environ
)
# If PATH_INFO is empty (e.g. accessing the SCRIPT_NAME URL without a
if
not
path_info
:
# trailing slash), operate as if '/' was requested.
# Sometimes PATH_INFO exists, but is empty (e.g. accessing
path_info
=
get_path_info
(
environ
)
or
'/'
# the SCRIPT_NAME URL without a trailing slash). We really need to
# operate as if they'd requested '/'. Not amazingly nice to force
# the path like this, but should be harmless.
path_info
=
'/'
self
.
environ
=
environ
self
.
environ
=
environ
self
.
path_info
=
path_info
self
.
path_info
=
path_info
# be careful to only replace the first slash in the path because of
# be careful to only replace the first slash in the path because of
...
...
django/core/management/commands/makemessages.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -323,9 +323,9 @@ class Command(BaseCommand):
...
@@ -323,9 +323,9 @@ class Command(BaseCommand):
raise
CommandError
(
"currently makemessages only supports domains "
raise
CommandError
(
"currently makemessages only supports domains "
"'django' and 'djangojs'"
)
"'django' and 'djangojs'"
)
if
self
.
domain
==
'djangojs'
:
if
self
.
domain
==
'djangojs'
:
exts
=
extensions
if
extensions
else
[
'js'
]
exts
=
extensions
or
[
'js'
]
else
:
else
:
exts
=
extensions
if
extensions
else
[
'html'
,
'txt'
,
'py'
]
exts
=
extensions
or
[
'html'
,
'txt'
,
'py'
]
self
.
extensions
=
handle_extensions
(
exts
)
self
.
extensions
=
handle_extensions
(
exts
)
if
(
locale
is
None
and
not
exclude
and
not
process_all
)
or
self
.
domain
is
None
:
if
(
locale
is
None
and
not
exclude
and
not
process_all
)
or
self
.
domain
is
None
:
...
@@ -501,9 +501,7 @@ class Command(BaseCommand):
...
@@ -501,9 +501,7 @@ class Command(BaseCommand):
locale_dir
=
path
locale_dir
=
path
break
break
if
not
locale_dir
:
if
not
locale_dir
:
locale_dir
=
self
.
default_locale_path
locale_dir
=
self
.
default_locale_path
or
NO_LOCALE_DIR
if
not
locale_dir
:
locale_dir
=
NO_LOCALE_DIR
all_files
.
append
(
self
.
translatable_file_class
(
dirpath
,
filename
,
locale_dir
))
all_files
.
append
(
self
.
translatable_file_class
(
dirpath
,
filename
,
locale_dir
))
return
sorted
(
all_files
)
return
sorted
(
all_files
)
...
...
django/db/backends/base/introspection.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -130,7 +130,7 @@ class BaseDatabaseIntrospection:
...
@@ -130,7 +130,7 @@ class BaseDatabaseIntrospection:
# we don't need to reset the sequence.
# we don't need to reset the sequence.
if
f
.
remote_field
.
through
is
None
:
if
f
.
remote_field
.
through
is
None
:
sequence
=
self
.
get_sequences
(
cursor
,
f
.
m2m_db_table
())
sequence
=
self
.
get_sequences
(
cursor
,
f
.
m2m_db_table
())
sequence_list
.
extend
(
sequence
if
sequence
else
[{
'table'
:
f
.
m2m_db_table
(),
'column'
:
None
}])
sequence_list
.
extend
(
sequence
or
[{
'table'
:
f
.
m2m_db_table
(),
'column'
:
None
}])
return
sequence_list
return
sequence_list
def
get_sequences
(
self
,
cursor
,
table_name
,
table_fields
=
()):
def
get_sequences
(
self
,
cursor
,
table_name
,
table_fields
=
()):
...
...
django/db/backends/sqlite3/creation.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -12,9 +12,7 @@ class DatabaseCreation(BaseDatabaseCreation):
...
@@ -12,9 +12,7 @@ class DatabaseCreation(BaseDatabaseCreation):
return
database_name
==
':memory:'
or
'mode=memory'
in
database_name
return
database_name
==
':memory:'
or
'mode=memory'
in
database_name
def
_get_test_db_name
(
self
):
def
_get_test_db_name
(
self
):
test_database_name
=
self
.
connection
.
settings_dict
[
'TEST'
][
'NAME'
]
test_database_name
=
self
.
connection
.
settings_dict
[
'TEST'
][
'NAME'
]
or
':memory:'
if
not
test_database_name
:
test_database_name
=
':memory:'
if
test_database_name
==
':memory:'
:
if
test_database_name
==
':memory:'
:
return
'file:memorydb_
%
s?mode=memory&cache=shared'
%
self
.
connection
.
alias
return
'file:memorydb_
%
s?mode=memory&cache=shared'
%
self
.
connection
.
alias
return
test_database_name
return
test_database_name
...
...
django/db/models/sql/query.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -606,7 +606,7 @@ class Query:
...
@@ -606,7 +606,7 @@ class Query:
# Ordering uses the 'rhs' ordering, unless it has none, in which case
# Ordering uses the 'rhs' ordering, unless it has none, in which case
# the current ordering is used.
# the current ordering is used.
self
.
order_by
=
rhs
.
order_by
if
rhs
.
order_by
else
self
.
order_by
self
.
order_by
=
rhs
.
order_by
or
self
.
order_by
self
.
extra_order_by
=
rhs
.
extra_order_by
or
self
.
extra_order_by
self
.
extra_order_by
=
rhs
.
extra_order_by
or
self
.
extra_order_by
def
deferred_to_data
(
self
,
target
,
callback
):
def
deferred_to_data
(
self
,
target
,
callback
):
...
...
django/forms/widgets.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -474,7 +474,7 @@ class DateTimeBaseInput(TextInput):
...
@@ -474,7 +474,7 @@ class DateTimeBaseInput(TextInput):
def
__init__
(
self
,
attrs
=
None
,
format
=
None
):
def
__init__
(
self
,
attrs
=
None
,
format
=
None
):
super
()
.
__init__
(
attrs
)
super
()
.
__init__
(
attrs
)
self
.
format
=
format
if
format
else
None
self
.
format
=
format
or
None
def
format_value
(
self
,
value
):
def
format_value
(
self
,
value
):
return
formats
.
localize_input
(
value
,
self
.
format
or
formats
.
get_format
(
self
.
format_key
)[
0
])
return
formats
.
localize_input
(
value
,
self
.
format
or
formats
.
get_format
(
self
.
format_key
)[
0
])
...
...
django/utils/dateparse.py
Dosyayı görüntüle @
c69e4bc6
...
@@ -131,9 +131,11 @@ def parse_duration(value):
...
@@ -131,9 +131,11 @@ def parse_duration(value):
Also supports ISO 8601 representation and PostgreSQL's day-time interval
Also supports ISO 8601 representation and PostgreSQL's day-time interval
format.
format.
"""
"""
match
=
standard_duration_re
.
match
(
value
)
match
=
(
if
not
match
:
standard_duration_re
.
match
(
value
)
or
match
=
iso8601_duration_re
.
match
(
value
)
or
postgres_interval_re
.
match
(
value
)
iso8601_duration_re
.
match
(
value
)
or
postgres_interval_re
.
match
(
value
)
)
if
match
:
if
match
:
kw
=
match
.
groupdict
()
kw
=
match
.
groupdict
()
days
=
datetime
.
timedelta
(
float
(
kw
.
pop
(
'days'
,
0
)
or
0
))
days
=
datetime
.
timedelta
(
float
(
kw
.
pop
(
'days'
,
0
)
or
0
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment