armstrong/armstrong — Issue #42: Exception when settings lack a STATIC_URL
Author: tswicegood
Created: 2011-11-16 20:13:56+00:00
State: open
Labels: bugs, hatband

Caused by the assumption that there's always a `STATIC_URL` setting. Just needs to do some type checking. It should raise an improperly configured exception/error.

Environment:

Request Method: GET
Request URL: http://localhost:8000/

Django Version: 1.3.1
Python Version: 2.7.1
Installed Applications:
('django.contrib.contenttypes',
'armstrong.core.arm_access',
'armstrong.core.arm_sections',
'armstrong.core.arm_wells',
'armstrong.core.arm_wells.tests.arm_wells_support',
'armstrong.apps.articles',
'armstrong.apps.content',
'south')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
101. request.path_info)
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
250. for pattern in self.url_patterns:
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/django/core/urlresolvers.py" in _get_url_patterns
279. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/django/core/urlresolvers.py" in _get_urlconf_module
274. self._urlconf_module = import_module(self.urlconf_name)
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
35. __import__(name)
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/armstrong/core/arm_wells/tests/arm_wells_support/urls.py" in
3. from armstrong import hatband as admin
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/armstrong/hatband/__init__.py" in
9. from .options import ModelAdmin, StackedInline, TabularInline
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/armstrong/hatband/options.py" in
5. from . import forms
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/armstrong/hatband/forms.py" in
4. from . import widgets
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/armstrong/hatband/widgets/__init__.py" in
6. from .ckeditor import CKEditorWidget
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/armstrong/hatband/widgets/ckeditor.py" in
5. class CKEditorWidget(widgets.Textarea):
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/armstrong/hatband/widgets/ckeditor.py" in CKEditorWidget
7. class Media:
File "/Users/tswicegood/.virtualenvs/armstrong/lib/python2.7/site-packages/armstrong/hatband/widgets/ckeditor.py" in Media
8. js = (''.join((settings.STATIC_URL, "ckeditor/ckeditor.js")),)

Exception Type: TypeError at /
Exception Value: sequence item 0: expected string, NoneType found