The code runs and all fields except the manytomany field is written into
the mysql database. I am posting json to the django backend which will be
written into the database. For more information:
https://stackoverflow.com/questions/71849923/django-serializer-inserting-nothing-into-database-no-er
models.CharField(max_length=30)
> in_stock = models.BooleanField()
>
>
> With this Topping model, I can use the Prefetch object:
>
> pizzas = Pizza.objects.all().prefetch_related(
> Prefetch('toppings', queryset=Topping.objects.
> filter(in_stock
w everything works as expected (even the serialization). But my
problem begins when I try to do the same stock control with the Pizza
object. Just like I did with Topping, I will also add the in_stock field to
the Pizza Model. The new Pizza Model then is:
class Pizza(models.Model):
name = mode
hing else would have
worked I could have paginated or something similar, but the second is more
difficult.
The main problem here is the JOIN after `prefetch_related` queries. As the
profiling shows something strange happens before serialization and Django
is using ridiculous amount of time fo
ake the JOIN.
But it makes a lot more sense now with the mobile and offline requirements, why
you have
setup the API the way you did. Two more thourghts for you:
- Use a cacheable dataset and incremental updates to be done "when wifi or
better is available".
Complex, but worth
I'm guessing here that REST would not be the appropriate to handle
"large" amounts of data, and probably that's why Melevyn suggested to
use pagination.
If your customer needs such data to be used off-line, I bet that would
be better to generate a file in the appropriate format, compact it and
ne 11, 2017 at 4:57:22 PM UTC+2, Miika Huusko wrote:
>
> I have a performance problem with Django + Django REST Framework. The
> problem is that it takes Django very, very long time to handle SQL query
> response + DRF serialization take quite some time also. It happens when
> there
On Sunday 11 June 2017 13:41:55 Miika Huusko wrote:
> @Melvyn Sopacue, I opt to use prefetch_related because I'm fetching
> "Items" that are used as ForeignKey for "Photos" and "Events".
> Select_related is meant for cases where you have OneToOne of
> ForeignKey relation (single item) that you nee
There must be some kind of extra looping or cloning
going on when performing Python level JOIN for prefetched Photos or other
related sets.
On Sunday, June 11, 2017 at 4:57:22 PM UTC+2, Miika Huusko wrote:
>
> I have a performance problem with Django + Django REST Framework. The
> probl
On Sunday 11 June 2017 09:15:09 Miika Huusko wrote:
> Thanks for response!
>
> Yep, timing with "time" is not the best way to go to compare SQL query
> times. The reason I added that "time" test is that in Stack Overflow
> I was asked to confirm that data transfer is not factor here. I timed
> SQL
uot;photos_photo"."note_id" IN (349527, 349528, 349529, *... and rest of
the 40k IDs ...* );
Quite simple quries. Timing shown in django.db.backends logs is what
those queries take when executed manually with psql (1252 ms + 883
ms). That results simple profiling info:
Datab
le quries. Timing shown in django.db.backends logs is what those
queries take when executed manually with psql (1252 ms + 883 ms). That
results simple profiling info:
Database lookup | 20.4447s
Serialization | 3.3821s
Django request/response | 0.3419s
API view
being on a Perl related blog, the
concepts on the post are applicable everywhere.
Em 11/06/2017 07:06, Miika Huusko escreveu:
I have a performance problem with Django + Django REST Framework. The
problem is that it takes Django very, very long time to handle SQL
query response + DRF serialization
. you see, you want to get 10k to
50k items... that's a lot (to serialize too).
Em 11/06/2017 07:06, Miika Huusko escreveu:
I have a performance problem with Django + Django REST Framework. The
problem is that it takes Django very, very long time to handle SQL
query response + DRF serializ
I have a performance problem with Django + Django REST Framework. The
problem is that it takes Django very, very long time to handle SQL query
response + DRF serialization take quite some time also. It happens when
there are ManyToMany or OneToMany relations and nested objects. Sounds like
&q
Hi!
Ludovic, Melvyn, thank you for your responses. I could not make Melvyn's
example work for me, but it put me on the right track.
Solution: right under the "reset the one time password" comment, add the
line "user.backend = 'path.to.OneTimePasswordBackend' ", and everything
works as it shoul
On Monday 05 June 2017 04:14:01 Alison P wrote:
> If I use the default session serializer, I get the following error:
> TypeError at /login/
>
> is not JSON serializable
I'm using this is a general solution. Feel free to strike what you don't need.
The basics is that a JSONEncoder knows primiti
I don't see where in your code the error happen.
With standard python, you can't add a method on your class to make is
JSON serializable. At least to my knowledge. You have to write your
own serializer and instruct the code turning your object into JSON to
use it.
But there are a few easier alter
Hi everyone,
I have written a custom authentication backend, the code is below. It
allows a user to click "email me a one-time password" on the home page,
which is saved on the "Person" model (which extends User through a foreign
key) and then log in with that password. This backend verifies th
Hi All,
Apologize if this question has been asked before. This is my first question
into this mailing list.
I am creating a custom field(MyCustomField) with a custom value
class(MyValue). I do have a deconstruct() method for my *field* class. And
I would like to have a default value of this fiel
like Mario suggested.
> > >> You can read the documentation on how to escape or unescape stuff in
your
> > >> template.
> > >
> > > Thank you, guys. It works.
> > > Now I need to figure out why I still don't see my data in the jQWidget
> > > con
ed.
> >> You can read the documentation on how to escape or unescape stuff in your
> >> template.
> >
> > Thank you, guys. It works.
> > Now I need to figure out why I still don't see my data in the jQWidget
> > control (jqxGrid)...
> >
> &g
;t see my data in the jQWidget
> > control (jqxGrid)...
> >
> > Anybody familiar with this library?
> >
> > Thank you.
> >>
> >>>
> >>> On 18/01/2014 4:53 pm, "Igor Korot" wrote:
> >>>>
> >>>> Hi, ALL
Grid)...
>
> Anybody familiar with this library?
>
> Thank you.
>>
>>>
>>> On 18/01/2014 4:53 pm, "Igor Korot" wrote:
>>>>
>>>> Hi, ALL,
>>>> I'd like someone to help me understand this situation.
>>
Grid)...
Anybody familiar with this library?
Thank you.
>
>>
>> On 18/01/2014 4:53 pm, "Igor Korot" wrote:
>>>
>>> Hi, ALL,
>>> I'd like someone to help me understand this situation.
>>> Looking at the page:
>>> https:
ol (jqxGrid)...
Anybody familiar with this library?
Thank you.
>
>>
>> On 18/01/2014 4:53 pm, "Igor Korot" wrote:
>>>
>>> Hi, ALL,
>>> I'd like someone to help me understand this situation.
>>> Looking at the page:
>>> https:/
documentation on how to escape or unescape stuff in your
template.
>
> On 18/01/2014 4:53 pm, "Igor Korot" wrote:
>>
>> Hi, ALL,
>> I'd like someone to help me understand this situation.
>> Looking at the page:
https://docs.djangoproject.com/en/dev/top
In your template try {{usb_data|safe}}
On 18/01/2014 4:53 pm, "Igor Korot" wrote:
> Hi, ALL,
> I'd like someone to help me understand this situation.
> Looking at the page:
> https://docs.djangoproject.com/en/dev/topics/serialization/ the part
> which says "Se
Hi, ALL,
I'd like someone to help me understand this situation.
Looking at the page:
https://docs.djangoproject.com/en/dev/topics/serialization/ the part which
says "Serialization formats->JSON" there is an example of how the data
would be serialized.
The sample uses
On 4-7-2012 1:13, natasha.ba...@utoronto.ca wrote:
> On Tuesday, July 3, 2012 5:55:32 PM UTC-4, ke1g wrote:
>>
>> In fact, I think dumpdata takes an app name, not a table or model name.
No it doesn't. It can take a app.model name as well and is more commonly
used, since the primary use case for du
Hm, I think the functionality to do this -- at least if I understand
correctly what I read
here:
http://stackoverflow.com/questions/1113096/django-dump-data-for-a-single-model
I'd be fine dumping the data for the entire app -- but the reason I did it
this way is because when I do this, the cat
In fact, I think dumpdata takes an app name, not a table or model name.
On Tue, Jul 3, 2012 at 5:54 PM, Bill Freeman wrote:
> I think that you have to dumdata one or both of the models at the ends
> of the many to many,
> and the join table will come along for free.
>
> On Tue, Jul 3, 2012 at 3:2
I think that you have to dumdata one or both of the models at the ends
of the many to many,
and the join table will come along for free.
On Tue, Jul 3, 2012 at 3:21 PM, natasha.ba...@utoronto.ca
wrote:
> Hi All,
>
> I'm trying to dump the contents of a table which is the mapping for a
> many-to-m
Hi All,
I'm trying to dump the contents of a table which is the mapping for a
many-to-many field.
The table is called Part and it has a ManytoManyField called
category_id.
When I run python manage.py dumpdata store.part_category_id >
file.json
I get the error Error: Unable to serialize database
ML format
> > then I get the following (for the two tables in question):
>
> > ---
> > - fields: {date: 2012-03-26, name: test 1}
> > model: TempDB.test
> > pk: 1
> > - fields: {date: 2012-03-26, name: test
test 2]
> model: TempDB.instance
> pk: 1
> ---
>
> This is roughly what I would expect to see, although the documentation
> does not explicitly state that a manytomany serialization will be a
> multi-element list,
ect to see, although the documentation
does not explicitly state that a manytomany serialization will be a
multi-element list, it seems to be a reasonable assumption.
When I try to perform a loaddata with this output (and after manually
deleting the tables from the admin interface, to be sure).
On 03/06/2012 09:52 PM, shiji bijo wrote:
ok I have removed the json.dumps() now the view is
def do_GET(self, offset):
data=get_object_or_404(NewAuction,pk=offset)
context=serializers.serialize("json",[data])
return render_to_response("index.html",{"context":context})
an
ok I have removed the json.dumps() now the view is
def do_GET(self, offset):
data=get_object_or_404(NewAuction,pk=offset)
context=serializers.serialize("json",[data])
return render_to_response("index.html",{"context":context})
and my index.html is
{% extends 'base.html' %
On Tuesday, 6 March 2012 19:14:55 UTC, angel wrote:
>
> I am new to django and doing my course project. I am searching for a
> solution for iterating JSON dictionary in html page. My django view
> is the following:
>
> def do_GET(self, offset):
> data=get_object_or_404(NewAuction,pk=o
thanks for the reply. In our course project it is a requirement to use
serialised data for CRUD and display it on the html page.But we are not
allowed to use the REST frameworks.I tried using return
Httpresponse(serialiseddata). But i dont know where to write the javascript
code
On Tue, Mar 6, 201
If you are returning json it seems more proper to me to parse it using
JavaScript.
Why exactly do you return json but not a normal dict/object?
--
eng. Ilian Iliev
Web Software Developer
Mobile: +359 88 66 08 400
Website: http://ilian.i-n-i.org
On Tue, Mar 6, 2012 at 9:14 PM, angel wrote:
>
I am new to django and doing my course project. I am searching for a
solution for iterating JSON dictionary in html page. My django view
is the following:
def do_GET(self, offset):
data=get_object_or_404(NewAuction,pk=offset)
context=serializers.serialize("json",[data])
d
Thank you a lot for this snippet!
I've wondered about how to export objects to excel in a "more natural way"
and this seems to be a great approach, considering all the different
gotchas.
Thank you for taking the time to write this.. I've been postponing this
little bit of research for the longest
Thank you for the suggestion.
I actually ended up extending Django's json serializer. Here is the
code in case you or someone else needs to do something like this.
from django.core.serializers.json import Serializer as JsonSerializer
from django.utils.encoding import is_protected_type
class Displ
On Mon, Aug 15, 2011 at 5:58 PM, Christo Buschek wrote:
> Hi list,
>
> I'm busy writing a custom json serializer for django. It works very
> good, only now I want to serialize ForeignKey and M2M relations inside
> the same serialization call and build nested json ob
Hi list,
I'm busy writing a custom json serializer for django. It works very
good, only now I want to serialize ForeignKey and M2M relations inside
the same serialization call and build nested json objects with all model
instances that the current model instance relates to.
{'field_
> The response is something like:
> 'Content-Type: text/html; charset=utf-8\n\n[{"pk": 1, "model":
> "MyApp.foo", "fields": {"choice_field": "db_name1"}}]'
This is interesting.. But I think the serializer is working properly.
the first element in the tuple is the value stored in the database,
and
Hello,
I'm new to Django and having a problem with serialization.
I am trying to serialize a model that has a CharField with choices,
and the json serializer returns json with the choices' database values
instead of display values.
Is there a way to get the json serializer to use the
difficult to maintain.
We need the following features:
* large, multi-page form (too many fields to fit on one page)
* dynamic forms (ability to add more fields on demand)
* non-sequential entry (users can jump back and forth filling it in)
* serialization (the serialized output is sent to
say into session data,
or into database fixtures, and they are really designed to be read by the
deserializers when the object needs to be reconstructed.
If you are passing data from Django to a browser's JavaScript thread using
JSON, then you probably want to either
1. Use an API framewo
I'm using AJAX, jquery and JSON for the first time, having used
templates to render XML for Flex/Flash in all my previous Django work.
My code looks like this
records = models.Residents.objects.extra( where=[], params=[...])
data = serializers.serialize('json', records, ensure_ascii=False,
fie
>
> class Serializer(PythonSerializer):
> def end_object(self, obj):
> self.objects.append({
> "fields" : self._current
> })
> self._current = None
>
>
I've made a small mistake I was importing PythonSerializer while It should've
been JsonSerializer
C
>
> Your idea of overriding the Serializer class sounds like a better idea to me.
> It should be possible (and will be interesting) ,I'll think I'll look into
> that tonight.
Overwriting django's default serializers is possible.
This is how I've done it:
In the root of my django project:
mkd
age : http://pypi.python.org/pypi/any2any/0.1
You can achieve very easily the format you need. Please ask if you
need help !
Cheers,
Sébastien
On May 19, 5:05 pm, Tom Evans wrote:
> On Thu, May 19, 2011 at 1:23 PM, Jonas Geiregat wrote:
> > Hello,
> > I'm also finding the built i
On Thu, May 19, 2011 at 1:23 PM, Jonas Geiregat wrote:
> Hello,
> I'm also finding the built in serialization a bit overhead.
Me too! I use a simple HttpResponse subclass for generating JSON though:
from django.http import HttpResponse
from django.utils import simplejson
class J
Hello,
I'm also finding the built in serialization a bit overhead. It puts to much
information in your JSON string that can be modified such as the PK field.
I often import json ( http://docs.python.org/library/json.html ) and serialize
the data myself before passing it to the render m
I'm trying to return some JSON from one of my views. My objects are
simple and I can get the built-in json serializer working, but wanted
a cleaner object when I deserialize in my webpage, i.e. I don't want
the pk or model entries. What is the best way to go about that? I
played around a little wit
>
> sorry for the confusion.
>
> Sasha Bolotnovwww.gorizont-zavalen.ru
>
> On Sun, Feb 27, 2011 at 2:38 AM, Russell Keith-Magee <
>
>
>
>
>
>
>
> russ...@keith-magee.com> wrote:
> > On Sun, Feb 27, 2011 at 5:30 AM, Alexander Bolotnov
> > wro
On Sun, Feb 27, 2011 at 2:38 AM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:
> On Sun, Feb 27, 2011 at 5:30 AM, Alexander Bolotnov
> wrote:
> > Is there a way to control json serialization in django? Simple code below
> > will return serialized object in json:
&
On Sun, Feb 27, 2011 at 5:30 AM, Alexander Bolotnov wrote:
> Is there a way to control json serialization in django? Simple code below
> will return serialized object in json:
I've just answered this on django-developers. For the record,
cross-posting topics like this isn't en
Hi there ;).
Yesterday i noticed some strange behaviour of one of my sites - view [1]
serving json serialized data (one model, no references, 130 objects) was
executed about 20 secs[3] in production environment [2], and less than
1s via development server. Strange thing. What I've found - the view
On 21 Dec 2010, at 12:19, gregory semah wrote:
> Nobody has a quick answer ?
>
Take a look at Django's natural key support - it allows you to control what's
serialized for fk references.
Cheers,
Dan
> On Dec 20, 4:11 pm, gregory semah wrote:
>> Hi all,
>>
>> I'm searching a simple way to g
On 21 December 2010 13:19, gregory semah wrote:
> Nobody has a quick answer ?
>
It looks like xml serialisation wasn't designed to be customisable in
the way you need. If I were you, I'd look around the code and see what
I could reuse from there.
Konrad
> On Dec 20, 4:11 pm, gregory semah wrot
Nobody has a quick answer ?
On Dec 20, 4:11 pm, gregory semah wrote:
> Hi all,
>
> I'm searching a simple way to generate xml from my models, and a
> simple use of serializers can do this for me.
> But my models are defined with ForeignKey and ManyToManyField...
> The xml generated shows me only
Hi all,
I'm searching a simple way to generate xml from my models, and a
simple use of serializers can do this for me.
But my models are defined with ForeignKey and ManyToManyField...
The xml generated shows me only key values of these field.
Is there a simple way to catch any other field value t
I got a django web app where there is a httplib2 object used to do
HTTPS with client authentication connections to a apache server.
The problem is that for every request, my httplib2 object has to do a
SSL hand-shaking to apache, which is extremely slow.
I tried to save the httplib2 to the django
ranslates into
> "don'"
>
> Anyways, I think this idea has merit - even alongside a role-based
> security system.
>
> Feedback?
>
> On Jun 23, 3:29 am, Andy Kelley wrote:
>
> > I am coming up with a framework that helps serialization of models. My
> > ide
wrote:
> I am coming up with a framework that helps serialization of models. My
> idea is for each field to have a view permissions level: PUBLIC,
> OWNER, or ADMIN. I want to have a model to dict function that takes 2
> arguments, permission_level and serialize_chain. Firstly, let
I am coming up with a framework that helps serialization of models. My
idea is for each field to have a view permissions level: PUBLIC,
OWNER, or ADMIN. I want to have a model to dict function that takes 2
arguments, permission_level and serialize_chain. Firstly, let me
explain how it would change
needs to be improved (which is the list you've just given).
>
> Addressing your list specifically:
>
> > 1. mention requirement to use tuple also in serialization section
> > (currently this is only mentioned in deserialization)
>
> This is certainly worth d
e documentation. The
best way to do this is to open a ticket describing the aspect that you
think needs to be improved (which is the list you've just given).
Addressing your list specifically:
> 1. mention requirement to use tuple also in serialization section
> (currently this is on
You are correct.
Based on my experience with natural keys, I would propose improvements
for the documentation [1] - but perhaps these are matters of personal
opinion:
1. mention requirement to use tuple also in serialization section
(currently this is only mentioned in deserialization)
2. rename
On Fri, Apr 16, 2010 at 5:26 PM, h-k-ii wrote:
> I find dumpdata output in XML format quite strange for natural keys.
> Each character in a key reference is wrapped in a .
>
> Is this a bug to be reported or a feature?
It certainly doesn't look right; so there is a bug somewhere.
However, it mig
I find dumpdata output in XML format quite strange for natural keys.
Each character in a key reference is wrapped in a .
Is this a bug to be reported or a feature?
*
>python manage.py dumpdata --format xml --natural appname
...
Doctype1
...
D
o
c
t
y
en declare it in the SERIALIZATION_MODULES setting.
>
> On Feb 24, 7:00 am, chiranjeevi muttoju
> wrote:
> > Hi all,
> > I want to convert the model object to xml data. i used the django
> > serialization for that. then i'm getting the xml data as shown in bellow.
>
nd end_serialization methods:
http://code.djangoproject.com/browser/django/trunk/django/core/serializers/xml_serializer.py
…and then declare it in the SERIALIZATION_MODULES setting.
On Feb 24, 7:00 am, chiranjeevi muttoju
wrote:
> Hi all,
> I want to convert the model object to xml data. i used
Hi all,
I want to convert the model object to xml data. i used the django
serialization for that. then i'm getting the xml data as shown in bellow.
But my aim to remove the "" tag or replacing
that tag by other name. is there is any way to achieve that one. If anybody
know
On Wed, Sep 23, 2009 at 10:38 PM, Chris Withers wrote:
>
> Hi All,
>
> Where can I find docs on the actual serialisation formats used by
> Django's serialisation support?
>
> http://docs.djangoproject.com/en/dev/topics/serialization/#id1
>
> ...lists them, but do
Hi All,
Where can I find docs on the actual serialisation formats used by
Django's serialisation support?
http://docs.djangoproject.com/en/dev/topics/serialization/#id1
...lists them, but doesn't actually describe them :-S
cheers,
Chris
--
Simplistix - Content Management, Batch
Thanks Mike.
The issue is the inflexible handling of fk entries of a model by the
django serializer or more accurately PythonSerializer. The behavior is
inherited by json and xml serializers the same. I've eventually
resorted to rewriting the whole serialization to make it a better fit
f
On Tuesday 01 September 2009 12:29:56 pm Amir Habibi wrote:
> How can I serialize a Queryset along with the related records. For
> example, in Poll and Choice case, I need each poll to have the choices
> encoded in json format.
>
> Thanks
>
you'll want to look at the docs o
How can I serialize a Queryset along with the related records. For
example, in Poll and Choice case, I need each poll to have the choices
encoded in json format.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
When I have arrays of 100,000+ the performance of lists gets
unacceptable in standard c python. That's why arrays exist in python!
After doing research and testing, I have decided to rebuild the
project in java with embedded jython. For some bizarre reason jython
performance increases with large
what's wrong with turning it into a list? If you gzip it it won't be
that big.
On Aug 25, 5:16 pm, John Baker wrote:
> I need to json serialize some very large objects which include large
> arrays. How can I do this in django? The arrays will be very big and
> heavily processed before so need to
I need to json serialize some very large objects which include large
arrays. How can I do this in django? The arrays will be very big and
heavily processed before so need to use efficient array storage.
Testing with arrays I get..
TypeError at /zeros/
array([ 0., 0., 0., 0., 0., 0., 0.,
The reason I'm trying it is due to a requirement, the data rather than
being sent using a normal post request in a multienc form has to be sent
over in a json string
in the post request containing the base64 encoded image.
On Mon, 2009-08-24 at 18:38 +0200, Maksymus007 wrote:
> On Tue, Aug 4, 200
On Tue, Aug 4, 2009 at 10:58 PM, scuzz wrote:
>
> Hi,
>
> I'm trying to receive a file encoded in a json string and store it in
> an ImageField. I was hoping to use the standard Django deserialisation
> like:
>
> serializers.deserialize("json", "...snip..., \"myImageField\":
> \"base64encodedimage
Did you find a way to do this? I'm having the same problem.
Lewis
On Aug 4, 9:58 pm, scuzz wrote:
> Hi,
>
> I'm trying to receive a file encoded in a json string and store it in
> an ImageField. I was hoping to use the standard Django deserialisation
> like:
>
> serializers.deserialize("json",
ust 5, 2009
4:12'
One way to do this is to accept whatever String Django generates and then
parse it in Javascript to display what I want to display. Another way is to
get the desired format in the serialized JSON String.
Is it possible to control the serialization process to change some data as
i
Hi,
I'm trying to receive a file encoded in a json string and store it in
an ImageField. I was hoping to use the standard Django deserialisation
like:
serializers.deserialize("json", "...snip..., \"myImageField\":
\"base64encodedimage\", ...snip...)
however it tries to store the image content s
Hello,
On 29 Lip, 15:56, cootetom wrote:
> To add, something just popped into my head. Have you got
> DEFAULT_CHARSET = 'utf-8' in your settings.py fiile
It didn't help.
> On Jul 29, 2:51 pm, cootetom wrote:
>
> > I would imagine that the deserialize function tries to encode the
> > input dow
> self.parser.feed(buf)
> > File "/usr/lib/python2.5/xml/sax/expatreader.py", line 207, in feed
> > self._parser.Parse(data, isFinal)
> > UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in
> > position 154: ordi
t; File "/usr/lib/python2.5/xml/sax/expatreader.py", line 207, in feed
> self._parser.Parse(data, isFinal)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in
> position 154: ordinal not in range(128)
>
> I use latest SVN v
rse(data, isFinal)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in
position 154: ordinal not in range(128)
I use latest SVN version (1.1) revision 11367. I have # -*- coding:
utf-8 -*- line at the beginning of the file, and __unicode__ method
is set
But before, is it possible to serialize a form in JSON ?
Thanks
--~--~-~--~~~---~--~~
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
But beforce, is it possible to serialise a form in JSON ?
Thanks
On 11 fév, 00:50, adrian wrote:
> Thank you all for posting this. You saved me probably hours of head
> scratching.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
On Mar 24, 11:05 am, gchuyun wrote:
> i tried this, but get a error similar.
>
> TypeError: [{'publish_time': datetime.datetime(2009, 3, 24, 16, 16,
> 18), 'is_deleted': 0, 'is_confirmed'
> : 0, 'title': u'1', 'content': u'111', 'id': 1L}, {'publish_time':
> datetime.datetime(2009, 3, 24, 16
> ,
> I'm Trying to serialize a dict which have a list of Model's instance.
> > The format that i need is json. Something like that:
>
> > people = Person.objects.all()
>
> Why don't you use Person.objects.values()?
> You will get a list of dicts so there
.
>
> > However, when I do an HTTP PUT to update an instance of a model, the
> > xml response has True or False for Boolean values.
>
> > Though I'm using django-rest-interface, the de/serialization is
> > handled by Django itself.
>
> > I have tried walking t
1 - 100 of 210 matches
Mail list logo