Debian Codegraph @

integration_test/integration_app/models.py

raw
1 from django.db import models
2
3
4 class MyModel(models.Model):
5 name = models.TextField(unique=True)
6
7
8 def add_mymodel(name):
9 m = MyModel(name=name)
10 m.save()
11
12
13 # causes a DB connection at import-time
14 # see TestIntegration.test_worker_lost_connection
15 list(MyModel.objects.all())