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
d5b573d8
Kaydet (Commit)
d5b573d8
authored
Ock 22, 2017
tarafından
Thom Wiggers
Kaydeden (comit)
Tim Graham
Ock 28, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #26993 -- Increased User.last_name max_length to 150 characters.
üst
0de0699d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
2 deletions
+50
-2
AUTHORS
AUTHORS
+1
-0
0009_alter_user_last_name_max_length.py
...b/auth/migrations/0009_alter_user_last_name_max_length.py
+16
-0
models.py
django/contrib/auth/models.py
+1
-1
auth.txt
docs/ref/contrib/auth.txt
+5
-1
2.0.txt
docs/releases/2.0.txt
+27
-0
No files found.
AUTHORS
Dosyayı görüntüle @
d5b573d8
...
...
@@ -738,6 +738,7 @@ answer newbie questions, and generally made Django that much better:
thebjorn <bp@datakortet.no>
Thejaswi Puthraya <thejaswi.puthraya@gmail.com>
Thijs van Dien <thijs@vandien.net>
Thom Wiggers
Thomas Chaumeny <t.chaumeny@gmail.com>
Thomas Güttler <hv@tbz-pariv.de>
Thomas Kerpe <thomas@kerpe.net>
...
...
django/contrib/auth/migrations/0009_alter_user_last_name_max_length.py
0 → 100644
Dosyayı görüntüle @
d5b573d8
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'auth'
,
'0008_alter_user_username_max_length'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'user'
,
name
=
'last_name'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
150
,
verbose_name
=
'last name'
),
),
]
django/contrib/auth/models.py
Dosyayı görüntüle @
d5b573d8
...
...
@@ -311,7 +311,7 @@ class AbstractUser(AbstractBaseUser, PermissionsMixin):
},
)
first_name
=
models
.
CharField
(
_
(
'first name'
),
max_length
=
30
,
blank
=
True
)
last_name
=
models
.
CharField
(
_
(
'last name'
),
max_length
=
3
0
,
blank
=
True
)
last_name
=
models
.
CharField
(
_
(
'last name'
),
max_length
=
15
0
,
blank
=
True
)
email
=
models
.
EmailField
(
_
(
'email address'
),
blank
=
True
)
is_staff
=
models
.
BooleanField
(
_
(
'staff status'
),
...
...
docs/ref/contrib/auth.txt
Dosyayı görüntüle @
d5b573d8
...
...
@@ -47,7 +47,11 @@ Fields
.. attribute:: last_name
Optional. 30 characters or fewer.
Optional. 150 characters or fewer.
.. versionchanged:: 2.0
The ``max_length`` increased from 30 to 150 characters.
.. attribute:: email
...
...
docs/releases/2.0.txt
Dosyayı görüntüle @
d5b573d8
...
...
@@ -217,6 +217,33 @@ The end of upstream support for Oracle 11.2 is Dec. 2020. Django 1.11 will be
supported until April 2020 which almost reaches this date. Django 2.0
officially supports Oracle 12.1+.
:attr:`AbstractUser.last_name <django.contrib.auth.models.User.last_name>` ``max_length`` increased to 150
----------------------------------------------------------------------------------------------------------
A migration for :attr:`django.contrib.auth.models.User.last_name` is included.
If you have a custom user model inheriting from ``AbstractUser``, you'll need
to generate and apply a database migration for your user model.
If you want to preserve the 30 character limit for last names, use a custom
form::
from django.contrib.auth.forms import UserChangeForm
class MyUserChangeForm(UserChangeForm):
last_name = forms.CharField(max_length=30, required=False)
If you wish to keep this restriction in the admin when editing users, set
``UserAdmin.form`` to use this form::
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
class MyUserAdmin(UserAdmin):
form = MyUserChangeForm
admin.site.unregister(User)
admin.site.register(User, MyUserAdmin)
Miscellaneous
-------------
...
...
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