summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authorankitjavalkar2016-05-24 20:40:21 +0530
committerankitjavalkar2016-07-08 12:36:46 +0530
commit47a1d4589b9f549892939f62879604713dbe772a (patch)
tree292e8c0174898b807a204678e4765a79aa9db67d /yaksh/models.py
parent9800ef3dd309089c41e74cf2120f9b0f4eef6fa8 (diff)
downloadonline_test-47a1d4589b9f549892939f62879604713dbe772a.tar.gz
online_test-47a1d4589b9f549892939f62879604713dbe772a.tar.bz2
online_test-47a1d4589b9f549892939f62879604713dbe772a.zip
Add tests for views
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 7035d1e..cc63615 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -58,6 +58,10 @@ def get_model_class(model):
return model_class
+def has_profile(user):
+ """ check if user has profile """
+ return True if hasattr(user, 'profile') else False
+
###############################################################################
class CourseManager(models.Manager):