Skip to content

Instantly share code, notes, and snippets.

@bogdangoie
Created February 3, 2016 00:13
Show Gist options
  • Save bogdangoie/cb0f3058cc66c7ec314d to your computer and use it in GitHub Desktop.
Save bogdangoie/cb0f3058cc66c7ec314d to your computer and use it in GitHub Desktop.

Revisions

  1. bogdangoie created this gist Feb 3, 2016.
    3 changes: 3 additions & 0 deletions conditional_when_ex.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    from django.db.models import When

    When(is_active=True, then=1)