summaryrefslogtreecommitdiff
path: root/tests/regressiontests/file_uploads/models.py
blob: 28e71c44bc880d2474b54a6d5827074dd4a175fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import tempfile
import os

from django.core.files.storage import FileSystemStorage
from django.db import models


temp_storage = FileSystemStorage(tempfile.mkdtemp())
UPLOAD_TO = os.path.join(temp_storage.location, 'test_upload')

class FileModel(models.Model):
    testfile = models.FileField(storage=temp_storage, upload_to='test_upload')