Comment 5 for bug 348288

Revision history for this message
artur mwaigaryan (mwai53) wrote :

Bug Descritption:

SyntaxError at /admin/
EOL while scanning string literal (admin.py, line 6)
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.3
Exception Type: SyntaxError
Exception Value:
EOL while scanning string literal (admin.py, line 6)
Exception Location: /usr/local/lib/python2.6/dist-packages/django/utils/importlib.py in import_module, line 35

and here is the admin.py file:
from django.contrib import admin
from django import forms

from form_utils.fields import ClearableFileField

class ClearableFileFieldsAdmin(admin.ModelAdmin):

    def formfield_for_dbfield(self, db_field, **kwargs):
        field =
        super(ClearableFileFieldsAdmin,self).formfield_for_dbfield(
            db_field, **kwargs)
        if isinstance(field, forms.FileField):
            field = ClearableFileField(field)
        return field