summaryrefslogtreecommitdiff
path: root/tests/djapp/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/djapp/models.py')
-rw-r--r--tests/djapp/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/djapp/models.py b/tests/djapp/models.py
index c107add..52acebe 100644
--- a/tests/djapp/models.py
+++ b/tests/djapp/models.py
@@ -22,7 +22,9 @@
"""Helpers for testing django apps."""
+import os.path
+from django.conf import settings
from django.db import models
class StandardModel(models.Model):
@@ -34,3 +36,9 @@ class NonIntegerPk(models.Model):
bar = models.CharField(max_length=20, blank=True)
+WITHFILE_UPLOAD_TO = 'django'
+WITHFILE_UPLOAD_DIR = os.path.join(settings.MEDIA_ROOT, WITHFILE_UPLOAD_TO)
+
+class WithFile(models.Model):
+ afile = models.FileField(upload_to=WITHFILE_UPLOAD_TO)
+