Re: Need help in converting the key value pairs of JSON data into data types.

2021-08-11 Thread Kasper Laudrup
On 11/08/2021 21.20, Franck Tchouanga wrote: > I can help you. > Help me with what? Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: Need help in converting the key value pairs of JSON data into data types.

2021-08-11 Thread Franck Tchouanga
I can help you. On Wed, Aug 11, 2021, 6:00 PM Kasper Laudrup wrote: > On 11/08/2021 15.54, chinna wrote: > > Hi All, > > > > I am actually working on a use case where I have to convert the JSON > > data into a dictionary and from that I will have to replace

Re: Need help in converting the key value pairs of JSON data into data types.

2021-08-11 Thread Kasper Laudrup
On 11/08/2021 15.54, chinna wrote: > Hi All, > > I am actually working on a use case where I have to convert the JSON > data into a dictionary and from that  I will have to replace all the > keys and values to the data types. The data type is returned as a string with t

Need help in converting the key value pairs of JSON data into data types.

2021-08-11 Thread chinna
Hi All, I am actually working on a use case where I have to convert the JSON data into a dictionary and from that I will have to replace all the keys and values to the data types. For example: input_dict = {'segment_idenifier': 'Segment 2', 'exposed_pipe_outside_diam': 4, 'exposed_pipe_length

How to parse JSON data in python and Django

2021-06-29 Thread Salima Begum
Hi all, >From below json data to parse this data to fetch categoryId and categoryName in four levels of data I used for loop for fetching data and inserting into database table. Is there any better way to do this in python and Django? Please Help me to achieve this. Let me know if you have

Re: JSON data

2020-05-24 Thread Saurabh Adhikary
data = [{"exped": "MA", "destin": "AL", "count": 2}, {"exped": "MA", "destin": "BS", "count": 1}] mylist = [] for a in data : mylist.append([a['exped'],a['destin'],a['count']]) On Sunday, 24 May 2020 17:16:46 UTC+5:30, HJ wrote: > > hello guys hope you are doing well > > I am trying to

JSON data

2020-05-24 Thread HJ
hello guys hope you are doing well I am trying to make a highchart but I found a problem in the view function so my chart doesn't show becuase of that view function def jsonDepend(request): dataset = mail_item_countries_depend.objects.all().values('exped','destin', 'count') data =

Re: How To Send Json data To Django

2020-03-16 Thread Harsh Tibrewal
if you send the code snippet i can help On Friday, March 13, 2020 at 9:27:28 PM UTC+5:30, venna venkatReddy wrote: > > Hi i am learing django, so i decided to do one small project on django is > that Exam type website. > > I Need Help, Regrading How To Send Json data To Djan

Re: How To Send Json data To Django

2020-03-14 Thread jitendra yadav
> +91 7011101001 > > On Fri, 13 Mar 2020 at 9:26 PM, venna venkatReddy < > vennavenkat...@gmail.com> wrote: > >> Hi i am learing django, so i decided to do one small project on django is >> that Exam type website. >> >> I Need Help, Regrading How To Sen

Re: How To Send Json data To Django

2020-03-13 Thread Desh Deepak
p, Regrading How To Send Json data To Django > > when i entering the question and answers from fronend. I successfult > stored on Local Storage in json formate, But Once click on clikc on submit > buten its need to send to backend models, > > How to send to that json local storag

How To Send Json data To Django

2020-03-13 Thread venna venkatReddy
Hi i am learing django, so i decided to do one small project on django is that Exam type website. I Need Help, Regrading How To Send Json data To Django when i entering the question and answers from fronend. I successfult stored on Local Storage in json formate, But Once click on clikc

Re: Sending json data to postgres once received from API

2020-02-13 Thread Ilya Rustamov
Thank you Jody, I will take a look at this and see how it goes. On Thursday, February 13, 2020 at 3:27:03 PM UTC-5, Jody Fitzpatrick wrote: > > Hello Ilya > > I would read the following: > > https://docs.djangoproject.com/en/3.0/topics/db/models/ > > Essentially, what you do in shell is what you

Re: Sending json data to postgres once received from API

2020-02-13 Thread Jody Fitzpatrick
Hello Ilya I would read the following: https://docs.djangoproject.com/en/3.0/topics/db/models/ Essentially, what you do in shell is what you would do in your code. I also believe you might want to look at how you are grabbing the posted data. I would use something like url =

Sending json data to postgres once received from API

2020-02-13 Thread Ilya Rustamov
Hey Devs, First time poster here, if I am missing anything or am not following general rules and practices feel free to let me know. I am in the process of building an app that asks user for a url and on submit makes post request to said url, receives json data and simply prints

Re: How to create model for this json data

2019-02-20 Thread 'Amitesh Sahay' via Django users
=50,null=True) appNamefield=models.ForeignKey("appNamefield", on_delete=models.CASCADE) class appNamefield(models.Model): appName = models.CharField(max_length=50,null=True) serializer class class appDetailsSearilizer(serializers.ModelSerializer): class Meta: model

