Re: Separate file stream from request input stream while upload

2012-08-07 Thread 春燕 李
Thanks ! In my application, I want to upload image files(such as *.iso) which are always large, it will take long time before the uploading completed. During this time, I cannot send out other request on current page, because a new request will refresh the current page and make the uploading fai

Re: object.create speed, creating 3 objects takes 1 sec in sqlite

2012-08-07 Thread Cal Leeming [Simplicity Media Ltd]
Hi Anton, In short, attempting to do any sort of bulk import "out of the box" with the ORM, will always end with bad performance. No matter how fast your disks are (SSDs with 4000 iops in RAID 1 for example), you'll still only get around 0.1s per insert via the ORM on a single thread, and if you

Re: Separate file stream from request input stream while upload

2012-08-07 Thread Russell Keith-Magee
On Wed, Aug 8, 2012 at 10:11 AM, 春燕 李 wrote: > As you know, Django can process file uploading with its own > uploadhandler. But all the request data is processed as stream, and > mod_wsgi provides a way to read the stream, what you can do is just > read the stream sequentially, which means

Separate file stream from request input stream while upload

2012-08-07 Thread 春燕 李
As you know, Django can process file uploading with its own uploadhandler. But all the request data is processed as stream, and mod_wsgi provides a way to read the stream, what you can do is just read the stream sequentially, which means that you cannot separate file stream from the request

Re: Nullable User email

2012-08-07 Thread Melvyn Sopacua
On 7-8-2012 17:08, Demian Brecht wrote: > 1. Copy/paste the entire model, changing the attribute of the one field. > 2. User._meta.fields[4].null = true 3. Override the __new__ method in your subclassed model and remove the email field definition from the class attributes to the meta class before

Re: Jquery 1.7.2 Ajax

2012-08-07 Thread Ivo Marcelo Leonardi Zaniolo
I've just solved it. There is a cross domain protection on jquery versions since 1.5. To make these kind of requests between domains you have to disable it setting on Ajax request the crossDomain=false. And that is it. Ivo Marcelo Leonardi Zaniolo +55 71 9302 3400 imarcel...@gmail.com www.informa

Re: Jquery 1.7.2 Ajax

2012-08-07 Thread Mr. Gerardo Gonzalez Cruz
What problem is it? On Tue, Aug 7, 2012 at 1:09 PM, Ivo Marcelo Leonardi Zaniolo < imarcel...@gmail.com> wrote: > Hello, > > Have someone tried to make Ajax requests using jquery 1.7? > On the older versions of jquery everything works fine. > > Does somebody have a tip about it? > > Tanks > Ivo M

Re: Nullable User email

2012-08-07 Thread Demian Brecht
Thanks for the quote, was unaware of the convention. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/mxg72KZaS8EJ. To post to this group, send email to djan

Jquery 1.7.2 Ajax

2012-08-07 Thread Ivo Marcelo Leonardi Zaniolo
Hello, Have someone tried to make Ajax requests using jquery 1.7? On the older versions of jquery everything works fine. Does somebody have a tip about it? Tanks Ivo Marcelo Leonardi Zaniolo +55 71 9302 3400 imarcel...@gmail.com www.informatizzare.com.br imarcelolz.blogspot.com.br -- You recei

Pluggable Q&A Django App

2012-08-07 Thread natasha.ba...@utoronto.ca
Hi All, I'm looking to implement a Stack Overflow style Q&A feed on my site. I have looked into the following solutions: 1) OSQA 2) Askbot 3) Soclone The problem with these is that they don't really seem to be standalone apps, and more like fully featured sites. Any thoughts on a standalone pl

Re: Migrating app from Django 1.3.3 to 1.4

