Add support for ordering
This commit is contained in:
@@ -2,12 +2,15 @@ from django.db import models
|
||||
from django.core.validators import MinValueValidator, MaxValueValidator
|
||||
import uuid
|
||||
|
||||
|
||||
class Task(models.Model):
|
||||
title = models.CharField(max_length=255)
|
||||
description = models.TextField()
|
||||
price_from = models.IntegerField(validators=[MinValueValidator(0)])
|
||||
price_to = models.IntegerField(validators=[MinValueValidator(0)])
|
||||
needed_information = models.JSONField()
|
||||
|
||||
needed_information = models.JSONField(default=dict)
|
||||
order = models.IntegerField(null=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
Reference in New Issue
Block a user