1
0
mirror of https://github.com/django/django.git synced 2024-11-19 16:04:13 +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)