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
70e3e2e0
Kaydet (Commit)
70e3e2e0
authored
May 14, 2015
tarafından
Piotr Jakimiak
Kaydeden (comit)
Tim Graham
May 16, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24774 -- Made contrib.site's Site.domain field unique
üst
4c2197db
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
1 deletion
+36
-1
AUTHORS
AUTHORS
+1
-0
0002_alter_domain_unique.py
django/contrib/sites/migrations/0002_alter_domain_unique.py
+20
-0
models.py
django/contrib/sites/models.py
+1
-1
sites.txt
docs/ref/contrib/sites.txt
+5
-0
1.9.txt
docs/releases/1.9.txt
+3
-0
tests.py
tests/sites_tests/tests.py
+6
-0
No files found.
AUTHORS
Dosyayı görüntüle @
70e3e2e0
...
...
@@ -565,6 +565,7 @@ answer newbie questions, and generally made Django that much better:
Philip Lindborg <philip.lindborg@gmail.com>
Philippe Raoult <philippe.raoult@n2nsoft.com>
phil@produxion.net
Piotr Jakimiak <piotr.jakimiak@gmail.com>
Piotr Lewandowski <piotr.lewandowski@gmail.com>
plisk
polpak@yahoo.com
...
...
django/contrib/sites/migrations/0002_alter_domain_unique.py
0 → 100644
Dosyayı görüntüle @
70e3e2e0
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
import
django.contrib.sites.models
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'sites'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'site'
,
name
=
'domain'
,
field
=
models
.
CharField
(
max_length
=
100
,
unique
=
True
,
validators
=
[
django
.
contrib
.
sites
.
models
.
_simple_domain_name_validator
],
verbose_name
=
'domain name'
),
),
]
django/contrib/sites/models.py
Dosyayı görüntüle @
70e3e2e0
...
...
@@ -73,7 +73,7 @@ class SiteManager(models.Manager):
class
Site
(
models
.
Model
):
domain
=
models
.
CharField
(
_
(
'domain name'
),
max_length
=
100
,
validators
=
[
_simple_domain_name_validator
])
validators
=
[
_simple_domain_name_validator
]
,
unique
=
True
)
name
=
models
.
CharField
(
_
(
'display name'
),
max_length
=
50
)
objects
=
SiteManager
()
...
...
docs/ref/contrib/sites.txt
Dosyayı görüntüle @
70e3e2e0
...
...
@@ -23,6 +23,11 @@ The sites framework is mainly based on a simple model:
The domain name associated with the Web site.
.. versionchanged:: 1.9
The ``domain`` field was set to be
:attr:`~django.db.models.Field.unique`.
.. attribute:: name
A human-readable "verbose" name for the Web site.
...
...
docs/releases/1.9.txt
Dosyayı görüntüle @
70e3e2e0
...
...
@@ -447,6 +447,9 @@ Miscellaneous
* Support for PostGIS 1.5 has been dropped.
* The ``django.contrib.sites.models.Site.domain`` field was changed to be
:attr:`~django.db.models.Field.unique`.
.. _deprecated-features-1.9:
Features deprecated in 1.9
...
...
tests/sites_tests/tests.py
Dosyayı görüntüle @
70e3e2e0
...
...
@@ -135,6 +135,12 @@ class SitesFrameworkTests(TestCase):
clear_site_cache
(
Site
,
instance
=
site
,
using
=
'default'
)
self
.
assertEqual
(
models
.
SITE_CACHE
,
{})
def
test_unique_domain
(
self
):
site
=
Site
(
domain
=
self
.
site
.
domain
)
msg
=
'Site with this Domain name already exists.'
with
self
.
assertRaisesMessage
(
ValidationError
,
msg
):
site
.
validate_unique
()
class
JustOtherRouter
(
object
):
def
allow_migrate
(
self
,
db
,
app_label
,
**
hints
):
...
...
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