From 47a1d4589b9f549892939f62879604713dbe772a Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Tue, 24 May 2016 20:40:21 +0530 Subject: Add tests for views --- yaksh/models.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'yaksh/models.py') 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): -- cgit