File: models.py

package info (click to toggle)
django-prometheus 2.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 568 kB
  • sloc: python: 1,776; sh: 5; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 451 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
from django.db.models import CharField, Model, PositiveIntegerField

from django_prometheus.models import ExportModelOperationsMixin


class Dog(ExportModelOperationsMixin("dog"), Model):
    name = CharField(max_length=100, unique=True)
    breed = CharField(max_length=100, blank=True, null=True)
    age = PositiveIntegerField(blank=True, null=True)


class Lawn(ExportModelOperationsMixin("lawn"), Model):
    location = CharField(max_length=100)