MCPcopy Create free account
hub / github.com/graphql-python/graphene-django / Article

Class Article

graphene_django/tests/models.py:155–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153
154
155class Article(models.Model):
156 headline = models.CharField(max_length=100)
157 pub_date = models.DateField(auto_now_add=True)
158 pub_date_time = models.DateTimeField(auto_now_add=True)
159 reporter = models.ForeignKey(
160 Reporter, on_delete=models.CASCADE, related_name="articles"
161 )
162 editor = models.ForeignKey(
163 Reporter, on_delete=models.CASCADE, related_name="edited_articles_+"
164 )
165 lang = models.CharField(
166 max_length=2,
167 help_text="Language",
168 choices=[("es", "Spanish"), ("en", "English")],
169 default="es",
170 )
171 importance = models.IntegerField(
172 "Importance",
173 null=True,
174 blank=True,
175 choices=[(1, "Very important"), (2, "Not as important")],
176 )
177
178 def __str__(self): # __unicode__ on Python 2
179 return self.headline
180
181 class Meta:
182 ordering = ("headline",)

Callers 2

resolve_articlesMethod · 0.70
get_nodeMethod · 0.70

Calls

no outgoing calls

Tested by 2

resolve_articlesMethod · 0.56
get_nodeMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…