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
Bug Descritption:
SyntaxError at /admin/ 127.0.0. 1:8000/ admin/ lib/python2. 6/dist- packages/ django/ utils/importlib .py in import_module, line 35
EOL while scanning string literal (admin.py, line 6)
Request Method: GET
Request URL: http://
Django Version: 1.3
Exception Type: SyntaxError
Exception Value:
EOL while scanning string literal (admin.py, line 6)
Exception Location: /usr/local/
and here is the admin.py file:
from django.contrib import admin
from django import forms
from form_utils.fields import ClearableFileField
class ClearableFileFi eldsAdmin( admin.ModelAdmi n):
def formfield_ for_dbfield( self, db_field, **kwargs):
super( ClearableFileFi eldsAdmin, self).formfield _for_dbfield(
db_ field, **kwargs) eld(field)
field =
if isinstance(field, forms.FileField):
field = ClearableFileFi
return field