1
0
mirror of https://github.com/django/django.git synced 2024-12-27 03:25:58 +00:00
django/tests/regressiontests/file_uploads/models.py

10 lines
227 B
Python

import tempfile
import os
from django.db import models
UPLOAD_ROOT = tempfile.mkdtemp()
UPLOAD_TO = os.path.join(UPLOAD_ROOT, 'test_upload')
class FileModel(models.Model):
testfile = models.FileField(upload_to=UPLOAD_TO)