Skip to content
Snippets Groups Projects
models.py 390 B
Newer Older
  • Learn to ignore specific revisions
  • from django.conf import settings
    from django.db import models
    
    
    class Review(models.Model):
        submission = models.ForeignKey('funds.ApplicationSubmission', on_delete=models.CASCADE)
        author = models.ForeignKey(
            settings.AUTH_USER_MODEL,
            on_delete=models.PROTECT,
        )
        review = models.TextField()
    
        class Meta:
            unique_together = ('author', 'submission')