Wednesday, March 30, 2011

Re: fixtures with updated timestamps

You can write a pre_save signal http://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.signals.pre_save

Hope it helps,
Marcos

On Wed, Mar 30, 2011 at 8:09 AM, Robert Šmol <smol.robert@gmail.com> wrote:
Hi,

is it possible to load fixtures of models that have a datetime field and then updated those?

I mean we have a nice preset database, but it gets old over time, I need to refresh the time attributes during tests and new development deployments.

Robert

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.

Jamie Zawinski, in comp.emacs.xemacs

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment