2

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.

Ghopper21
  • 10,287
  • 10
  • 63
  • 92
Hafiz
  • 4,187
  • 12
  • 58
  • 111
  • Where do you use this setting in your code? – Tadeck Aug 11 '12 at 19:29
  • I didn't use it anywhere myself, if in old version there isn't any thing like that in my project then may be it would be something in other apps, I installed. As I remember I only used smart_select app. – Hafiz Aug 11 '12 at 19:35
  • 1
    You should see the exact location with the error. You may be right about this app - see Dirks answer. You can use newest development version. – Tadeck Aug 11 '12 at 22:13
  • @Tadeck thanks, this was what I wanted to konw, because I though that it was somewhere in django-generated code. thanks for clarification – Hafiz Aug 11 '12 at 22:17

2 Answers2

1

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.

Dirk Eschler
  • 2,539
  • 1
  • 21
  • 41
1

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.

Cerin
  • 60,957
  • 96
  • 316
  • 522