Using raw_id_fields with a many-to-many field

2008-10-09 Thread Hancock, David (dhancock)
I've found that using raw_id_fields saves a lot of time for our users over loading an entire many-to-many select. (But for shorter lists, the many-to-many widget is by far the best interface I've seen for multiple selections.) There's an aspect of the raw_id_fields (this is in the admin interface)

How to get detailed tracebacks if DEBUG=False?

2008-04-10 Thread Hancock, David (dhancock)
We've got a Django system deployed, and we set DEBUG=False in the settings file. What I'd still like to be able to do, though, is get the full traceback for viewing if needed. (The one that shows up with DEBUG=True.) The expandible/collapsible parts, local variables, etc., are helpful for troubles

GeoDjango - error running GDAL tests

2008-01-05 Thread Hancock, David (dhancock)
I am getting the error message: "OGRException: Could not register all the OGR data source drivers!" (See the traceback below.) I also see this traceback trying to use the DataSource example (importing a zipcode shapefile). The test_geos.run() tests all pass. I can run ogrinfo from the command line

Using GeoDjango features with current trunk?

2007-11-05 Thread Hancock, David (DHANCOCK)
We're using the Django trunk (r5988), but are about to dive into adding some PostGIS geometry columns to a few of our models. It appears that GeoDjango is its own branch--has anyone got advice about whether we can use it with a more recent checkout than it branched from? The GeoDjango additions lo

Calling different Django sites from the same external application

2007-07-11 Thread Hancock, David (DHANCOCK)
We have two Django "projects" with distinct settings files, and we need to be able to make API calls to each of them from the same (separate) long-running application. Using the API of one of them is easy--we've got the DJANGO_SETTINGS_MODULE defined in the environment of the calling process, and i

OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread Hancock, David (DHANCOCK)
We are strongly considering migrating from MySQL to PostgreSQL, but there seem to be enough differences between the two that I'm pulling my hair out. I know this is somewhat off-topic, but has anybody got some resources for the conversion process? I'd love it to be as simple as a dump-and-restore,

DB error when sorting by a column in the generated admin

2007-05-07 Thread Hancock, David (DHANCOCK)
Django 0.96, Python 2.4, Linux, development webserver I have a with clicking certain column headings for sorting in the contrib Admin lists. I think I brought this on myself. The class reseller below used to be simply a CHOICES list, but that got unwieldy, so I created the class and gave fuel_rele

Problem sorting columns in Admin

2007-04-28 Thread Hancock, David (DHANCOCK)
Django 0.96, OS X 10.4, MySQL 5.1, Python 2.4.2. I'm using the automatic admin, and when I click on a column heading, I get a traceback: OperationalError at /admin/trips/leg/ (1054, "Unknown column 'trips_trip.-start_date' in 'order clause'") The leg class has a foreign key to the trip c

Using get_FOO_display() in admin classes

2007-04-23 Thread Hancock, David (DHANCOCK)
Django-0.96. I've discovered the get_FOO_display() function that I get for free when I use a "choices=CHOICES" in a model, and I understand how to use it in a template or in the API. But the problem I'm having is that when I save something with a choices attribute, editing that object subsequently

ManyToMany select widget vs. Internet Explorer

2006-09-25 Thread Hancock, David (DHANCOCK)
Title: ManyToMany select widget vs. Internet Explorer The users of the little Django system I build LOVE the _javascript_ widget to make multiple selections more straightforward. I’ve noted a difference in behavior of the widget between Firefox and IE. It behaves properly in Firefox (I can’t s

RE: Admin app (one class) hanging Firefox on Mac OS X

2006-09-14 Thread Hancock, David \(DHANCOCK\)
users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of robbie Sent: Thursday, September 14, 2006 1:23 PM To: Django users Subject: Re: Admin app (one class) hanging Firefox on Mac OS X Hancock, David (DHANCOCK) wrote: > The hang scenario is loading the add or change page for a Trip, cl

Admin app (one class) hanging Firefox on Mac OS X

2006-09-14 Thread Hancock, David (DHANCOCK)
Title: Admin app (one class) hanging Firefox on Mac OS X Possibly off-topic, sorry.  I have a model that reliably hangs Firefox on Mac OS X (but not Safari on Mac, not IE on Windows, not Firefox on Windows). The hang scenario is loading the add or change page for a Trip, click in a textbox, and

I'm not understanding timezone

2006-09-12 Thread Hancock, David (DHANCOCK)
Title: I'm not understanding timezone Django 0.95, on RedHat Linux (enterprise 3.0), Python 2.4.2, server timezone is GMT (UTC, UCT, Zulu, whatever your favorite name is). No matter what I set the time_zone to in settings.py, the behavior of the Now button in the Admin for a DateTimeField doesn

Problem with models.HORIZONTAL in admin inline editing

2006-08-28 Thread Hancock, David (DHANCOCK)
Title: Problem with models.HORIZONTAL in admin inline editing I’m seeing different behavior for filter_interface=models.HORIZONTAL when I’m editing inline vs. adding an object directly. I’ve tried to boil this down to a short model that demonstrates the problem: from django.db import models cl

How to log ALL queries

2006-08-11 Thread Hancock, David (DHANCOCK)
Title: How to log ALL queries I haven’t completely given up on getting Oracle and Django working together, but I did revert to 0.95 and installed MySQL, which are meeting my needs. To get to the next step with the Oracle patch, I’d really like to learn what to change to force ALL queries to be

RE: Invalid character error using Oracle backed

2006-08-07 Thread Hancock, David \(DHANCOCK\)
OK, much progress made (see transcript below). My current question is: "How can I get a log written of all queries made via the command-line interface?" Then I can start figuring out what's wrong with other queries that get automatically generated. I tried in the transcript to start from a nice,