hi I have this models:
models.py:
class Galeria(models.Model):
...
class Foto(models.Model):
...
galeria = models.ForeignKey(Galeria, null=False)
admin.py:
class FotoInline(admin.StackedInline):
model = Foto
class GaleriaAdmin(admin.ModelAdmin):
inlines = [FotoInline, VideoInline]
admin.site.register(Galeria, GaleriaAdmin)
When a galeria is saved in the django administration, I want to perform
a validation that involves his fotos. ..
They are edited at the same time because I use inline in the admin.
But cannot do that in Galeria.save, nor GaleriaAdmin.save_model, nor in
a postsave event from galeria, because at the time it is called the
fotos have not been saved yet.
Where should I do it the validation?
Have to define a GaleriaForm and do something there?
signature.asc
Description: OpenPGP digital signature

