Django 1.4 deprecates ADMIN_MEDIA_PREFIX but my project was started using Django 1.3 so having issue while using in Django 1.4

StackOverflow https://stackoverflow.com/questions/11917005

Pregunta

I started a project in Django 1.3 and have recently installed Django 1.4 on another machine and continued my project on Django 1.4.

Django 1.4 deprecated the ADMIN_MEDIA_PREFIX setting so I removed it, but now there is some other error that settings.ADMIN_MEDIA_PREFIX is not found. So what I can do to make my project work fine with Django 1.4?

Thanks in advance guys.

¿Fue útil?

Solución

If you don't use this setting anywhere in your code or template it can only be raised by a reusable app.

As you mentioned the smart_select app, you might want to have a look at this changeset.

Otros consejos

You could try using the builtin staticfiles app. I fixed the same error by replacing:

{% admin_media_prefix %}

with:

{% static 'admin' %}

And you'll need to place {% load staticfiles %} at the top of the template.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top