Re: How to create model for this json data

2019-02-19 Thread optvisitor
CADE) class appNamefield(models.Model): appName = models.CharField(max_length=50,null=True) serializer class class appDetailsSearilizer(serializers.ModelSerializer): class Meta: model = keywordfield fields = ('id','keyword','appNamefield') json data {

RE: How to create model for this json data

2019-02-19 Thread Matthew Pava
...@gmail.com Sent: Tuesday, February 19, 2019 10:02 AM To: Django users Subject: How to create model for this json data Hi I have data like this { "Name" : "pk", "Applist" : ["zom","bc"], "Url": ["As","de"] } How to define

How to create model for this json data

2019-02-19 Thread optvisitor
Hi I have data like this { "Name" : "pk", "Applist" : ["zom","bc"], "Url": ["As","de"] } How to define field name for list I am not getting -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: serializers.serialize('json', data) return text

2019-02-12 Thread Jason
Check out JSONResponse -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

serializers.serialize('json', data) return text

2019-02-12 Thread Yossef Vecsler
hi, i am using: "serializers.serialize('json', data)" to make a json (i also use json.dumps in other cases). how can i make "serializers.serialize('json', data)" to return json to the js? because now i must make: ans = the ajax returns -> "serializers.serialize('

Re: Convert JSON data into structured data in an SQL database using Django ORM

2019-02-02 Thread Mark Phillips
MySQL and Postgres both support JSON fields directly, and have some searching capability built in for those fields. I don't think you have to use the django-jsonfield anymore. Check the MySQL and/or Postgres docs - https://dev.mysql.com/doc/refman/8.0/en/json.html

Convert JSON data into structured data in an SQL database using Django ORM

2019-02-02 Thread Parth Sharma
I am building a chatbot using Django with a MySQL backend. I have a `ChatSession` model which represents all the useful information to be stored after the end of a chat session . Now, it has a JSON field called `cc_data`(Implemented using

Re: Saving Json data from javascript

2018-02-13 Thread Etienne Robillard
I'm not really sure what you meant here. Anyways, there's plenty of good JS frameworks like jQuery to allow you to write Ajax functions to send a JSON array for post-processing in Django. Etienne Le 2018-02-13 à 08:34, Shazia Nusrat a écrit : Can you please show me any example about the

Re: Saving Json data from javascript

2018-02-13 Thread Shazia Nusrat
Can you please show me any example about the structure of code I've provided? Thanks On Tue, Feb 13, 2018 at 2:27 AM, Etienne Robillard wrote: > Hi Shazia, > > You can make a XHR (Ajax) request in javascript to send the data to a > django callback. > > HTH, > > Etienne > >

Re: Saving Json data from javascript

2018-02-13 Thread Etienne Robillard
Hi Shazia, You can make a XHR (Ajax) request in javascript to send the data to a django callback. HTH, Etienne Le 2018-02-12 à 18:04, Shazia Nusrat a écrit : Hi, Below is the code for Javascript from Django template Google Maps API. I need to be able to save this in my Django models

Saving Json data from javascript

2018-02-12 Thread Shazia Nusrat
Hi, Below is the code for Javascript from Django template Google Maps API. I need to be able to save this in my Django models with JSON response. I am new user so an example will be really a great help. Precisely I need to be able to save coordinates like latitude and longitude and then convert

Re: how to display JSON data in template

2016-06-27 Thread Stephen J. Butler
sha...@gmail.com> wrote: > Greetings, > > How can I access and display JSON data in a template html file? I am > getting the JSON data back in the javascript console as follows : > > I tried {{ jason_data }} but no luck. > > Thank you! > > Here is how I am returning t

how to display JSON data in template

2016-06-27 Thread ayshalab
Greetings, How can I access and display JSON data in a template html file? I am getting the JSON data back in the javascript console as follows : I tried {{ jason_data }} but no luck. Thank you! Here is how I am returning the json data in views.py: return HttpResponse(json_obj, content_type

Re: push yahoo finance json data into database

2015-06-09 Thread Oscar Buijten
Oh, here's a part of the model that I forgot to include. class MyichiHistoricalData(models.Model): id = models.IntegerField(db_column='ID', primary_key=True) # Field name made lowercase. symbol = models.CharField(max_length=10, blank=True, null=True) exchange =

Re: push yahoo finance json data into database

2015-06-09 Thread Oscar Buijten
Hi James, Thanks for such a detailed response. I looked at all your links (and already had come across some of them) I guess that my question wasn't specific enough :-( The table (and model) are existing. However, the keys that I retrieve in the output I shared do not correspond to (some of)

Re: push yahoo finance json data into database

2015-06-09 Thread Oscar Buijten
Hi James, Thanks for such a detailed response. I looked at all your links (and already had come across some of them) I guess that my question wasn't specific enough :-( The table (and model) are existing. However, the keys that I retrieve in the output I shared do not correspond to (some of)

Re: push yahoo finance json data into database

2015-06-08 Thread James Schneider
; > I have the following: > > snip --- What does your MyichiHistoricalData model look like? That will be the primary driver on how you extract the values into the right model attributes. If your (required) model fields exactly match the ones provided by your JSON data, creatin

push yahoo finance json data into database

2015-06-08 Thread Oscar Buijten
Hi there, The python learning curve seems to be steeper than expected :-( As yesterday, help converting my php app into python/django will be appreciated. I have the following: snip --- from django.core.management.base import BaseCommand, CommandError

Re: JSON data

2015-05-07 Thread Tim Chase
On 2015-05-07 22:32, Thorsten Sanders wrote: > Am 07.05.2015 17:37, schrieb Tim Chase: >> Can you provide sample JSON data that others can use >> for testing? Which version of Python are you using and which >> Python JSON library are you using? > > The version of

Re: JSON data

2015-05-07 Thread Thorsten Sanders
Am 07.05.2015 17:37, schrieb Tim Chase: On 2015-05-07 13:56, palansh agarwal wrote: processing of json is slow. It takes considerable amount of time to process data after calling the API. You seem fairly confident in this. Do you have the timing statistics? Can you provide sample JSON data

Re: JSON data

2015-05-07 Thread Tim Chase
On 2015-05-07 13:56, palansh agarwal wrote: > processing of json is slow. It takes considerable amount of time to > process data after calling the API. You seem fairly confident in this. Do you have the timing statistics? Can you provide sample JSON data that others can use for testing?

Re: JSON data

2015-05-07 Thread Thomas Levine
> which part is slow? the API, the processing of the JSON, or the > display? And here's how you can check that. Insert the following line between the different steps that Tim itemized, print(time.perf_counter()) subtract the numbers that get printed, and then determine which step is slow.

Re: JSON data

2015-05-06 Thread Tim Chase
On 2015-05-07 02:14, palansh agarwal wrote: > I am making a django app in which I require to read json data from > an external API and display data, But it's working very slowly. Any > suggestions to speed up the process will be appreciated. which part is slow? the API, the p

JSON data

2015-05-06 Thread palansh agarwal
Hello, I am making a django app in which I require to read json data from an external API and display data, But it's working very slowly. Any suggestions to speed up the process will be appreciated. Regards, -- PALANSH AGARWAL Y13UC185 Computer Science Engineering 2nd Year The LNM Institute

Re: Populating Django app db with JSON data

2015-03-06 Thread Collin Anderson
a good one > > > > > > On 03/02/2015 08:16 AM, Sandeep Murthy wrote: > >> Hi > >> > >> I've tried to get the answer to this question (which is a bit > open-ended) on stackoverflow without much success, which > >> is basically

Re: Populating Django app db with JSON data

2015-03-04 Thread Murthy Sandeep
; I've tried to get the answer to this question (which is a bit open-ended) on >> stackoverflow without much success, which >> is basically this: what is the recommended approach to populating a >> pre-existing Django app database table (generated >> from a model and

Re: Populating Django app db with JSON data

2015-03-02 Thread aRkadeFR
rently empty) with JSON data? There seem to be several alternatives given in the Django documentation (Django 1.7 manual) which include (1) fixtures, (2) SQL scripts, (3) data migrations. Of these I am a bit confused by the advice in the manual which suggests that (1) and (2) are only useful for l

Re: Populating Django app db with JSON data

2015-03-02 Thread aRkadeFR
) with JSON data? There seem to be several alternatives given in the Django documentation (Django 1.7 manual) which include (1) fixtures, (2) SQL scripts, (3) data migrations. Of these I am a bit confused by the advice in the manual which suggests that (1) and (2) are only useful for loading initial data

Populating Django app db with JSON data

2015-03-01 Thread Sandeep Murthy
the table with the JSON data. It seems that I need to write a custom data migration script that will insert the data into the table via the interpreter, and then I need to run python manage.py migrate. Is this the case, and if so, are there are examples that I could use? Thanks in advance for any

Re: Django sometimes shows partial (incomplete) json data in production env

2015-02-24 Thread Javier Guerra Giraldez
On Mon, Feb 23, 2015 at 11:54 PM, George Mejia wrote: > > Besides, this only happens on production env ... The code is fine and works > on production env, and the behaviour was normal before ... this also happens > for others queries (all only in production), I wonder what

Django sometimes shows partial (incomplete) json data in production env

2015-02-24 Thread George Mejia
I request some json data by some url, sometimes it works fine and *sometimes doesn't* ... I looked another related cuestion here <https://github.com/django-tastypie/django-tastypie/issues/799>, but it seems to recommend not change content-length by middleware ... my json data inco

Re: how to access json data value(s) returned back to django view from 'GET' request to an api

2015-02-07 Thread Henry Versemann
Scot, Thanks for the response. I will try it first thing Monday morning. If I have any other questions I may post them then, but this should get most of it for me. Thanks again. Henry On Saturday, February 7, 2015 at 1:35:39 AM UTC-6, Scot Hacker wrote: > > On Friday, February 6, 2015 at

Re: how to access json data value(s) returned back to django view from 'GET' request to an api

2015-02-07 Thread JSON CSV
' library (v. 2.4.3). Now in > addition to sending the raw response data back in an HttpResponse I would > also like to strip out some of the data and create a summary report of it, > to also send back in my HttpResponse. > > > In case you want to do ad-hoc reports based on JSON

Re: how to access json data value(s) returned back to django view from 'GET' request to an api

2015-02-06 Thread Scot Hacker
On Friday, February 6, 2015 at 9:39:00 AM UTC-8, Henry Versemann wrote: > > Scot, Thanks for the reply. OK I've gotten down to the point to where I > have my version of your json_data in your code below, but I'm not sure I > understand exactly what your code is doing, after you have the

Re: how to access json data value(s) returned back to django view from 'GET' request to an api

2015-02-06 Thread Henry Versemann
Thanks Larry. On Thursday, February 5, 2015 at 1:17:37 PM UTC-6, larry@gmail.com wrote: > > On Thu, Feb 5, 2015 at 2:10 PM, Henry Versemann > wrote: > > I have a django view (django v. 1.7 ; python v. 2.7.8) which currently > and > > successfully sends a request to

Re: how to access json data value(s) returned back to django view from 'GET' request to an api

2015-02-06 Thread Henry Versemann
Scot, Thanks for the reply. OK I've gotten down to the point to where I have my version of your json_data in your code below, but I'm not sure I understand exactly what your code is doing, after you have the json_data variable contents. In my case the first object of response data that I'm

Re: how to access json data value(s) returned back to django view from 'GET' request to an api

2015-02-06 Thread Scot Hacker
On Thursday, February 5, 2015 at 11:10:32 AM UTC-8, Henry Versemann wrote: > > I have a django view (django v. 1.7 ; python v. 2.7.8) which currently and > successfully sends a request to an api, and receives a good response back. > I'm sending and receiving using the 'requests' library (v.

Re: how to access json data value(s) returned back to django view from 'GET' request to an api

2015-02-05 Thread Larry Martell
On Thu, Feb 5, 2015 at 2:10 PM, Henry Versemann wrote: > I have a django view (django v. 1.7 ; python v. 2.7.8) which currently and > successfully sends a request to an api, and receives a good response back. > I'm sending and receiving using the 'requests' library (v.

how to access json data value(s) returned back to django view from 'GET' request to an api

2015-02-05 Thread Henry Versemann
I have a django view (django v. 1.7 ; python v. 2.7.8) which currently and successfully sends a request to an api, and receives a good response back. I'm sending and receiving using the 'requests' library (v. 2.4.3). Now in addition to sending the raw response data back in an HttpResponse I

Re: How to receive json data using HTTP POST request in Django 1.6?

2014-06-10 Thread Alok Singh Mahor
h Mahor wrote: >> >> Hi all, >> >> I am trying to receive JSON data using HTTP POST in django 1.6. >> I tried using request.POST['data'], request.raw_post_data, request.body >> but none is working for me. >> I have posted question and code at http://stackov

Re: How to receive json data using HTTP POST request in Django 1.6?

2014-06-10 Thread Malcolm Box
Simplest answer is to use Django Rest Framework, which makes this extremely easy. Malcolm On Monday, 9 June 2014 11:20:05 UTC+1, Alok Singh Mahor wrote: > > Hi all, > > I am trying to receive JSON data using HTTP POST in django 1.6. > I tried using request.POST['data'], reques

How to receive json data using HTTP POST request in Django 1.6?

2014-06-09 Thread Alok Singh Mahor
Hi all, I am trying to receive JSON data using HTTP POST in django 1.6. I tried using request.POST['data'], request.raw_post_data, request.body but none is working for me. I have posted question and code at http://stackoverflow.com/questions/24068576/how-to-receive-json-data-using-http-post

Re: How to call url and get json data

2013-10-21 Thread Sanjay Bhangar
Mahantesh, On Mon, Oct 21, 2013 at 3:48 PM, Mahantesh U <mahant.ullaga...@gmail.com> wrote: > Hi, > >How to call the below url in django in views file: > > > > http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=O-lzp4Hyqp8=json > > The above ap

How to call url and get json data

2013-10-21 Thread Mahantesh U
Hi, How to call the below url in django in views file: http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=O-lzp4Hyqp8=json The above api returns json data which further i need to use and fill those in html file. HttpResponse('http://www.youtube.com/oembed?url

Re: Extracting json data for parsing from HTTP GET

2013-04-02 Thread Eduardo Gonzalo Espinoza Carreon
I had the same problem. This worked for me, just wrting this because I couldn't find an answer in stackoverflow or other sites. +1 Thanks On Thursday, September 2, 2010 8:19:37 AM UTC-3, irum wrote: > > Thank you so much, it worked:)...Now I just have to play with parsing > json that I think

Re: How do i view json data returned from django

2012-03-01 Thread Bill Freeman
On Thu, Mar 1, 2012 at 8:29 AM, Shawn Milochik <sh...@milochik.com> wrote: > On 03/01/2012 07:48 AM, Stanwin Siow wrote: >> >> Hello, >> >> I want to view the actual json data from django view, is there anyway i >> can do that before i parse it into

Re: How do i view json data returned from django

2012-03-01 Thread Shawn Milochik
On 03/01/2012 07:48 AM, Stanwin Siow wrote: Hello, I want to view the actual json data from django view, is there anyway i can do that before i parse it into jQuery? Assuming that you have a dictionary named "return_data," this will do it: return HttpResponse(simplejson.dumps(r

How do i view json data returned from django

2012-03-01 Thread Stanwin Siow
Hello, I want to view the actual json data from django view, is there anyway i can do that before i parse it into jQuery? Below are my two methods def refresh_list(request): if request.method == 'POST': if 'name_input2' in request.POST: username = request.POST

Re: Bizarre QueryDict behavior grouping json data into a single key

2011-06-11 Thread Andres
On Jun 11, 3:59 pm, bruno desthuilliers wrote: > On 11 juin, 14:36, Andres wrote: > > > > > > > > > > > I'm experiencing a really bizarre behavior when using the test client > > in django. > > > I'm using a POST to send data to my django

Re: Bizarre QueryDict behavior grouping json data into a single key

2011-06-11 Thread bruno desthuilliers
On 11 juin, 14:36, Andres wrote: > I'm experiencing a really bizarre behavior when using the test client > in django. > > I'm using a POST to send data to my django app. I usually do this from > an iPhone app and/or a test html form. On the server side, this is how > I

Bizarre QueryDict behavior grouping json data into a single key

2011-06-11 Thread Andres
I'm experiencing a really bizarre behavior when using the test client in django. I'm using a POST to send data to my django app. I usually do this from an iPhone app and/or a test html form. On the server side, this is how I handle it: def handle_query(request): print request q

Re: how do i get access to json data?

2010-11-23 Thread alecx
Thanks for your answer Li. This solution works for python, I figured this out too. But how does this work inside a template with javascript? I use $.getJSON() inside the template to get the data. Inside the javascript I can access the data with: this.fields.name but this.fields.author does

Re: how do i get access to json data?

2010-11-23 Thread Li You
sorry but a mistake. On Tue, Nov 23, 2010 at 10:01 PM, Li You wrote: > Maybe this is what you want: > > from json import JSONDecoder > s = '''{ >    "pk": 1, >    "model": "store.book", >    "fields": { >        "name": "Mostly Harmless", >        "author": ["Douglas",

Re: how do i get access to json data?

2010-11-23 Thread Li You
Maybe this is what you want: from json import JSONDecoder s = '''{ "pk": 1, "model": "store.book", "fields": { "name": "Mostly Harmless", "author": ["Douglas", "Adams"] } } ''' d = JSONDecoder().decode(s) print a['fields']['author'] On Tue, Nov 23, 2010 at 9:45

how do i get access to json data?

2010-11-23 Thread alecx
Hello django users, after several try outs, i am not able to figure out how to access data in a serialized object. E. g. how do I get the name "Douglas", "Adams" in the example: http://docs.djangoproject.com/en/dev/topics/serialization/#deserialization-of-natural-keys In javascript i can get e.

Re: Extracting json data for parsing from HTTP GET

2010-09-02 Thread irum
Thank you so much, it worked:)...Now I just have to play with parsing json that I think I can manage. Thanks again:) Irum On Sep 2, 1:11 pm, Daniel Roseman wrote: > On Sep 2, 10:37 am, irum wrote: > > > > > Hi, > > Thanks for your prompt reply. >

Re: Extracting json data for parsing from HTTP GET

2010-09-02 Thread Daniel Roseman
On Sep 2, 10:37 am, irum wrote: > Hi, > Thanks for your prompt reply. > I have tried both the things but I get the same error. > With, > x = json.loads(p.read()) >            print x > > I get following error:  'HttpResponse' object has no attribute > 'read' > Also I get

Re: Extracting json data for parsing from HTTP GET

2010-09-02 Thread irum
l.com> wrote: > > > > > Hi, > > I am having problems with extracting json data  for parsing from HTTP > > GET request. > > > What I am doing is that I am receiving json data over HTTP via GET. > > After debugging much, I have realized that the data also h

Re: Extracting json data for parsing from HTTP GET

2010-09-02 Thread Daniel Roseman
On Sep 2, 9:57 am, irum <irumrauf...@gmail.com> wrote: > Hi, > I am having problems with extracting json data  for parsing from HTTP > GET request. > > What I am doing is that I am receiving json data over HTTP via GET. > After debugging much, I have realized that the data

Extracting json data for parsing from HTTP GET

2010-09-02 Thread irum
Hi, I am having problems with extracting json data for parsing from HTTP GET request. What I am doing is that I am receiving json data over HTTP via GET. After debugging much, I have realized that the data also has HTTP headers and other information that serializer is not able to deserialize

Re: Passing JSON data

2010-06-02 Thread Simone Dalla
2010/6/2 ravi krishna <ravi.9...@gmail.com> > Hi, > I am a newbie with Python n Django programming. Can somebody tell me some > easy methods for passing the Json data to the html page as arguments. I have > the Json converted data stored in a variable. Now need to print th

Passing JSON data

2010-06-02 Thread ravi krishna
Hi, I am a newbie with Python n Django programming. Can somebody tell me some easy methods for passing the Json data to the html page as arguments. I have the Json converted data stored in a variable. Now need to print those data in html. while searching found some methods like using eval

Re: want to convert object to json data.

2010-02-09 Thread bruno desthuilliers
On Feb 9, 10:40 am, chiranjeevi muttoju <chiru.bt...@gmail.com> wrote: > hi waine, > Thanks for ur reply. i got that. is there is any way to parse regular class > objects(not model objects) to json data.. As documented, Django's json serialization is done using a bundled versio

Re: want to convert object to json data.

2010-02-09 Thread chiranjeevi muttoju
hi waine, Thanks for ur reply. i got that. is there is any way to parse regular class objects(not model objects) to json data.. if u know please reply. On Tue, Feb 9, 2010 at 12:17 PM, Wayne Koorts <wkoo...@gmail.com> wrote: > > I want to convert a given regular object to json ob

Re: want to convert object to json data.

2010-02-08 Thread Wayne Koorts
> I want to convert a given regular object to json object. i.e. I want > to create a function which takes the class object as parameter and it > should return the json object. Have a look at the built-in Django "serializers" module:

want to convert object to json data.

2010-02-08 Thread chiranjeevi.muttoju
Hi all, I want to convert a given regular object to json object. i.e. I want to create a function which takes the class object as parameter and it should return the json object. If anybody know please help me how to approach to get this. Thanks and regards, --chiranjeevi -- You received this

Re: import json data into my django app

2010-01-17 Thread Bayuadji
>> I need to create a cron job that fetches json data from a URL, parses >> it (presumably using simplejson) and then load the data into my >> database using the Django models I've defined. >> >> I'm having trouble finding any tips, examples, or documentation on how &g

Re: import json data into my django app

2010-01-17 Thread nek4life
On Jan 17, 4:58 pm, lance <lan...@gmail.com> wrote: > Python/Django newbie question: > > I need to create a cron job that fetches json data from a URL, parses > it (presumably using simplejson) and then load the data into my > database using the Django models I've defined. &

import json data into my django app

2010-01-17 Thread lance
Python/Django newbie question: I need to create a cron job that fetches json data from a URL, parses it (presumably using simplejson) and then load the data into my database using the Django models I've defined. I'm having trouble finding any tips, examples, or documentation on how to do

Re: HTML Escaping JSON data?

2008-06-17 Thread John
If the part of the page being changed is complex, the easiest way to do this is to call render_to_response as usual, but with the template containing only a instead of a full HTML page. Handle any escaping needed in the template. If you only want to update the text without adding any markup,

Re: HTML Escaping JSON data?

2008-06-16 Thread Knifa
I'll try explain a little better, then. I'm trying to make a Quote Database, and trying to make it so switching between pages uses AJAX, loading them without refreshing. I grab the Quote objects and serialize them to JSON so jQuery can read it. Everything works fine, but the the quote field

Re: HTML Escaping JSON data?

2008-06-16 Thread joshuajonah
Exactly, it sounds like there is a smarter way to do what your attempting here. On Jun 16, 12:59 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > What exactly are you trying to do? Are you worried about people entering > html into the form fields and having that saved to the database? If so, >

Re: HTML Escaping JSON data?

2008-06-16 Thread Richard Dahl
What exactly are you trying to do? Are you worried about people entering html into the form fields and having that saved to the database? If so, Django's ORM escapes this for you when saving to the DB. you can use jQuery's ajax functions to submit the form, and do normal form validation with

Re: HTML Escaping JSON data?

2008-06-16 Thread joshuajonah
This should work: http://discuss.fogcreek.com/dotnetquestions/default.asp?cmd=show=5015 On Jun 16, 12:26 pm, Knifa <[EMAIL PROTECTED]> wrote: > Err, nevermind that actually. It didn't seem to work. > > By escaping I mean like turning < into and > into etc like > the "escape" filter does. > >

Re: HTML Escaping JSON data?

2008-06-16 Thread Knifa
Err, nevermind that actually. It didn't seem to work. By escaping I mean like turning < into and > into etc like the "escape" filter does. On Jun 16, 5:22 pm, Knifa <[EMAIL PROTECTED]> wrote: > Oh damn, I should have probably looked around a bit more, heh. I'm not > really used to JS yet. > >

Re: HTML Escaping JSON data?

2008-06-16 Thread Knifa
Oh damn, I should have probably looked around a bit more, heh. I'm not really used to JS yet. Thanks very much! On Jun 16, 5:09 pm, joshuajonah <[EMAIL PROTECTED]> wrote: > I'm not really catching what you're doing here. You want to escape > html with javascript? Just use escape() > > On Jun

Re: HTML Escaping JSON data?

2008-06-16 Thread joshuajonah
I'm not really catching what you're doing here. You want to escape html with javascript? Just use escape() On Jun 16, 11:31 am, Knifa <[EMAIL PROTECTED]> wrote: > Hello there. > > I'm using Serialization with JSON to pass data to jQuery. Everything > is working fine, except that the data for the

HTML Escaping JSON data?

2008-06-16 Thread Knifa
Hello there. I'm using Serialization with JSON to pass data to jQuery. Everything is working fine, except that the data for the fields of my model are not escaped, allowing people to use HTML on my app. There isn't a function as such in jQuery to do this (and I'm unsure if there is a built in