jezdez / django-staticfiles

[Unmaintained] A Django app that provides helpers for serving static files, used in Django and Pinax.

Home Page:http://django-staticfiles.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Django 1.2.7 doesn't work with django-staticfiles 1.2.1

pabluk opened this issue · 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!