Hi Sonal,

On 27 aug, 14:13, Sonal Breed <sonal.br...@gmail.com> wrote:

> I have django-tinymce spellchecker working perfectly on my local
> machine which is Ububtu.
> But as soon as, I deploy it on a web host (CentOS), it gives me
> problems. Specifically, when I click the specllchecker button,
> following errors are logged:
>
> [...]
>
>  File "/home/mygoplanner/webapps/mygostaging/mygo/tinymce/views.py",
> line 69, in spell_check
>    return HttpResponse(simplejson.dumps(output),
>
> UnboundLocalError: local variable 'output' referenced before
> assignment

Looking at the code, I don't see how the spell_check function could
throw that Error. I have just one idea: can you move the last return
statement:

    return HttpResponse(simplejson.dumps(output),
        content_type='application/json')

into the try block, just after the assignment of the output variable:

        output = {
            'id': id,
            'result': result,
            'error': None,
        }
        return HttpResponse(simplejson.dumps(output),
            content_type='application/json')


Regards,

Joost
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to