summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorVajrasky Kok <sky.kok@speaklikeaking.com>2013-11-16 22:55:50 +0800
committerJannis Leidel <jannis@leidel.info>2014-02-09 14:22:22 +0000
commit6a9ed7d403a5f90a7c7354097aae99b74e8ce215 (patch)
tree195b7c8caf703ec0e792af2f2e99bb6286560e48 /docs
parent935e6c1dfc10808272bfda1bbda03bfee035f3dc (diff)
Fixed #19879 -- Have 'findstatic' says on which directories it searched the relative paths.
Added searched_locations in finders module. Added verbosity flag level 2 on 'findstatic' command that will output the directories on which it searched the relative paths. Reported by ccurvey. Initial patch by Jonas Svensson and Vajrasky Kok.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/staticfiles.txt34
-rw-r--r--docs/releases/1.7.txt4
2 files changed, 38 insertions, 0 deletions
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt
index 74c6fe7e5b..214128e2cd 100644
--- a/docs/ref/contrib/staticfiles.txt
+++ b/docs/ref/contrib/staticfiles.txt
@@ -162,6 +162,23 @@ output and just get the path names::
/home/special.polls.com/core/static/css/base.css
/home/polls.com/core/static/css/base.css
+On the other hand, by setting the :djadminopt:`--verbosity` flag to 2, you can
+get all the directories on which it searched the relative paths::
+
+ $ python manage.py findstatic css/base.css --verbosity 2
+ Found 'css/base.css' here:
+ /home/special.polls.com/core/static/css/base.css
+ /home/polls.com/core/static/css/base.css
+ Looking in the following locations:
+ /home/special.polls.com/core/static
+ /home/polls.com/core/static
+ /some/other/path/static
+
+.. versionadded:: 1.7
+
+ The additional message of on which directories it searched the relative
+ paths is new in Django 1.7.
+
.. _staticfiles-runserver:
runserver
@@ -366,6 +383,23 @@ files:
.. _staticfiles-development-view:
+Finders Module
+==============
+
+``staticfiles`` finders has a ``searched_locations`` list with directory paths
+in which they search for the relative paths. Example usage::
+
+ from django.contrib.staticfiles import finders
+
+ result = finders.find('css/base.css')
+ searched_locations = finders.searched_locations
+
+.. versionadded:: 1.7
+
+The ``get_searched_locations`` function is new in Django 1.7. Previously, we
+have to check the locations of our :setting:`STATICFILES_FINDERS` manually
+one by one.
+
Static file development view
----------------------------
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index 905d0a3bf5..cd8732fa82 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -1051,6 +1051,10 @@ Miscellaneous
which does allow primary keys with value 0. It only forbids *autoincrement*
primary keys with value 0.
+* :djadmin:`findstatic` now accepts verbosity flag level 2, meaning it will
+ show the directories on which it searched the relative paths. See
+ :djadmin:`findstatic` for example output.
+
.. _deprecated-features-1.7:
Features deprecated in 1.7