ess you could store both the l/r values and parent_id - but that's
less than ideal.
Thanks - I hadn't seen the MPTT method before. It looks to be useful,
in the right circumstances.
Cheers,
xtian
--~--~-~--~~~---~--~~
You received this message becaus
aren't things that have been asked before - I couldn't
see anything specific.
A way to solve both of these, it seems, would be to have a hook where
whole-object validation could happen before saving - is there anything
like this in the fra
to include the price in the result:
def __repr__(self):
return '%s - £%s' % (self.code, self.price)
There's probably a better to way to handle your larger problem, though
- I'll leave that for the high-level Djangoistas.
Cheers,
xtian
I think that line should be
job = metaForeignKey(Job, null=True)
The _id is implied - it's part of the machinery that links your Log to
your Job. Semantically, your log is linked to a job, not a jobid.
On 8/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Seems like my ForeignKeys are
on system
that SqlObject uses. What do you think?
I might try implementing something like that, just to see how tricky it is.
I'm also pretty sure that we've strayed away from the original
problem, so I might have a play with this and then start a new thread.
Thanks Brant - it's been interesting, and prompted me to have a bit of
a look at Django's internals.
Cheers,
xtian
def dept_name(self):
return self.get_department().name
dept_name.short_description = 'department'
This is a bit awkward - it works alright in the database and through
the API, but the admin doesn't handle it properly. It would be better
if Django could take the SqlObject approach and allow for late-linking
between related entity classes, I think.
xtian
in SqlObject the class's name can be used instead of a
reference to the class, providing late binding to enable this kind of
model.
xtian
D'oh! I just finished sending a message about the same thing.
On 8/17/05, David S. <[EMAIL PROTECTED]> wrote:
>
> Some images are not showing up in admin. For example:
> "/media/img/admin/icon_searchbox.png" is not found.
In fact, it is sent - it's truncated.
>
> The images linked to in the
nd
anything about it. Has anyone else seen it? I guess lots of people are
using linux/apache/both. Any hints as to what I could look at?
Thanks,
xtian
On 8/9/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> ...
> Of course, as you point out, you could write your own view, rather
> than using a generic view, if you need more fine-grained control. Both
> solutions are pretty easy and don't require much code. :)
>
Fair enough - thanks!
xtian
play?
(Something that occurs to me is to use __getattr__ on the Poll class
to have 'virtual' methods that could sort by arbitrary attributes - I
guess this would work, but it's a bit magical, and potentially
error-prone.)
Thanks,
xtian
es) in order to decide what the SQL expression
should be, and use the values to determine what to substitute in. It's
pretty clever, especially because it can traverse joins to refer to
attributes of related objects.
HTH
xtian
On 8/5/05, Maniac <[EMAIL PROTECTED]> wrote:
>
> Hello!
&g
7;ve
worked on systems where the volume of data something like this would
affect would require taking the production system offline, and need
DBA management of storage space.
If synthetic keys are used, this situation can be handled easily.
Cheers,
xtian
13 matches
Mail list logo