django-staticfiles icon indicating copy to clipboard operation
django-staticfiles copied to clipboard

Django 1.2.7 doesn't work with django-staticfiles 1.2.1

Open pabluk opened this issue 12 years ago • 0 comments

I have a problem with django-staticfiles-1.2.1 and django-1.2.7 using get_static_prefix templatetag, it doesn't return my STATIC_URL setting. But with the same configuration and django-staticfiles-1.1 it's works.

I test it with 2 isolated virtualenvs and a fresh install of Django and staticfiles

My settings.py:

INSTALLED_APPS = [
    # ...
    "staticfiles",
]
STATIC_URL = '/static/'

Virtualenv 1:

$ pip freeze
Django==1.2.7
argparse==1.2.1
distribute==0.6.24
django-staticfiles==1.1
wsgiref==0.1.2

Here, as expected, I get u'/static/'

$ python manage.py shell
>>> from django.template import Template, Context
>>> t = Template("""{%load static %}{% get_static_prefix %}""")
>>> t.render(Context({}))
u'/static/'

Virtualenv 2:

$ pip freeze
Django==1.2.7
argparse==1.2.1
distribute==0.6.24
django-appconf==0.5
django-staticfiles==1.2.1
wsgiref==0.1.2

Here's the problem, I get u''

$ python manage.py shell
>>> from django.template import Template, Context
>>> t = Template("""{%load static %}{% get_static_prefix %}""")
>>> t.render(Context({}))
u''

Is it normal? and do I need to change my settings?

Cheers!

pabluk avatar Jun 06 '12 14:06 pabluk