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
c0f03175
Kaydet (Commit)
c0f03175
authored
Haz 20, 2013
tarafından
James Bennett
Kaydeden (comit)
Tim Graham
Tem 08, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #19695 -- Retitle "Form Media" to "Form Assets".
üst
660c30ed
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
14 deletions
+13
-14
admin.txt
docs/faq/admin.txt
+1
-1
index.txt
docs/ref/contrib/admin/index.txt
+5
-5
widgets.txt
docs/ref/forms/widgets.txt
+4
-5
settings.txt
docs/ref/settings.txt
+1
-1
1.3-beta-1.txt
docs/releases/1.3-beta-1.txt
+1
-1
index.txt
docs/topics/forms/index.txt
+1
-1
media.txt
docs/topics/forms/media.txt
+0
-0
No files found.
docs/faq/admin.txt
Dosyayı görüntüle @
c0f03175
...
...
@@ -82,7 +82,7 @@ How can I customize the functionality of the admin interface?
You've got several options. If you want to piggyback on top of an add/change
form that Django automatically generates, you can attach arbitrary JavaScript
modules to the page via the model's class Admin :ref:`js parameter
<modeladmin-
media
-definitions>`. That parameter is a list of URLs, as strings,
<modeladmin-
asset
-definitions>`. That parameter is a list of URLs, as strings,
pointing to JavaScript modules that will be included within the admin form via
a ``<script>`` tag.
...
...
docs/ref/contrib/admin/index.txt
Dosyayı görüntüle @
c0f03175
...
...
@@ -1554,13 +1554,13 @@ instances which allow you to easily customize the response data before
rendering. For more details, see the :doc:`TemplateResponse documentation
</ref/template-response>`.
.. _modeladmin-
media
-definitions:
.. _modeladmin-
asset
-definitions:
``ModelAdmin``
media
definitions
``ModelAdmin``
asset
definitions
--------------------------------
There are times where you would like add a bit of CSS and/or JavaScript to
the add/change views. This can be accomplished by using a
Media
inner class
the add/change views. This can be accomplished by using a
``Media``
inner class
on your ``ModelAdmin``::
class ArticleAdmin(admin.ModelAdmin):
...
...
@@ -1572,8 +1572,8 @@ on your ``ModelAdmin``::
The :doc:`staticfiles app </ref/contrib/staticfiles>` prepends
:setting:`STATIC_URL` (or :setting:`MEDIA_URL` if :setting:`STATIC_URL` is
``None``) to any
media paths. The same rules apply as :ref:`regular media
definitions on forms <form-
media
-paths>`.
``None``) to any
asset paths. The same rules apply as :ref:`regular asset
definitions on forms <form-
asset
-paths>`.
jQuery
~~~~~~
...
...
docs/ref/forms/widgets.txt
Dosyayı görüntüle @
c0f03175
...
...
@@ -171,16 +171,15 @@ You can also set the HTML ``id`` using :attr:`~Widget.attrs`. See
Styling widget classes
^^^^^^^^^^^^^^^^^^^^^^
With widgets, it is possible to add
media
(``css`` and ``javascript``)
With widgets, it is possible to add
assets
(``css`` and ``javascript``)
and more deeply customize their appearance and behavior.
In a nutshell, you will need to subclass the widget and either
:ref:`define a class "Media" <media-as-a-static-definition>` as a member of the
subclass, or :ref:`create a property "media" <dynamic-property>`, returning an
instance of that class.
:ref:`define a "Media" inner class <assets-as-a-static-definition>` or
:ref:`create a "media" property <dynamic-property>`.
These methods involve somewhat advanced Python programming and are described in
detail in the :doc:`Form
Media
</topics/forms/media>` topic guide.
detail in the :doc:`Form
Assets
</topics/forms/media>` topic guide.
.. _base-widget-classes:
...
...
docs/ref/settings.txt
Dosyayı görüntüle @
c0f03175
...
...
@@ -2475,7 +2475,7 @@ URL to use when referring to static files located in :setting:`STATIC_ROOT`.
Example: ``"/static/"`` or ``"http://static.example.com/"``
If not ``None``, this will be used as the base path for
:ref:`
media definitions<form-media-paths>`
and the
:ref:`
asset definitions<form-asset-paths>` (the ``Media`` class)
and the
:doc:`staticfiles app</ref/contrib/staticfiles>`.
It must end in a slash if set to a non-empty value.
...
...
docs/releases/1.3-beta-1.txt
Dosyayı görüntüle @
c0f03175
...
...
@@ -116,7 +116,7 @@ As a result, we took the following steps to rectify the issue:
(``django.core.context_processors.static``) and renamed to
:func:`~django.core.context_processors.static`.
* :ref:`form-
media
-paths` now uses :setting:`STATIC_URL` as the prefix
* :ref:`form-
asset
-paths` now uses :setting:`STATIC_URL` as the prefix
**if the value is not None**, and falls back to the previously used
:setting:`MEDIA_URL` setting otherwise.
...
...
docs/topics/forms/index.txt
Dosyayı görüntüle @
c0f03175
...
...
@@ -42,7 +42,7 @@ The library deals with these concepts:
A collection of fields that knows how to validate itself and
display itself as HTML.
Form
Media
Form
Assets (the ``Media`` class)
The CSS and JavaScript resources that are required to render a form.
The library is decoupled from the other Django components, such as the database
...
...
docs/topics/forms/media.txt
Dosyayı görüntüle @
c0f03175
This diff is collapsed.
Click to expand it.
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