aboutsummaryrefslogtreecommitdiffstats
path: root/account/models.py
diff options
context:
space:
mode:
authorWeitian LI <liweitianux@gmail.com>2014-04-29 00:49:26 +0800
committerWeitian LI <liweitianux@gmail.com>2014-04-29 00:49:26 +0800
commitb95b09491a12745de669e57a91167dd9ec5b3d0a (patch)
tree212eb442f31312917f05bd0e5b073a8314d5527e /account/models.py
parentefe31dcaf500ac93338c1e493672dbedbcecde7a (diff)
downloaddjango-skaschool-b95b09491a12745de669e57a91167dd9ec5b3d0a.tar.bz2
* fixed FieldFile import problem of account/extra.py
* updated models.py and added 'help_text' to transcript field * using 'get_object_or_404' in views.py instead of simply get method
Diffstat (limited to 'account/models.py')
-rw-r--r--account/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/account/models.py b/account/models.py
index 9c3f44e..1816c62 100644
--- a/account/models.py
+++ b/account/models.py
@@ -8,7 +8,6 @@ from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth import login
-from django.db.models.fields.files import FieldFile
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import pre_delete
@@ -73,6 +72,7 @@ class UserProfile(models.Model):
# transcript: needed if undergraudate (junior and below)
transcript = ContentTypeRestrictedFileField(upload_to=lambda instance, filename: u'account/{0}/{1}'.format(instance.user.username, filename),
verbose_name=_("Transcript"), blank=True, null=True,
+ help_text=_("Undergraduate (junior and below) required to upload transcript."),
storage=OverwriteStorage(),
content_types=settings.ALLOWED_CONTENT_TYPES,
max_upload_size=settings.ALLOWED_MAX_UPLOAD_SIZE)