#16629: STATIC_ROOT should not be required by {% static %} when using
development
server
------------------------+-------------------------------------
Reporter: bendavis78 | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: contrib.staticfiles
Version: SVN | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------+-------------------------------------
The development server uses its own views for serving static files
directly, instead of from STATIC_ROOT, so the STATIC_ROOT setting should
not be required under a development environment. One can normally get by
without STATIC_ROOT as long as STATIC_URL is used. However, when using the
{% static %} template tag, the following exception is raised:
{{{
Caught ImproperlyConfigured while rendering: You're using the staticfiles
app without having set the STATIC_ROOT setting
}}}
Full traceback:
{{{
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/core/handlers/base.py"
in get_response
136. response = response.render()
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/response.py"
in render
112. self._set_content(self.rendered_content)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/response.py"
in rendered_content
89. content = template.render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/base.py"
in render
122. return self._render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/base.py"
in _render
116. return self.nodelist.render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/base.py"
in render
745. bits.append(self.render_node(node, context))
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/debug.py"
in render_node
72. result = node.render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/loader_tags.py"
in render
125. return compiled_parent._render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/base.py"
in _render
116. return self.nodelist.render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/base.py"
in render
745. bits.append(self.render_node(node, context))
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/debug.py"
in render_node
72. result = node.render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/loader_tags.py"
in render
125. return compiled_parent._render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/base.py"
in _render
116. return self.nodelist.render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/base.py"
in render
745. bits.append(self.render_node(node, context))
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/debug.py"
in render_node
72. result = node.render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/loader_tags.py"
in render
62. result = block.nodelist.render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/base.py"
in render
745. bits.append(self.render_node(node, context))
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/debug.py"
in render_node
72. result = node.render(context)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/template/base.py"
in render
886. return func(*func_args)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/contrib/staticfiles/templatetags/staticfiles.py"
in static
13. return staticfiles_storage.url(path)
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/utils/functional.py"
in inner
172. self._setup()
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/contrib/staticfiles/storage.py"
in _setup
205. self._wrapped =
get_storage_class(settings.STATICFILES_STORAGE)()
File
"/home/ben/Projects/SavidWorks/.testenv/src/django/django/contrib/staticfiles/storage.py"
in __init__
34. raise ImproperlyConfigured("You're using the staticfiles
app "
Exception Type: TemplateSyntaxError at /admin/
Exception Value: Caught ImproperlyConfigured while rendering: You're using
the staticfiles app without having set the STATIC_ROOT setting.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/16629>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.