Lic. José M. Rodriguez Bacallao wrote:
> how can I know programatically if an operation in a model is an insert,
> update or delete?
> I just want to extend the admin log to log any action in my application
> models. Right now,
> admin app only log actions executed by itself.
Part of your quest
Lic. José M. Rodriguez Bacallao wrote:
> how can I vote?
There's no official voting mechanism for the non-Django developers
right now, it's mostly just based on putting a comment on the Trac
ticket or in the mailing list saying that you would use this
functionality for such and such a reason.
r_f_d wrote:
> As far as insert or update, just overide the save method within the
> class. It is something that must be done for each class, but what I
> have done (for essentially the same purpose) is override save() on
> each model I need to log the action for like so:
>
> def save():
> #
Graham Carlyle wrote:
> The pending ability to allow custom application commands made me think
> about a few on-off scripts i have that i wouldn't want to have available
> as a command but do django stuff from the command line.
>
> Maybe its worth adding a new core command for invoke these sorts
Kai Kuehne wrote:
> Hi,
>
> On 8/22/07, perrito666 <[EMAIL PROTECTED]> wrote:
>> Hello people, i have found a situation where AutidTrail comes very
>> handy, but it does not work out of the box on my model, it says here
>> http://www.djangoproject.com/weblog/2007/aug/19/djangoroundup/#comments
>>
James Bennett wrote:
> On 8/23/07, John Menerick <[EMAIL PROTECTED]> wrote:
>> Yeah, I was thinking of running a script in daemon mode, but I would prefer
>> to keep the code inside the django instance to keep everything simpler.
>> simpler as in the same settings for deployment, less hassle deplo
perrito666 wrote:
> Ah thank you, ill keep an eye, so far the only think I did to it was a
> small hack to handle the error raised by trying to copy a fk to the
> audit table but it is a not very clean hack.
> Perrito.
Took me an extra couple of days, but I've got all my modifications to
AuditTr
Jure Čuhalev wrote:
> On 8/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Since there isn't a load() method on a model... I'm thinking I somehow
>> have to do this on the manager..but not sure ... any tips would be
>> great.
>>
>> When I load a record, either via get() or by looping throug
Or run Debian testing. Why switch distros or even distro flavors if you
don't have to? :) Python 2.5 and most of the packages that are needed
for Django are fine straight from apt on testing/unstable.
gav
Tom Novelli wrote:
> Debian Etch is meant to be stable, not up to date (except for secu
On May 14, 2008, at 5:23 PM, Alex Morega wrote:
>
> On May 14, 2008, at 23:37 , J. Pablo Fernández wrote:
>> I've made a custom management command like this:
>> [...]
>> but it is not being picked up. ./manage.py help doesn't list it and:
>>
>> $ ./manage.py import_vortaro
>> Unknown command: 'i
Jason Ourscene wrote:
> First i had my python issue, got that settled and now in the first
> django tutorial I create my poll model and add the def __unicode__
> method and im getting an error. heres the code, and the error:
>
> Code: http://pastie.textmate.org/197323
> and my error: http://pasti
Hanne Moa wrote:
> I have a filter that makes django's json-dumps more human-readable, by
> adding a newline after every occurence of "}},". Running such a filter
> first would make for short and snappy lines for the rewriting filter:
>
> python manage.py dumpdata | prettifyjson | fixbooleans > p
Jon Atkinson wrote:
> Hello,
>
> I'd like to add a feature to the web application I'm developing, which
> will track the changes to the data in the system. I've created a web
> interface for various items of data, and each has a create and an edit
> view.
>
> If possible, I'd like to create a lo
Greg wrote:
> Hello,
> I have a table in my template that will contain an x number of rows
> depanding on what I get back from the view. I want my table row
> background color to rotate between red and white. As of now, I don't
> know how to keep track of each iteration through my for loop to se
Dmitriy Sodrianov wrote:
> Hi to all!
>
> Can anyone help me, why none of the following code works:
>
> class Task(models.Model):
> parent = models.ForeignKey(Task)
>
>
Try:
class Task(models.Model):
parent = models.ForeignKey('Task')
It will do the lookup lat
Stated simply:
queryset.select_related().count() with no filter criteria generates a
wrong query across a ForeignKey relationship.
The problem: A QuerySet operation that involves a .count() across a
ForeignKey relationship does not actually join in the ForeignKey tables
to do the select_relate
[EMAIL PROTECTED] wrote:
> On Wed, Oct 31, 2007 at 11:09:49AM -0400, George Vilches wrote:
>> Stated simply:
>> queryset.select_related().count() with no filter criteria generates a
>> wrong query across a ForeignKey relationship.
>
> Hi,
>
> do you ge
koenb wrote:
> First things first: I would either define a separate Group object
> here, or use a many2manyfield if you don't need to know the group
> numbers.
The example was crafted because the actual models and data are part of a
internal application that I am not allowed to publish the sourc
to simplify things with ForeignKeys)
just caused people to try to think about the relationships here, and
that's not what was really the problem. For that, I apologize.
Thanks,
George
Karen Tracey wrote:
> On 10/31/07, *George Vilches* <[EMAIL PROTECTED]
> <mailto:[EMAIL PRO
Malcolm Tredinnick wrote:
>>
>> >>> Assembly.objects.select_related()
>> [, , > Assembly object>, , > object>, ]
>> >>> len(Assembly.objects.select_related())
>> 6
>> >>> Assembly.objects.select_related().count()
>> 2L
>>
>>
>> Since I'm using select_related(), I would expect it to follow the I
Karen Tracey wrote:
> On 10/31/07, *George Vilches* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> Or (I just saw your follow-up e-mail), is all of this a moot point since
> something like this is going to be made totally invalid in the future?
&g
ere the likely place to go about fixing it is in
qs-rf. Or, you can tell us that we're wrong about our assumption that
OneToOneFields should be bidirectional, because of XXX, and we'll
respect your decisions. You know what's better for Django than us, by
far. :)
Thanks,
George
Malco
Alright, I guess it's not offlist. Sorry for the extra chatter folks.
George Vilches wrote:
> (Off-list because this mostly doesn't apply to non qs-rf people)
>
> Thank you for the clarification on OneToOneFields and required
> relationships. We've been working wit
Karen Tracey wrote:
> On 11/1/07, *George Vilches* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
> [snip]
>
> For reporting purposes though, we would like to be able to
> .select_related() on User, and get a cached copy of each of the OneToOne
24 matches
Mail list logo