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
406675b1
Kaydet (Commit)
406675b1
authored
Şub 05, 2016
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #26176 -- Fixed E123 flake8 warnings.
üst
27531451
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
33 additions
and
27 deletions
+33
-27
checks.py
django/contrib/admin/checks.py
+1
-1
forms.py
django/contrib/flatpages/forms.py
+9
-5
models.py
django/contrib/flatpages/models.py
+4
-1
raster.py
django/contrib/gis/gdal/prototypes/raster.py
+2
-1
dates.py
django/views/generic/dates.py
+3
-3
setup.cfg
setup.cfg
+1
-1
tests.py
tests/aggregation_regress/tests.py
+1
-1
tests.py
tests/annotations/tests.py
+3
-2
test_functions.py
tests/gis_tests/geoapp/test_functions.py
+1
-1
test_commands.py
tests/gis_tests/gis_migrations/test_commands.py
+4
-5
tests.py
tests/lookup/tests.py
+0
-0
tests.py
tests/many_to_many/tests.py
+0
-0
tests.py
tests/many_to_one/tests.py
+0
-0
test_security.py
tests/middleware/test_security.py
+1
-4
test_writer.py
tests/migrations/test_writer.py
+1
-1
test_response.py
tests/template_tests/test_response.py
+2
-1
No files found.
django/contrib/admin/checks.py
Dosyayı görüntüle @
406675b1
...
...
@@ -58,7 +58,7 @@ def check_dependencies(**kwargs):
"'django.contrib.auth.context_processors.auth' must be in "
"TEMPLATES in order to use the admin application."
,
id
=
"admin.E402"
)
)
errors
.
append
(
missing_template
)
return
errors
...
...
django/contrib/flatpages/forms.py
Dosyayı görüntüle @
406675b1
...
...
@@ -5,12 +5,16 @@ from django.utils.translation import ugettext, ugettext_lazy as _
class
FlatpageForm
(
forms
.
ModelForm
):
url
=
forms
.
RegexField
(
label
=
_
(
"URL"
),
max_length
=
100
,
regex
=
r'^[-\w/\.~]+$'
,
help_text
=
_
(
"Example: '/about/contact/'. Make sure to have leading"
" and trailing slashes."
),
url
=
forms
.
RegexField
(
label
=
_
(
"URL"
),
max_length
=
100
,
regex
=
r'^[-\w/\.~]+$'
,
help_text
=
_
(
"Example: '/about/contact/'. Make sure to have leading and trailing slashes."
),
error_messages
=
{
"invalid"
:
_
(
"This value must contain only letters, numbers,"
" dots, underscores, dashes, slashes or tildes."
),
"invalid"
:
_
(
"This value must contain only letters, numbers, dots, "
"underscores, dashes, slashes or tildes."
),
},
)
...
...
django/contrib/flatpages/models.py
Dosyayı görüntüle @
406675b1
...
...
@@ -13,7 +13,10 @@ class FlatPage(models.Model):
title
=
models
.
CharField
(
_
(
'title'
),
max_length
=
200
)
content
=
models
.
TextField
(
_
(
'content'
),
blank
=
True
)
enable_comments
=
models
.
BooleanField
(
_
(
'enable comments'
),
default
=
False
)
template_name
=
models
.
CharField
(
_
(
'template name'
),
max_length
=
70
,
blank
=
True
,
template_name
=
models
.
CharField
(
_
(
'template name'
),
max_length
=
70
,
blank
=
True
,
help_text
=
_
(
"Example: 'flatpages/contact_page.html'. If this isn't provided, "
"the system will use 'flatpages/default.html'."
...
...
django/contrib/gis/gdal/prototypes/raster.py
Dosyayı görüntüle @
406675b1
...
...
@@ -62,7 +62,8 @@ get_band_ds = voidptr_output(std_call('GDALGetBandDataset'), [c_void_p])
get_band_datatype
=
int_output
(
std_call
(
'GDALGetRasterDataType'
),
[
c_void_p
])
get_band_nodata_value
=
double_output
(
std_call
(
'GDALGetRasterNoDataValue'
),
[
c_void_p
,
POINTER
(
c_int
)])
set_band_nodata_value
=
void_output
(
std_call
(
'GDALSetRasterNoDataValue'
),
[
c_void_p
,
c_double
])
get_band_statistics
=
void_output
(
std_call
(
'GDALGetRasterStatistics'
),
get_band_statistics
=
void_output
(
std_call
(
'GDALGetRasterStatistics'
),
[
c_void_p
,
c_int
,
c_int
,
POINTER
(
c_double
),
POINTER
(
c_double
),
POINTER
(
c_double
),
POINTER
(
c_double
),
c_void_p
,
c_void_p
,
...
...
django/views/generic/dates.py
Dosyayı görüntüle @
406675b1
...
...
@@ -658,11 +658,11 @@ class BaseDateDetailView(YearMixin, MonthMixin, DayMixin, DateMixin, BaseDetailV
if
not
self
.
get_allow_future
()
and
date
>
datetime
.
date
.
today
():
raise
Http404
(
_
(
"Future
%(verbose_name_plural)
s not available because "
"
%(class_name)
s.allow_future is False."
)
%
{
"
%(class_name)
s.allow_future is False."
)
%
{
'verbose_name_plural'
:
qs
.
model
.
_meta
.
verbose_name_plural
,
'class_name'
:
self
.
__class__
.
__name__
,
},
)
})
# Filter down a queryset from self.queryset using the date from the
# URL. This'll get passed as the queryset to DetailView.get_object,
...
...
setup.cfg
Dosyayı görüntüle @
406675b1
...
...
@@ -4,7 +4,7 @@ install-script = scripts/rpm-install.sh
[flake8]
exclude = build,.git,./django/utils/lru_cache.py,./django/utils/six.py,./django/conf/app_template/*,./django/dispatch/weakref_backports.py,./tests/.env,./xmlrunner,tests/view_tests/tests/py3_test_debug.py,tests/template_tests/annotated_tag_function.py
ignore = E12
3,E12
8,E402,W503,W601
ignore = E128,E402,W503,W601
max-line-length = 119
[isort]
...
...
tests/aggregation_regress/tests.py
Dosyayı görüntüle @
406675b1
...
...
@@ -963,7 +963,7 @@ class AggregationTests(TestCase):
"""
books
=
Book
.
objects
.
values_list
(
"publisher__name"
)
.
annotate
(
Count
(
"id"
),
Avg
(
"price"
),
Avg
(
"authors__age"
),
avg_pgs
=
Avg
(
"pages"
)
)
.
order_by
(
"-publisher__name"
)
)
.
order_by
(
"-publisher__name"
)
self
.
assertEqual
(
books
[
0
],
(
'Sams'
,
1
,
23.09
,
45.0
,
528.0
))
def
test_annotation_disjunction
(
self
):
...
...
tests/annotations/tests.py
Dosyayı görüntüle @
406675b1
...
...
@@ -428,8 +428,9 @@ class NonAggregateAnnotationTestCase(TestCase):
F
(
'ticker_name'
),
F
(
'description'
),
Value
(
'No Tag'
),
function
=
'COALESCE'
)
)
.
order_by
(
'name'
)
function
=
'COALESCE'
)
)
.
order_by
(
'name'
)
self
.
assertQuerysetEqual
(
qs
,
[
...
...
tests/gis_tests/geoapp/test_functions.py
Dosyayı görüntüle @
406675b1
...
...
@@ -89,7 +89,7 @@ class GISFunctionsTests(TestCase):
chicago_json
,
City
.
objects
.
annotate
(
geojson
=
functions
.
AsGeoJSON
(
'point'
,
bbox
=
True
,
crs
=
True
,
precision
=
5
)
)
.
get
(
name
=
'Chicago'
)
.
geojson
)
.
get
(
name
=
'Chicago'
)
.
geojson
)
@skipUnlessDBFeature
(
"has_AsGML_function"
)
...
...
tests/gis_tests/gis_migrations/test_commands.py
Dosyayı görüntüle @
406675b1
...
...
@@ -56,10 +56,9 @@ class MigrateTests(TransactionTestCase):
# Not all GIS backends have geometry columns model
pass
else
:
self
.
assertEqual
(
GeoColumn
.
objects
.
filter
(
**
{
'
%
s__in'
%
GeoColumn
.
table_name_col
():
[
"gis_neighborhood"
,
"gis_household"
]}
)
.
count
(),
0
)
qs
=
GeoColumn
.
objects
.
filter
(
**
{
'
%
s__in'
%
GeoColumn
.
table_name_col
():
[
"gis_neighborhood"
,
"gis_household"
]}
)
self
.
assertEqual
(
qs
.
count
(),
0
)
# Revert the "unmigration"
call_command
(
"migrate"
,
"gis_migrations"
,
verbosity
=
0
)
tests/lookup/tests.py
Dosyayı görüntüle @
406675b1
This diff is collapsed.
Click to expand it.
tests/many_to_many/tests.py
Dosyayı görüntüle @
406675b1
This diff is collapsed.
Click to expand it.
tests/many_to_one/tests.py
Dosyayı görüntüle @
406675b1
This diff is collapsed.
Click to expand it.
tests/middleware/test_security.py
Dosyayı görüntüle @
406675b1
...
...
@@ -86,10 +86,7 @@ class SecurityMiddlewareTest(SimpleTestCase):
"includeSubDomains" tag to the response.
"""
response
=
self
.
process_response
(
secure
=
True
)
self
.
assertEqual
(
response
[
"strict-transport-security"
],
"max-age=600; includeSubDomains"
,
)
self
.
assertEqual
(
response
[
"strict-transport-security"
],
"max-age=600; includeSubDomains"
)
@override_settings
(
SECURE_HSTS_SECONDS
=
600
,
SECURE_HSTS_INCLUDE_SUBDOMAINS
=
False
)
...
...
tests/migrations/test_writer.py
Dosyayı görüntüle @
406675b1
...
...
@@ -625,7 +625,7 @@ class WriterTests(SimpleTestCase):
migrations
.
AlterModelOptions
(
name
=
'model'
,
options
=
{
'verbose_name'
:
'model'
,
'verbose_name_plural'
:
'models'
},
),
),
]
})
writer
=
MigrationWriter
(
migration
)
...
...
tests/template_tests/test_response.py
Dosyayı görüntüle @
406675b1
...
...
@@ -270,7 +270,8 @@ class TemplateResponseTest(SimpleTestCase):
def
test_pickling
(
self
):
# Create a template response. The context is
# known to be unpicklable (e.g., a function).
response
=
TemplateResponse
(
self
.
factory
.
get
(
'/'
),
response
=
TemplateResponse
(
self
.
factory
.
get
(
'/'
),
'first/test.html'
,
{
'value'
:
123
,
'fn'
:
datetime
.
now
,
...
...
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