You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi
I'm outputing XML from Django and it's having an undesired effect of
an additional carriage return when it's read by my Flash website.
Flash reads a line break as follows:
<copy><![CDATA[This is paragraph 1
This is paragraph 2]]></copy>
The ouputed text from Flash would be:
This is paragraph 1
This is paragraph 2
However Django is exporting (by design) like this:
<copy><![CDATA[This is paragraph 1
This is paragraph 2]]></copy>
And the outputed text from Flash has the additional line feed:
This is paragraph 1
This is paragraph 2
Is there a way to alter this in Django? The current hack is to remove
the line feed between paragraphs when entering copy in the Admin
tool. But that's not a great solution. I also get the same problem
when I use a wrapper protocol (AMF) so I know it's not the way I'm
constructing the XML / it's being read.
Thanks,
Ben
shocks
unread,
Mar 15, 2008, 4:53:23 AM3/15/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Sorry - in this Django example it should be:
This is paragraph 1
This is paragraph 2
shocks
unread,
Mar 15, 2008, 4:54:40 AM3/15/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
OK - Google is removing the extra line feed! But I think you get what
I'm talking about... :)
Malcolm Tredinnick
unread,
Mar 15, 2008, 5:02:32 AM3/15/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
On Sat, 2008-03-15 at 01:51 -0700, shocks wrote: [...]
> Is there a way to alter this in Django?
We can't read minds and you don't explain how you are generating the output from Django. So you'll need to include some more information.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Well there's not a whole lot of mind reading to be done. As I said I
tried it with AMF so I'm using an RPC to get the object from Django
and the gateway method is returning the line feed (as it should
because that's what is in the text field in the admin tool). What I
ended up doing it using a regular expression to remove the line
feed.