2012-08-07 Thread Germán
What other applications/extensions are you using? I remember a similar problem using debug-toolbar. I had to upgrade it to a newer revision (can't remember if the necessary changes were already contained in a release). On Tuesday, August 7, 2012 10:24:06 AM UTC-4, dokondr wrote: > > Hi all! > I

Re: Nullable User email

2012-08-07 Thread Germán
It seems you shouldn't use null but rather an empty string: https://docs.djangoproject.com/en/dev/ref/models/fields/#null > Avoid using > null > on > string-based fields such as > CharField

Geodjango on Windows issue

2012-08-07 Thread Danny Im
Hello all, I'm hoping to get some assistance on this. Issue: A user can upload a shapefile to the django application once upon a fresh apache restart. Any subsequent shapefile upload by any other user results in the server not giving any response back to the client. Other uploads go through

Re: Migrating app from Django 1.3.3 to 1.4

2012-08-07 Thread Aaron C. de Bruyn
On 2012-08-07 at 07:24:06 -0700, dokondr wrote: > DATABASES = { >'default': { > 'ENGINE': 'django.db.backends.sqlite3', # Add Do you actually have the sqlite3 library installed? (Debian/Ubuntu: apt-get install python-pysqlite2) > ImproperlyConfigured: settings.DATABASES is improperly

Nullable User email

2012-08-07 Thread Demian Brecht
In an authentication backend I'm currently writing, I've supplied a custom User model that extends the contrib.auth User model. I have the need to allow email addresses to be NULL. A little context: I'm writing an OAuth2 wrapper for an OAuth2 client I relatively recently wrote (yes, I know that th

Migrating app from Django 1.3.3 to 1.4

2012-08-07 Thread dokondr
Hi all! I am trying to run ConceptNet (http://csc.media.mit.edu/docs/conceptnet/install.html) originally deployed on Django 1.3. When running this app with Django1.4 on Mac OS X 10.6.8. (Snow Leopard) I get: "ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the

Re: edit a submitted form-load it on template

2012-08-07 Thread Alexis Roda
Al 07/08/12 14:04, En/na mapapage ha escrit: $(document).ready(function () { $("a").on("click", function(event) { event.preventDefault(); var id = $(this).attr("id"); $.get("edit_wreqs"+"/"+id+"/", function(data) { }); }); }); Disclaimer: I don't use jquery myself. My response is based on my

edit a submitted form-load it on template

2012-08-07 Thread mapapage
I have an app where a user submits some forms. Now I want the user to be able to edit his previous submitted forms. So on the template(e.g old_Webrequests.html) I just load a list with links corresponding to every submitted form(view:old_Webreqs(request,user_id)). {% for a in all_reqs %} {{ a }

Re: django + selenium testing with several browsers

2012-08-07 Thread Rafael Durán Castañeda
On 08/06/2012 12:34 AM, LS wrote: I have a series of test cases defined using the LiveServerTestCase class provided by Django. I derive a number of classes from it, and run the tests using manage.py test as per the docs at https://docs.djangoproject.com/en/1.4/topics/testing/ This is all work

Re: Compile/generate JavaScript from Django Templates?

2012-08-07 Thread Melvyn Sopacua
On 7-8-2012 10:52, Alec Taylor wrote: > To completely decouple the client-side, would it be possible to > generate JavaScript from the server-side Django Template? The template documentation explicitly tells you it can generate *any* text-based format. [1] A few threads ago I gave an example and p

Compile/generate JavaScript from Django Templates?

2012-08-07 Thread Alec Taylor
To completely decouple the client-side, would it be possible to generate JavaScript from the server-side Django Template? E.g.: using PyJamas If not, I will use tastypie or piston to expose a RESTful JSON API which I will consume with a JavaScript framework on the client-side (AngularJS). Would

Re: Choosing a Django-based CMS

2012-08-07 Thread Matthias Kestenholz
Hi Sean On Tue, Aug 7, 2012 at 5:52 AM, Sean O'Brian wrote: > Thanks all. > As I get, I should try both Mezzazine and FeinCMS. > May be they're have another advantages and disadvantages. > (Disclaimer: I'm one of the main developers of FeinCMS.) The best place to ask questions about FeinCMS wou

Re: fastcgi vs wsgi

2012-08-07 Thread Gour
On Tue, 07 Aug 2012 00:39:36 +0200 Melvyn Sopacua wrote: > The system used is not of much influence. The bulk of the memory usage > of a WSGI and fastcgi app is the modules that are loaded by the python > interpreter, similar to how php-fpm memory increases with each > extension that is loaded. C