mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 03:54:01 +03:00
Define the upload_to for file fields.
This commit is contained in:
parent
e4c25e0ff2
commit
c6d89afdf7
|
@ -176,8 +176,8 @@ class AMOAFModel(RESTFrameworkModel):
|
||||||
comma_separated_integer_field = models.CommaSeparatedIntegerField(max_length=1024, blank=True)
|
comma_separated_integer_field = models.CommaSeparatedIntegerField(max_length=1024, blank=True)
|
||||||
decimal_field = models.DecimalField(max_digits=64, decimal_places=32, blank=True)
|
decimal_field = models.DecimalField(max_digits=64, decimal_places=32, blank=True)
|
||||||
email_field = models.EmailField(max_length=1024, blank=True)
|
email_field = models.EmailField(max_length=1024, blank=True)
|
||||||
file_field = models.FileField(max_length=1024, blank=True)
|
file_field = models.FileField(upload_to='test', max_length=1024, blank=True)
|
||||||
image_field = models.ImageField(max_length=1024, blank=True)
|
image_field = models.ImageField(upload_to='test', max_length=1024, blank=True)
|
||||||
slug_field = models.SlugField(max_length=1024, blank=True)
|
slug_field = models.SlugField(max_length=1024, blank=True)
|
||||||
url_field = models.URLField(max_length=1024, blank=True)
|
url_field = models.URLField(max_length=1024, blank=True)
|
||||||
|
|
||||||
|
@ -185,8 +185,8 @@ class DVOAFModel(RESTFrameworkModel):
|
||||||
positive_integer_field = models.PositiveIntegerField(blank=True)
|
positive_integer_field = models.PositiveIntegerField(blank=True)
|
||||||
positive_small_integer_field = models.PositiveSmallIntegerField(blank=True)
|
positive_small_integer_field = models.PositiveSmallIntegerField(blank=True)
|
||||||
email_field = models.EmailField(blank=True)
|
email_field = models.EmailField(blank=True)
|
||||||
file_field = models.FileField(blank=True)
|
file_field = models.FileField(upload_to='test', blank=True)
|
||||||
image_field = models.ImageField(blank=True)
|
image_field = models.ImageField(upload_to='test', blank=True)
|
||||||
slug_field = models.SlugField(blank=True)
|
slug_field = models.SlugField(blank=True)
|
||||||
url_field = models.URLField(blank=True)
|
url_field = models.URLField(blank=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user