Thanks now it works
Luca

On 25 Ago, 15:12, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Aug 25, 2:07 pm, luca72 <lucabe...@libero.it> wrote:
>
> > Hello i have this:
> > errore = """<script type="text/javascript">
> >                     { alert('test_js')};
> >                     </script>"""
> > return mark_safe(errore)
> > I get this error : AttributeError: 'SafeString' object has no
> > attribute 'status_code'
> > can you help me to write the correct one?
> > Thanks
>
> > Luca
>
> You don't say where you're using this, but if it's in a view, you must
> always return an HttpResponse, not just a string. So try:
>     return HttpResponse(mark_safe(errore))
> --
> DR.
--~--~---------~--~----~------------~-------~--~----~
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