hey all
I have a model which is as such:
*in models.py*
class ConditionSet(models.Model):
model_name =models.CharField(max_length=50)
model_attribute =models.CharField(max_length=50)
operator =models.CharField(max_length=50,
choices=OPERATORS)
val
On Jun 7, 8:53 pm, nissu wrote:
> Hello list,
>
> I'm looking for info on how to deserialize something like this:
>
> {
> "pk": 1,
> "model": "store.book",
> "fields": {
> "name": "Mostly Harmless",
> "author": ["Douglas", "Adams"]
> }
>
>
Hello list,
I'm looking for info on how to deserialize something like this:
{
"pk": 1,
"model": "store.book",
"fields": {
"name": "Mostly Harmless",
"author": ["Douglas", "Adams"]
}
into a django object
Any help will be appreciated :)
regards,
Genis
--
You
i have attached my json result(http://dpaste.com/12719/) and the view(
http://dpaste.com/12718/) that i use to get this result and pass it to the
html page called 'results.html' , i am trying to get all the fields to
displayed in the html page, but unable to access it, how can i use
simplejson in
Without seeing your code, it's hard to know what's happening. It
sounds like you're having a problem using JSON objects with
javascript, so I'll try and throw out a short example and see if that
helps. If this doesn't do it for you, put up the actual javascript
that's causing you the trouble, and
yes, u have understood my problem correctly but the JSON object is not
recognized in the html page so if i try to say something like
list.name(where list has my JSON and name is its one of the values
present in that
list) then it doesnt get recognized, is gives me Type mismatch error , is
there
If I understand correctly, that sounds reasonably doable - what is
your question? Taking JSON from whatever source and generating a form
in HTML is pretty much straight javascript and/or templating.
-joe
On 6/20/07, cess <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>I am very new to the Django
7 matches
Mail list logo