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
8b3f1c35
Kaydet (Commit)
8b3f1c35
authored
Nis 24, 2019
tarafından
Jon Dufresne
Kaydeden (comit)
Mariusz Felisiak
Nis 24, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed unnecessary assignments in various code.
üst
80482e92
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
20 additions
and
33 deletions
+20
-33
options.py
django/contrib/admin/options.py
+1
-2
views.py
django/contrib/flatpages/views.py
+1
-2
errcheck.py
django/contrib/gis/gdal/prototypes/errcheck.py
+1
-2
base.py
django/core/cache/backends/base.py
+1
-2
loaddata.py
django/core/management/commands/loaddata.py
+1
-2
sql.py
django/core/management/sql.py
+1
-2
operations.py
django/db/backends/sqlite3/operations.py
+3
-4
formsets.py
django/forms/formsets.py
+4
-3
multipartparser.py
django/http/multipartparser.py
+1
-2
csrf.py
django/middleware/csrf.py
+1
-2
response.py
django/template/response.py
+1
-2
utils.py
django/test/utils.py
+2
-4
tests.py
tests/logging_tests/tests.py
+1
-2
views.py
tests/test_client_regress/views.py
+1
-2
No files found.
django/contrib/admin/options.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -610,7 +610,7 @@ class ModelAdmin(BaseModelAdmin):
info
=
self
.
model
.
_meta
.
app_label
,
self
.
model
.
_meta
.
model_name
urlpatterns
=
[
return
[
path
(
''
,
wrap
(
self
.
changelist_view
),
name
=
'
%
s_
%
s_changelist'
%
info
),
path
(
'add/'
,
wrap
(
self
.
add_view
),
name
=
'
%
s_
%
s_add'
%
info
),
path
(
'autocomplete/'
,
wrap
(
self
.
autocomplete_view
),
name
=
'
%
s_
%
s_autocomplete'
%
info
),
...
...
@@ -622,7 +622,6 @@ class ModelAdmin(BaseModelAdmin):
pattern_name
=
'
%
s:
%
s_
%
s_change'
%
((
self
.
admin_site
.
name
,)
+
info
)
))),
]
return
urlpatterns
@property
def
urls
(
self
):
...
...
django/contrib/flatpages/views.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -66,5 +66,4 @@ def render_flatpage(request, f):
f
.
title
=
mark_safe
(
f
.
title
)
f
.
content
=
mark_safe
(
f
.
content
)
response
=
HttpResponse
(
template
.
render
({
'flatpage'
:
f
},
request
))
return
response
return
HttpResponse
(
template
.
render
({
'flatpage'
:
f
},
request
))
django/contrib/gis/gdal/prototypes/errcheck.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -69,8 +69,7 @@ def check_string(result, func, cargs, offset=-1, str_result=False):
# ### Envelope checking ###
def
check_envelope
(
result
,
func
,
cargs
,
offset
=-
1
):
"Check a function that returns an OGR Envelope by reference."
env
=
ptr_byref
(
cargs
,
offset
)
return
env
return
ptr_byref
(
cargs
,
offset
)
# ### Geometry error-checking routines ###
...
...
django/core/cache/backends/base.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -97,8 +97,7 @@ class BaseCache:
if
version
is
None
:
version
=
self
.
version
new_key
=
self
.
key_func
(
key
,
self
.
key_prefix
,
version
)
return
new_key
return
self
.
key_func
(
key
,
self
.
key_prefix
,
version
)
def
add
(
self
,
key
,
value
,
timeout
=
DEFAULT_TIMEOUT
,
version
=
None
):
"""
...
...
django/core/management/commands/loaddata.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -300,8 +300,7 @@ class Command(BaseCommand):
dirs
.
append
(
app_dir
)
dirs
.
extend
(
fixture_dirs
)
dirs
.
append
(
''
)
dirs
=
[
os
.
path
.
abspath
(
os
.
path
.
realpath
(
d
))
for
d
in
dirs
]
return
dirs
return
[
os
.
path
.
abspath
(
os
.
path
.
realpath
(
d
))
for
d
in
dirs
]
def
parse_name
(
self
,
fixture_name
):
"""
...
...
django/core/management/sql.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -14,8 +14,7 @@ def sql_flush(style, connection, only_django=False, reset_sequences=True, allow_
else
:
tables
=
connection
.
introspection
.
table_names
(
include_views
=
False
)
seqs
=
connection
.
introspection
.
sequence_list
()
if
reset_sequences
else
()
statements
=
connection
.
ops
.
sql_flush
(
style
,
tables
,
seqs
,
allow_cascade
)
return
statements
return
connection
.
ops
.
sql_flush
(
style
,
tables
,
seqs
,
allow_cascade
)
def
emit_pre_migrate_signal
(
verbosity
,
interactive
,
db
,
**
kwargs
):
...
...
django/db/backends/sqlite3/operations.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -198,14 +198,13 @@ class DatabaseOperations(BaseDatabaseOperations):
# Simulate TRUNCATE CASCADE by recursively collecting the tables
# referencing the tables to be flushed.
tables
=
set
(
chain
.
from_iterable
(
self
.
_references_graph
(
table
)
for
table
in
tables
))
sql
=
[
'
%
s
%
s
%
s;'
%
(
# Note: No requirement for reset of auto-incremented indices (cf. other
# sql_flush() implementations). Just return SQL at this point
return
[
'
%
s
%
s
%
s;'
%
(
style
.
SQL_KEYWORD
(
'DELETE'
),
style
.
SQL_KEYWORD
(
'FROM'
),
style
.
SQL_FIELD
(
self
.
quote_name
(
table
))
)
for
table
in
tables
]
# Note: No requirement for reset of auto-incremented indices (cf. other
# sql_flush() implementations). Just return SQL at this point
return
sql
def
adapt_datetimefield_value
(
self
,
value
):
if
value
is
None
:
...
...
django/forms/formsets.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -134,9 +134,10 @@ class BaseFormSet:
def
forms
(
self
):
"""Instantiate forms at first property access."""
# DoS protection is included in total_form_count()
forms
=
[
self
.
_construct_form
(
i
,
**
self
.
get_form_kwargs
(
i
))
for
i
in
range
(
self
.
total_form_count
())]
return
forms
return
[
self
.
_construct_form
(
i
,
**
self
.
get_form_kwargs
(
i
))
for
i
in
range
(
self
.
total_form_count
())
]
def
get_form_kwargs
(
self
,
index
):
"""
...
...
django/http/multipartparser.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -360,8 +360,7 @@ class LazyStream:
remaining
-=
len
(
emitting
)
yield
emitting
out
=
b
''
.
join
(
parts
())
return
out
return
b
''
.
join
(
parts
())
def
__next__
(
self
):
"""
...
...
django/middleware/csrf.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -64,8 +64,7 @@ def _unsalt_cipher_token(token):
token
=
token
[
CSRF_SECRET_LENGTH
:]
chars
=
CSRF_ALLOWED_CHARS
pairs
=
zip
((
chars
.
index
(
x
)
for
x
in
token
),
(
chars
.
index
(
x
)
for
x
in
salt
))
secret
=
''
.
join
(
chars
[
x
-
y
]
for
x
,
y
in
pairs
)
# Note negative values are ok
return
secret
return
''
.
join
(
chars
[
x
-
y
]
for
x
,
y
in
pairs
)
# Note negative values are ok
def
_get_new_csrf_token
():
...
...
django/template/response.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -80,8 +80,7 @@ class SimpleTemplateResponse(HttpResponse):
"""
template
=
self
.
resolve_template
(
self
.
template_name
)
context
=
self
.
resolve_context
(
self
.
context_data
)
content
=
template
.
render
(
context
,
self
.
_request
)
return
content
return
template
.
render
(
context
,
self
.
_request
)
def
add_post_render_callback
(
self
,
callback
):
"""Add a new post-rendering callback.
...
...
django/test/utils.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -306,8 +306,7 @@ def get_runner(settings, test_runner_class=None):
else
:
test_module_name
=
'.'
test_module
=
__import__
(
test_module_name
,
{},
{},
test_path
[
-
1
])
test_runner
=
getattr
(
test_module
,
test_path
[
-
1
])
return
test_runner
return
getattr
(
test_module
,
test_path
[
-
1
])
class
TestContextDecorator
:
...
...
@@ -757,7 +756,7 @@ def require_jinja2(test_func):
Django template engine for a test or skip it if Jinja2 isn't available.
"""
test_func
=
skipIf
(
jinja2
is
None
,
"this test requires jinja2"
)(
test_func
)
test_func
=
override_settings
(
TEMPLATES
=
[{
return
override_settings
(
TEMPLATES
=
[{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'APP_DIRS'
:
True
,
},
{
...
...
@@ -765,7 +764,6 @@ def require_jinja2(test_func):
'APP_DIRS'
:
True
,
'OPTIONS'
:
{
'keep_trailing_newline'
:
True
},
}])(
test_func
)
return
test_func
class
override_script_prefix
(
TestContextDecorator
):
...
...
tests/logging_tests/tests.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -251,11 +251,10 @@ class AdminEmailHandlerTest(SimpleTestCase):
def
get_admin_email_handler
(
self
,
logger
):
# AdminEmailHandler does not get filtered out
# even with DEBUG=True.
admin_email_handler
=
[
return
[
h
for
h
in
logger
.
handlers
if
h
.
__class__
.
__name__
==
"AdminEmailHandler"
][
0
]
return
admin_email_handler
def
test_fail_silently
(
self
):
admin_email_handler
=
self
.
get_admin_email_handler
(
self
.
logger
)
...
...
tests/test_client_regress/views.py
Dosyayı görüntüle @
8b3f1c35
...
...
@@ -117,8 +117,7 @@ def return_text_file(request):
else
:
charset
=
settings
.
DEFAULT_CHARSET
response
=
HttpResponse
(
request
.
body
,
status
=
200
,
content_type
=
'text/plain; charset=
%
s'
%
charset
)
return
response
return
HttpResponse
(
request
.
body
,
status
=
200
,
content_type
=
'text/plain; charset=
%
s'
%
charset
)
def
check_headers
(
request
):
...
...
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