django-lifecycle icon indicating copy to clipboard operation
django-lifecycle copied to clipboard

Declarative model lifecycle hooks, an alternative to Signals.

Results 44 django-lifecycle issues
Sort by recently updated
recently updated
newest added

Bumps [django](https://github.com/django/django) from 3.2.8 to 3.2.15. Commits 653a7bd [3.2.x] Bumped version for 3.2.15 release. b3e4494 [3.2.x] Fixed CVE-2022-36359 -- Escaped filename in Content-Disposition header. cb7fbac [3.2.x] Fixed collation tests on...

dependencies

Hi there! I've just created a simple model: ``` class SomeModel(models.Model, LifecycleModelMixin): is_active = models.BooleanField(default=False) def __str__(self): return str(self.is_active) @hook(AFTER_UPDATE, when='is_active', was=True, is_now=False) def is_active_signal(self): print('works') ``` It didn't work...

It's not a big deal to the workflow I am trying to build, but I was surprised to see that a model's id/pk field is set to None by the...

The objective here is to get a working CI workflow setup using GitHub Actions as a replacement for Travis CI. This is prep work for additional changes in the pipeline,...

This small change allows triggering a hook when any field for a model changes. Unlike `when_any`, this doesn't require enumerating all fields, which can be a pain for very large...

I think you SHOULD update the documentation because it caused me to waste lot of time trying to figure out why foreign keys triggers are not working before reading that...

Hi, I think `django-lifecycle` is a great library. I would like to use this library in my project as well. It would be great if we could add [github-actions](https://github.co.jp/features/actions) for...

enhancement

Hi, I have 2 models: ``` class Model_A(LifecycleModelMixin, models.Model): code = models.CharField(max_length=50) class Model_B(LifecycleModelMixin, models.Model): code = models.CharField(max_length=50) model_a = models.ForeignKey(to="app.Model_A", on_delete=models.CASCADE, blank=True, null=True) @hook(AFTER_DELETE) def do_after_delete(self): print("AFTER_DELETE") @hook(BEFORE_DELETE) def...

Calling `model_object.delete()` successfully calls both BEFORE_DELETE and AFTER_DELETE hooks but if the same object is deleted from Django admin the hooks are not being called.

Hello, today I tried to move some our signals to the hooks and realised that if column was added into model init then it is shown as not changed. Ex:...