Young-gyu Park wrote:
> Do you have anything which you want to let me know, when I develop the
> ajax application by Django?
Well, it's off topic for this list, and I don't really want to be a
JavaScript / AJAX tutor, but I will say that it is easy to serve JSON
directly from a Django view and
Yes, It works.
Thank you so much kent.
you make the time when I spent two days for solving this problem useless.
you are genious ^^
Why I didn't know that *"from django.utils.simplejson import dumps" !!!*
Do you have anything which you want to let me know, when I develop the ajax
application
Young-gyu Park wrote:
> fileHandle = open (
> '/var/chroot/www/htdocs/django/js/model.js', 'w' )
> fileHandle.write( codecs.BOM_UTF8 )
> print >> fileHandle, 'var blog = '
> print >> fileHandle, blog
> fileHandle.close()
>
> This is t
user = User.objects.get(userID__exact=user_id)
user.blog_set.all()
blogData = user.blog_set.get(id__exact=user.id)
section_list = blogData.section_set.all()
latest_content_list = blogData.content_set.all
().order_by('-pub_date')[:5]
blog = dict()
Young-gyu Park wrote:
> fileHandle = open (
> '/var/chroot/www/htdocs/django/js/model.js', 'w' )
> fileHandle.write( codecs.BOM_UTF8 )
> print >> fileHandle, 'var blog = '
> print >> fileHandle, blog
> fileHandle.close()
>
>
> this
Yes I did
I added the locale code at the top of my python code.
What I want to do is that I want to convert to python dict to javascript
associative array.
and I will get the javascript array to display in the html page.
But the korean letter which is in the python dict is displayed raw format
>I input the data which is from the database into array.
> and then I print out the array to the file
> but the letter I can not figure out.
>
>> fileHandle = open (
>> '/var/chroot/www/htdocs/django/js/model.js',
>> 'w' )
>> fileHandle.write( codecs.BOM_UTF8 )
>> print >>
I input the data which is from the database into array.
and then I print out the array to the file
but the letter I can not figure out.
fileHandle = open ( '/var/chroot/www/htdocs/django/js/model.js',
'w' )
fileHandle.write( codecs.BOM_UTF8 )
print >> fileHandle, 'var