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
1b7fb29d
Kaydet (Commit)
1b7fb29d
authored
Şub 23, 2013
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Changed "mysite/mytemplates/" -> "mysite/templates" in tutorial.
Thanks James Pic.
üst
6bbf4e57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
reusable-apps.txt
docs/intro/reusable-apps.txt
+2
-2
tutorial02.txt
docs/intro/tutorial02.txt
+5
-6
tutorial03.txt
docs/intro/tutorial03.txt
+1
-1
No files found.
docs/intro/reusable-apps.txt
Dosyayı görüntüle @
1b7fb29d
...
...
@@ -74,11 +74,11 @@ After the previous tutorials, our project should look like this::
results.html
urls.py
views.py
my
templates/
templates/
admin/
base_site.html
You created ``mysite/
my
templates`` in :doc:`Tutorial 2 </intro/tutorial02>`,
You created ``mysite/templates`` in :doc:`Tutorial 2 </intro/tutorial02>`,
and ``polls/templates`` in :doc:`Tutorial 3 </intro/tutorial03>`. Now perhaps
it is clearer why we chose to have separate template directories for the
project and application: everything that is part of the polls application is in
...
...
docs/intro/tutorial02.txt
Dosyayı görüntüle @
1b7fb29d
...
...
@@ -404,7 +404,7 @@ system.
Customizing your *project's* templates
--------------------------------------
Create a ``
my
templates`` directory in your project directory. Templates can
Create a ``templates`` directory in your project directory. Templates can
live anywhere on your filesystem that Django can access. (Django runs as
whatever user your server runs.) However, keeping your templates within the
project is a good convention to follow.
...
...
@@ -412,13 +412,12 @@ project is a good convention to follow.
Open your settings file (``mysite/settings.py``, remember) and add a
:setting:`TEMPLATE_DIRS` setting::
TEMPLATE_DIRS =
(os.path.join(BASE_DIR, 'mytemplates'),)
TEMPLATE_DIRS =
[os.path.join(BASE_DIR, 'templates')]
Don't forget the trailing comma. :setting:`TEMPLATE_DIRS` is a tuple of
filesystem directories to check when loading Django templates; it's a search
path.
:setting:`TEMPLATE_DIRS` is an iterable of filesystem directories to check when
loading Django templates; it's a search path.
Now create a directory called ``admin`` inside ``
my
templates``, and copy the
Now create a directory called ``admin`` inside ``templates``, and copy the
template ``admin/base_site.html`` from within the default Django admin
template directory in the source code of Django itself
(``django/contrib/admin/templates``) into that directory.
...
...
docs/intro/tutorial03.txt
Dosyayı görüntüle @
1b7fb29d
...
...
@@ -300,7 +300,7 @@ Django knows to find the polls templates even though we didn't modify
and it would work perfectly well. However, this template belongs to the
polls application, so unlike the admin template we created in the previous
tutorial, we'll put this one in the application's template directory
(``polls/templates``) rather than the project's (``
my
templates``). We'll
(``polls/templates``) rather than the project's (``templates``). We'll
discuss in more detail in the :doc:`reusable apps tutorial
</intro/reusable-apps>` *why* we do this.
...
...
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