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
4548a282
Kaydet (Commit)
4548a282
authored
Ock 18, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed contrib.sites.models.RequestSite/get_current_site() aliases.
Per deprecation timeline; refs #21680.
üst
ba27f895
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
30 deletions
+0
-30
models.py
django/contrib/sites/models.py
+0
-20
sites.txt
docs/ref/contrib/sites.txt
+0
-10
No files found.
django/contrib/sites/models.py
Dosyayı görüntüle @
4548a282
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
import
string
import
string
import
warnings
from
django.core.exceptions
import
ImproperlyConfigured
,
ValidationError
from
django.core.exceptions
import
ImproperlyConfigured
,
ValidationError
from
django.db
import
models
from
django.db
import
models
from
django.db.models.signals
import
pre_save
,
pre_delete
from
django.db.models.signals
import
pre_save
,
pre_delete
from
django.utils.deprecation
import
RemovedInDjango19Warning
from
django.utils.encoding
import
python_2_unicode_compatible
from
django.utils.encoding
import
python_2_unicode_compatible
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.utils.translation
import
ugettext_lazy
as
_
from
.requests
import
RequestSite
as
RealRequestSite
from
.shortcuts
import
get_current_site
as
real_get_current_site
SITE_CACHE
=
{}
SITE_CACHE
=
{}
...
@@ -93,21 +88,6 @@ class Site(models.Model):
...
@@ -93,21 +88,6 @@ class Site(models.Model):
return
self
.
domain
return
self
.
domain
class
RequestSite
(
RealRequestSite
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
warnings
.
warn
(
"Please import RequestSite from django.contrib.sites.requests."
,
RemovedInDjango19Warning
,
stacklevel
=
2
)
super
(
RequestSite
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
def
get_current_site
(
request
):
warnings
.
warn
(
"Please import get_current_site from django.contrib.sites.shortcuts."
,
RemovedInDjango19Warning
,
stacklevel
=
2
)
return
real_get_current_site
(
request
)
def
clear_site_cache
(
sender
,
**
kwargs
):
def
clear_site_cache
(
sender
,
**
kwargs
):
"""
"""
Clears the cache (if primed) each time a site is saved or deleted
Clears the cache (if primed) each time a site is saved or deleted
...
...
docs/ref/contrib/sites.txt
Dosyayı görüntüle @
4548a282
...
@@ -472,11 +472,6 @@ a fallback when the database-backed sites framework is not available.
...
@@ -472,11 +472,6 @@ a fallback when the database-backed sites framework is not available.
Sets the ``name`` and ``domain`` attributes to the value of
Sets the ``name`` and ``domain`` attributes to the value of
:meth:`~django.http.HttpRequest.get_host`.
:meth:`~django.http.HttpRequest.get_host`.
.. deprecated:: 1.7
This class used to be defined in ``django.contrib.sites.models``. The
old import location will work until Django 1.9.
A :class:`~django.contrib.sites.requests.RequestSite` object has a similar
A :class:`~django.contrib.sites.requests.RequestSite` object has a similar
interface to a normal :class:`~django.contrib.sites.models.Site` object,
interface to a normal :class:`~django.contrib.sites.models.Site` object,
except its :meth:`~django.contrib.sites.requests.RequestSite.__init__()`
except its :meth:`~django.contrib.sites.requests.RequestSite.__init__()`
...
@@ -499,11 +494,6 @@ Finally, to avoid repetitive fallback code, the framework provides a
...
@@ -499,11 +494,6 @@ Finally, to avoid repetitive fallback code, the framework provides a
object or a :class:`~django.contrib.sites.requests.RequestSite` object
object or a :class:`~django.contrib.sites.requests.RequestSite` object
based on the request.
based on the request.
.. deprecated:: 1.7
This function used to be defined in ``django.contrib.sites.models``.
The old import location will work until Django 1.9.
.. versionchanged:: 1.8
.. versionchanged:: 1.8
This function will now lookup the current site based on
This function will now lookup the current site based on
...
...
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