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
f40e71a9
Kaydet (Commit)
f40e71a9
authored
May 23, 2018
tarafından
Ramiro Morales
Kaydeden (comit)
Tim Graham
May 23, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #29417 -- Corrected two admin page titles for view-only users.
üst
40ff9331
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
16 deletions
+38
-16
django.po
django/contrib/admin/locale/en/LC_MESSAGES/django.po
+24
-14
options.py
django/contrib/admin/options.py
+7
-1
main.py
django/contrib/admin/views/main.py
+3
-1
tests.py
tests/admin_views/tests.py
+4
-0
No files found.
django/contrib/admin/locale/en/LC_MESSAGES/django.po
Dosyayı görüntüle @
f40e71a9
...
@@ -4,7 +4,7 @@ msgid ""
...
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: Django\n"
"Project-Id-Version: Django\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-05-
17 12:08+02
00\n"
"POT-Creation-Date: 2018-05-
21 14:16-03
00\n"
"PO-Revision-Date: 2010-05-13 15:35+0200\n"
"PO-Revision-Date: 2010-05-13 15:35+0200\n"
"Last-Translator: Django team\n"
"Last-Translator: Django team\n"
"Language-Team: English <en@li.org>\n"
"Language-Team: English <en@li.org>\n"
...
@@ -19,12 +19,12 @@ msgstr ""
...
@@ -19,12 +19,12 @@ msgstr ""
msgid "Successfully deleted %(count)d %(items)s."
msgid "Successfully deleted %(count)d %(items)s."
msgstr ""
msgstr ""
#: contrib/admin/actions.py:54 contrib/admin/options.py:18
35
#: contrib/admin/actions.py:54 contrib/admin/options.py:18
41
#, python-format
#, python-format
msgid "Cannot delete %(name)s"
msgid "Cannot delete %(name)s"
msgstr ""
msgstr ""
#: contrib/admin/actions.py:56 contrib/admin/options.py:18
37
#: contrib/admin/actions.py:56 contrib/admin/options.py:18
43
msgid "Are you sure?"
msgid "Are you sure?"
msgstr ""
msgstr ""
...
@@ -185,7 +185,7 @@ msgstr ""
...
@@ -185,7 +185,7 @@ msgstr ""
msgid "Added."
msgid "Added."
msgstr ""
msgstr ""
#: contrib/admin/models.py:117 contrib/admin/options.py:20
49
#: contrib/admin/models.py:117 contrib/admin/options.py:20
55
msgid "and"
msgid "and"
msgstr ""
msgstr ""
...
@@ -257,7 +257,7 @@ msgstr ""
...
@@ -257,7 +257,7 @@ msgstr ""
msgid "The {name} \"{obj}\" was changed successfully."
msgid "The {name} \"{obj}\" was changed successfully."
msgstr ""
msgstr ""
#: contrib/admin/options.py:1386 contrib/admin/options.py:16
76
#: contrib/admin/options.py:1386 contrib/admin/options.py:16
82
msgid ""
msgid ""
"Items must be selected in order to perform actions on them. No items have "
"Items must be selected in order to perform actions on them. No items have "
"been changed."
"been changed."
...
@@ -277,52 +277,57 @@ msgstr ""
...
@@ -277,52 +277,57 @@ msgstr ""
msgid "%(name)s with ID \"%(key)s\" doesn't exist. Perhaps it was deleted?"
msgid "%(name)s with ID \"%(key)s\" doesn't exist. Perhaps it was deleted?"
msgstr ""
msgstr ""
#: contrib/admin/options.py:159
7
#: contrib/admin/options.py:159
6
#, python-format
#, python-format
msgid "Add %s"
msgid "Add %s"
msgstr ""
msgstr ""
#: contrib/admin/options.py:159
7
#: contrib/admin/options.py:159
8
#, python-format
#, python-format
msgid "Change %s"
msgid "Change %s"
msgstr ""
msgstr ""
#: contrib/admin/options.py:1652
#: contrib/admin/options.py:1600
#, python-format
msgid "View %s"
msgstr ""
#: contrib/admin/options.py:1658
msgid "Database error"
msgid "Database error"
msgstr ""
msgstr ""
#: contrib/admin/options.py:17
24
#: contrib/admin/options.py:17
30
#, python-format
#, python-format
msgid "%(count)s %(name)s was changed successfully."
msgid "%(count)s %(name)s was changed successfully."
msgid_plural "%(count)s %(name)s were changed successfully."
msgid_plural "%(count)s %(name)s were changed successfully."
msgstr[0] ""
msgstr[0] ""
msgstr[1] ""
msgstr[1] ""
#: contrib/admin/options.py:17
55
#: contrib/admin/options.py:17
61
#, python-format
#, python-format
msgid "%(total_count)s selected"
msgid "%(total_count)s selected"
msgid_plural "All %(total_count)s selected"
msgid_plural "All %(total_count)s selected"
msgstr[0] ""
msgstr[0] ""
msgstr[1] ""
msgstr[1] ""
#: contrib/admin/options.py:176
3
#: contrib/admin/options.py:176
9
#, python-format
#, python-format
msgid "0 of %(cnt)s selected"
msgid "0 of %(cnt)s selected"
msgstr ""
msgstr ""
#: contrib/admin/options.py:188
0
#: contrib/admin/options.py:188
6
#, python-format
#, python-format
msgid "Change history: %s"
msgid "Change history: %s"
msgstr ""
msgstr ""
#. Translators: Model verbose name and instance representation,
#. Translators: Model verbose name and instance representation,
#. suitable to be an item in a list.
#. suitable to be an item in a list.
#: contrib/admin/options.py:204
3
#: contrib/admin/options.py:204
9
#, python-format
#, python-format
msgid "%(class_name)s %(instance)s"
msgid "%(class_name)s %(instance)s"
msgstr ""
msgstr ""
#: contrib/admin/options.py:205
0
#: contrib/admin/options.py:205
6
#, python-format
#, python-format
msgid ""
msgid ""
"Deleting %(class_name)s %(instance)s would require deleting the following "
"Deleting %(class_name)s %(instance)s would require deleting the following "
...
@@ -869,6 +874,11 @@ msgstr ""
...
@@ -869,6 +874,11 @@ msgstr ""
msgid "Select %s to change"
msgid "Select %s to change"
msgstr ""
msgstr ""
#: contrib/admin/views/main.py:87
#, python-format
msgid "Select %s to view"
msgstr ""
#: contrib/admin/widgets.py:101
#: contrib/admin/widgets.py:101
msgid "Date:"
msgid "Date:"
msgstr ""
msgstr ""
...
...
django/contrib/admin/options.py
Dosyayı görüntüle @
f40e71a9
...
@@ -1592,9 +1592,15 @@ class ModelAdmin(BaseModelAdmin):
...
@@ -1592,9 +1592,15 @@ class ModelAdmin(BaseModelAdmin):
for
inline_formset
in
inline_formsets
:
for
inline_formset
in
inline_formsets
:
media
=
media
+
inline_formset
.
media
media
=
media
+
inline_formset
.
media
if
add
:
title
=
_
(
'Add
%
s'
)
elif
self
.
has_change_permission
(
request
,
obj
):
title
=
_
(
'Change
%
s'
)
else
:
title
=
_
(
'View
%
s'
)
context
=
{
context
=
{
**
self
.
admin_site
.
each_context
(
request
),
**
self
.
admin_site
.
each_context
(
request
),
'title'
:
(
_
(
'Add
%
s'
)
if
add
else
_
(
'Change
%
s'
))
%
opts
.
verbose_name
,
'title'
:
title
%
opts
.
verbose_name
,
'adminform'
:
adminForm
,
'adminform'
:
adminForm
,
'object_id'
:
object_id
,
'object_id'
:
object_id
,
'original'
:
obj
,
'original'
:
obj
,
...
...
django/contrib/admin/views/main.py
Dosyayı görüntüle @
f40e71a9
...
@@ -81,8 +81,10 @@ class ChangeList:
...
@@ -81,8 +81,10 @@ class ChangeList:
self
.
get_results
(
request
)
self
.
get_results
(
request
)
if
self
.
is_popup
:
if
self
.
is_popup
:
title
=
gettext
(
'Select
%
s'
)
title
=
gettext
(
'Select
%
s'
)
el
se
:
el
if
self
.
model_admin
.
has_change_permission
(
request
)
:
title
=
gettext
(
'Select
%
s to change'
)
title
=
gettext
(
'Select
%
s to change'
)
else
:
title
=
gettext
(
'Select
%
s to view'
)
self
.
title
=
title
%
self
.
opts
.
verbose_name
self
.
title
=
title
%
self
.
opts
.
verbose_name
self
.
pk_attname
=
self
.
lookup_opts
.
pk
.
attname
self
.
pk_attname
=
self
.
lookup_opts
.
pk
.
attname
...
...
tests/admin_views/tests.py
Dosyayı görüntüle @
f40e71a9
...
@@ -1764,8 +1764,10 @@ class AdminViewPermissionsTest(TestCase):
...
@@ -1764,8 +1764,10 @@ class AdminViewPermissionsTest(TestCase):
self
.
client
.
force_login
(
self
.
viewuser
)
self
.
client
.
force_login
(
self
.
viewuser
)
response
=
self
.
client
.
get
(
article_changelist_url
)
response
=
self
.
client
.
get
(
article_changelist_url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
context
[
'title'
],
'Select article to view'
)
response
=
self
.
client
.
get
(
article_change_url
)
response
=
self
.
client
.
get
(
article_change_url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
context
[
'title'
],
'View article'
)
self
.
assertContains
(
response
,
'<a href="/test_admin/admin/admin_views/article/" class="closelink">Close</a>'
)
self
.
assertContains
(
response
,
'<a href="/test_admin/admin/admin_views/article/" class="closelink">Close</a>'
)
post
=
self
.
client
.
post
(
article_change_url
,
change_dict
)
post
=
self
.
client
.
post
(
article_change_url
,
change_dict
)
self
.
assertEqual
(
post
.
status_code
,
302
)
self
.
assertEqual
(
post
.
status_code
,
302
)
...
@@ -1776,8 +1778,10 @@ class AdminViewPermissionsTest(TestCase):
...
@@ -1776,8 +1778,10 @@ class AdminViewPermissionsTest(TestCase):
self
.
client
.
force_login
(
self
.
changeuser
)
self
.
client
.
force_login
(
self
.
changeuser
)
response
=
self
.
client
.
get
(
article_changelist_url
)
response
=
self
.
client
.
get
(
article_changelist_url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
context
[
'title'
],
'Select article to change'
)
response
=
self
.
client
.
get
(
article_change_url
)
response
=
self
.
client
.
get
(
article_change_url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
context
[
'title'
],
'Change article'
)
post
=
self
.
client
.
post
(
article_change_url
,
change_dict
)
post
=
self
.
client
.
post
(
article_change_url
,
change_dict
)
self
.
assertRedirects
(
post
,
article_changelist_url
)
self
.
assertRedirects
(
post
,
article_changelist_url
)
self
.
assertEqual
(
Article
.
objects
.
get
(
pk
=
self
.
a1
.
pk
)
.
content
,
'<p>edited article</p>'
)
self
.
assertEqual
(
Article
.
objects
.
get
(
pk
=
self
.
a1
.
pk
)
.
content
,
'<p>edited article</p>'
)
...
...
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