Re: Is there a workaround for MySQLdb's failure to handle unicode?

2009-09-30 Thread W.P. McNeill
site does not support unicode. On Sep 30, 11:44 am, "W.P. McNeill" <bill...@gmail.com> wrote: > Some of the fields in my application's database contain unicode > strings.  I serialized this database into a fixture.  When I try to > load that fixture into a machine runni

Is there a workaround for MySQLdb's failure to handle unicode?

2009-09-30 Thread W.P. McNeill
Some of the fields in my application's database contain unicode strings. I serialized this database into a fixture. When I try to load that fixture into a machine running MySQL I get an warning from MySQLdb/cursors.py about an "Incorrect string value" and my database is left incomplete. The

Re: Incorrect Python path in Apache FCGI deployment

2009-09-30 Thread W.P. McNeill
m. Thanks for your suggestion about permissions. I probably have some of those problems in here too. :-) On Sep 30, 10:00 am, Karen Tracey <kmtra...@gmail.com> wrote: > On Wed, Sep 30, 2009 at 12:47 PM, W.P. McNeill <bill...@gmail.com> wrote: > > > Because this appears to be a p

Re: Incorrect Python path in Apache FCGI deployment

2009-09-30 Thread W.P. McNeill
lts import * ... The file in /tmp/mypath shows that "/somepath/web-interface/lingshare" is on the head of the sys.path as it should be. I'm completely blocked. Can someone give me an idea of where to start debugging next? On Sep 28, 12:36 pm, "W.P. McNeill" <bill...@gmail.c

Incorrect Python path in Apache FCGI deployment

2009-09-28 Thread W.P. McNeill
I have written a set of Django apps that works on my development machine but fails when I deploy it to Apache. The issue appears to be with the Python path that the Apache process is using, but none of the things I have tried have worked. I'm looking for suggestions as to what I am doing wrong.

Re: When did Paul join the Beatles?

2009-09-14 Thread W.P. McNeill
:43 am, "W.P. McNeill" <bill...@gmail.com> wrote: > Or maybe another way of asking this, since I don't want to force you > to write Python code just to answer my question... > > If I have the music group model written as shown in the Django > documentation is it possible

Re: When did Paul join the Beatles?

2009-09-14 Thread W.P. McNeill
oined > to whom (Beatles), and after that will pop up the ManyToMany date field that > will answer to question "when". > > I am preety new in django my self .. and i don't know pretty well how to do > it... > > > > > > On Mon, Sep 14, 2009 at 6:21 PM, W.P. M

Re: When did Paul join the Beatles?

2009-09-14 Thread W.P. McNeill
ust use a query to answer the question: Who (Paul)? joined > to whom (Beatles), and after that will pop up the ManyToMany date field that > will answer to question "when". > > I am preety new in django my self .. and i don't know pretty well how to do > it... > > > &g

When did Paul join the Beatles?

2009-09-14 Thread W.P. McNeill
I can't figure out how to query the values of fields in a ManyToMany "through" table. For instance, say I'm working with the Beatles database in the Django documentation (http://docs.djangoproject.com/en/dev/topics/db/models/ #extra-fields-on-many-to-many-relationships). I want to be able to

Can all of unicode be slugified?

2009-09-13 Thread W.P. McNeill
I am writing a Django application that uses characters from the International Phonetic Alphabet (IPA). I am trying to type the IPA characters into the admin interface and have Django automatically prepopulate a slug field. Django is ignoring the IPA characters. Is this expected behavior? I

Is slugify available as a Django API call?

2009-09-13 Thread W.P. McNeill
I am going to populate the tables in my Django app from .CSV files rather than through the admin interface, so I am going to need a slugify Python function. I could write my own or pull a snippet from the web, but this seems error prone. The right way to do it would seem to be to use the

Re: Can I dereference a field in the output of a filter?

2009-09-12 Thread W.P. McNeill
The with tag worked. Thanks. On Sep 12, 12:10 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Sep 12, 8:08 pm, "W.P. McNeill" <bill...@gmail.com> wrote: > > > > > > > I have a view that renders a table.  The "table" object is a li

Can I dereference a field in the output of a filter?

2009-09-12 Thread W.P. McNeill
I have a view that renders a table. The "table" object is a list rows, which are themselves lists of model objects. These objects have a parameter called label. Inside the template {{ object.label }} render's an objects label and {{ row|first }} renders the first object in the row. I want

Re: What is the correct database format for storing a 2-dimensional table?

2009-09-10 Thread W.P. McNeill
1. The database schema you suggest is something I tried. I wasn't sure how to enforce my uniqueness requirements within it, but you may have answered that. 2. The uniqueness criteria is that the feature-phoneme pair is present only once. So using your schema I could have a FeaturePhoneme table

What is the correct database format for storing a 2-dimensional table?

2009-09-09 Thread W.P. McNeill
I am writing a Django app to store and manipulate a 2-dimensional table of data. I don't think I'm trying to do anything particularly difficult, but I'm new to both Django and relational databases, so I'm getting confused by various design considerations. I'm hoping there are canonical answers