1
0
mirror of https://github.com/django/django.git synced 2024-12-25 18:46:22 +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)