SQLAlchemy

2009-05-27 Thread jrs_66
Hi, I've been playing a bit lately with SQLAlchemy. It seems to provide much more power/flexibility than the somewhat clunky Django ORM. It doesn't, however, allow me to use ModelForms or the Admin interface, which are a nice time saver. Is there any red flag I should be aware of in possibly u

Re: Problem with performance on a django site

2009-05-28 Thread jrs_66
250 queries on one page seems to me to be dangerously high. I would have to guess you could reduce that significantly. Turn on query output to see if the Django ORM isn't creating sloppy queries in loops. My guess is that with some code alterations you could help On May 28, 4:57 am, Stefan

ModelForm

2009-03-31 Thread jrs_66
Silly, simple(?) question... In a reduced sense, I have a model with two field Name & Age. I'd like to use a ModelForm to display the Name field in plain text (no form field), while have the Age be a CharField. How does a template access the Name field as straight text without it getting auto c

Simple Query?

2009-04-12 Thread jrs_66
Hi, I'm new to django, but not new to SQL. I have a (seemingly) trivial query to run. In SQL it looks like- SELECT media.*, media_and_containers.order FROM media INNER JOIN media_and_containers ON media.id = media_and_containers.media_id WHERE media.id = 1 In the django ORM I think it sho

Re: Simple Query?

2009-04-12 Thread jrs_66
Thanks for the tip, however, it doesn't really help me out. I've read the docs, repeatedly, my problem is that I can't seem to get data from a related table (see my question above). Thanks On Apr 12, 7:00 pm, Ovnicraft wrote: > 2009/4/12 jrs_66 > > > > > >

Re: Simple Query?

2009-04-12 Thread jrs_66
= models.IntegerField(null=True, editable=False) width = models.IntegerField(null=True, editable=False) ... I'm trying to get everything from the MediaLocal model and the 'order' field from the MediaAndContainer model... On Apr 12, 8:00 pm, Karen Tracey wrote: > On Sun, Apr 12, 2009

Django equivalent to a SQL CASE statement?

2009-05-01 Thread jrs_66
Hi, Any pointers as to where I could find any info about performing a SQL CASE statement using Django? Even more fundamental... is there really no way of doing a LEFT OUTER JOIN in Django (other than terribly sloppy role your own hacks)? Does anyone know of any more complete model/queryset docs

Re: Django equivalent to a SQL CASE statement?

2009-05-01 Thread jrs_66
option? On May 1, 2:03 pm, Malcolm Tredinnick wrote: > On Fri, 2009-05-01 at 10:48 -0700, jrs_66 wrote: > > Hi, > > > Any pointers as to where I could find any info about performing a SQL > > CASE statement using Django?  Even more fundamental... is there really > >

Django and a basic SQL join

2009-05-06 Thread jrs_66
Hi, I have 2 models... class Category(models.Model): name = models.CharField(max_length=255) parent = models.ForeignKey('self', null=True) has_children = models.BooleanField(default=False) language = models.ForeignKey(Language, null=False, default=1) active = models.BooleanFi

Re: Django and a basic SQL join

2009-05-06 Thread jrs_66
for more info. This is definitely the most angry forum I've ever seen... the kicker is that the anger is almost always coming from the people associated with the django project... hmmm.. On May 6, 12:48 pm, jrs_66 wrote: > Hi, > > I have 2 models... > > class Categor

Re: Django and a basic SQL join

2009-05-06 Thread jrs_66
for much of my querying (other than very basic joins, which work well in django) On May 6, 2:46 pm, Alex Koshelev wrote: > On Wed, May 6, 2009 at 8:48 PM, jrs_66 wrote: > > > Hi, > > > I have 2 models... > > [skip] > > > e = FlattenedCategory.objects.select_

Re: Django and a basic SQL join

2009-05-06 Thread jrs_66
e' questions. I appreciate all answers, it's just the steady stream (not only to me) of dismissive 'I'll make 'em feel lousy' comments which bother me. On May 6, 2:45 pm, Phil Mocek wrote: > On Wed, May 06, 2009 at 10:17:29AM -0700, jrs_66 wrote: > > This is def

I18N

2010-01-22 Thread jrs_66
The following - #: contrib/admin/templates/admin/base.html:26 msgid "Welcome," msgstr "Bienvenido/a," is from the Django spanish django.po file. I understand that the language supports the word 'Bienvenido' ending in an 'o' or an 'a'. Any idea how the django template tag {% trans "Welcome," %} s

Django DATETIME_FORMAT Localization

2011-05-25 Thread jrs_66
Hi, Despite the high likelihood that I'll be chewed out as an ignoramus who can't seem to read docs (I have... for about a day), I'm going to try to ask a seemingly basic question (without even posting my model;) I'm using the Django 1.2 enhanced localization feature to setup formatting constants