Skip to content

Instantly share code, notes, and snippets.

@Allwin12
Last active July 19, 2020 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Allwin12/2ba4cf66628634abde5836184cf7a338 to your computer and use it in GitHub Desktop.
Save Allwin12/2ba4cf66628634abde5836184cf7a338 to your computer and use it in GitHub Desktop.
inactive_students = Student.objects.filter(is_active=False)
for student in inactive_students:
student.is_active = True
student.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment