File: models.py

package info (click to toggle)
python-django-pgtransaction 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 504 kB
  • sloc: python: 551; makefile: 101; sh: 9
file content (8 lines) | stat: -rw-r--r-- 267 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
from django.contrib.auth.models import User
from django.db import models


class Trade(models.Model):
    company = models.CharField(max_length=36, unique=True)
    price = models.FloatField()
    owner = models.ForeignKey(User, null=True, on_delete=models.SET_NULL)