Skip to content

Commit

Permalink
fix django-cms#249 global name 'filer_settings' is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanfoulis committed Aug 28, 2012
1 parent 99625ac commit ee71421
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions filer/fields/file.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.text import truncate_words from django.utils.text import truncate_words
from filer.models import File from filer.models import File
from filer.settings import FILER_STATICMEDIA_PREFIX from filer import settings as filer_settings


import logging import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -54,7 +54,7 @@ def render(self, name, value, attrs=None):
# ForeignKeyRawIdWidget adds # ForeignKeyRawIdWidget adds
hidden_input = super(ForeignKeyRawIdWidget, self).render( hidden_input = super(ForeignKeyRawIdWidget, self).render(
name, value, attrs) name, value, attrs)
filer_static_prefix = FILER_STATICMEDIA_PREFIX filer_static_prefix = filer_settings.FILER_STATICMEDIA_PREFIX
if not filer_static_prefix[-1] == '/': if not filer_static_prefix[-1] == '/':
filer_static_prefix += '/' filer_static_prefix += '/'
context = { context = {
Expand Down Expand Up @@ -84,7 +84,7 @@ def obj_for_value(self, value):
return obj return obj


class Media: class Media:
js = (FILER_STATICMEDIA_PREFIX + 'js/popup_handling.js',) js = (filer_settings.FILER_STATICMEDIA_PREFIX + 'js/popup_handling.js',)




class AdminFileFormField(forms.ModelChoiceField): class AdminFileFormField(forms.ModelChoiceField):
Expand Down

0 comments on commit ee71421

Please sign in to comment.