Re: Why does django use mysqldb over mysql-connector?

2012-05-04 Thread john2095
My frustration was borne by the ease with which Debian makes the task: I did expect the job to be an insignificant one-line command. Thanks Tom. Apple don't see a profit in providing a mysql-client package. Ramiro has a point that lobbying MySQL for a client-only OSX package is a righteous pat

Re: Why does django use mysqldb over mysql-connector?

2012-05-04 Thread john2095
Oh. Thanks Kurtis. That answers the first question: it's built on mysqldb primarily because it's mature and stable. Thanks. As for the second question: has anyone tried building a backend on mysql-connector yet? Silence? Is this an opportunity? On Friday, 4 May 2012 16:53:43 UTC+10, Kurtis w

Re: Why does django use mysqldb over mysql-connector?

2012-05-03 Thread john2095
Yes, that's the pure python adapter I'm talking about. I think that's effectively the same as this one. Nice link but I'm not sure if you're suggesting that as additional information or an answer? The question remains is a compelling reason

Why does django use mysqldb over mysql-connector?

2012-05-03 Thread john2095
I've just been through a slice of hell simply because I did not want to install mysql-server on my (osx) django development machine - my app connects to a remote mysql database. It turns out that python's "mysqldb" depends on mysql binaries which are only packaged up with the server release.

Re: Multiple tables, is Django suited for this?

2010-03-30 Thread john2095
Not impossible at all. Just a lot of work :-) You'd have to build and maintain a little model generator script to detect a new table, determine its schema, and generate the models. Then what? Your application detects new models appearing and can autonomously decide what to do with each one? Sound

Thanks for upload_to=

2010-03-30 Thread john2095
Just a little shout out to the development team for anticipating my need and coming up with this little gem. To keep the long story short I spent the entire day trying work out how I was going to save a file somewhere in the filesystem with a file path determined by the properties of the model. D

Re: What validation tests are applied to ImageField?

2010-03-22 Thread john2095
['Filedata']) except ValidationError: return HttpResponse("I don't think that's an image.") On Mar 22, 9:04 pm, Tom Evans wrote: > On Mon, Mar 22, 2010 at 6:51 AM, john2095 wrote: > > But does this all amount to an expectation that it will res

Re: Remove session on browser close

2010-03-22 Thread john2095
I think the proper paradigm is to use the AnonymousUser. Rather than trying to destroy the session - something that cannot be reliably achieved - instead set the user of the session back to AnonymousUser and test/react to that. On Mar 23, 8:40 am, grimmus wrote: > Basically all i want to do is

Re: What validation tests are applied to ImageField?

2010-03-21 Thread john2095
ory" prematurely. Thanks. On Mar 18, 9:42 pm, john2095 wrote: > Perfect. Thanks. That's what I was chasing. > > On Mar 17, 11:54 pm, Karen Tracey wrote: > > > > > > > Validation of image fields is done at the form field level, see: > > >http://c

Re: Multiple polls on a single form

2010-03-18 Thread john2095
Sounds like you're building a "multiple choice questionnaire". Googling around everyone seems to be indicating the perfect blog post for you was at: http://www.pointy-stick.com/blog/2009/01/23/advanced-formset-usage-django/ but the site seems to have dropped off the internet. At the end of the day

Re: What validation tests are applied to ImageField?

2010-03-18 Thread john2095
Perfect. Thanks. That's what I was chasing. On Mar 17, 11:54 pm, Karen Tracey wrote: > > Validation of image fields is done at the form field level, see: > > http://code.djangoproject.com/browser/django/trunk/django/forms/field... > > Karen -- You received this message because you are subscribe

Re: Form validation changes since 1.1.1? (Autocomplete errors)

2010-03-16 Thread john2095
There has been some change between 1.1 and trunk regarding questions whether to enforce defaults at the form or the model level. Might be relevant, or provide a clue: http://stackoverflow.com/questions/1436327/does-model-charfieldblankfalse-work-with-save On Mar 17, 12:11 pm, Karen Tracey wrote:

Re: What validation tests are applied to ImageField?

2010-03-16 Thread john2095
> I assume Django is passing the file to PIL and asking if the file > is in a format that PIL can deal with and is in a valid format. My question is about the assumption... As far as I can find, it actually only uses PIL to read the file and return the dimensions. The code looks like if PIL thro

What validation tests are applied to ImageField?

2010-03-15 Thread john2095
The documentation states about the ImageField "Like FileField, but validates that the uploaded object is a valid image. Has two extra optional arguments:" http://docs.djangoproject.com/en/dev/ref/models/fields/#imagefield I went cruising the source to try and work out what tests are implemented

Re: Cron vs event triggered action

2009-12-15 Thread john2095
Just to throw it out there... forget about trying to make something happen every ten minutes; or whatever your margin for error is. Instead focus on just testing to see whether two hours have passed when you come to use it. Either lazy (C), or diligent (D)... Solution C: Do nothing at all until so

Re: Understanding of File Upload in Django

2009-12-15 Thread john2095
I'm confident people will correct my mistakes... A file is transferred from a web browser to a web server by breaking it up into packets at the network layer. Each packet is part of the file and you need the complete set of packets to recreate the whole request, and thus the whole file. Assuming

Re: How to lay out large, *modular* website in Django.

2009-11-17 Thread john2095
Yes. Django is python and python can handle a modular layout. But it's not PHP/Zend. You will have to entirely rewire your brain by learning Python. There is a respectable curve to climb if you're coming from PHP. But to give you some comparison I have about 8 months experience with django (and