-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
started seantis questionnaire integration / extension
- Loading branch information
Marco Bardelli
committed
Dec 14, 2012
1 parent
50d6bfb
commit b8de37f
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
django/contrib/aderit/questionnaire_extensions/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# django.contrib.aderit.questionnaire_extensions -- python module | ||
# | ||
# Copyright (C) 2012 Aderit srl | ||
# | ||
# Author: Marco Bardelli <marco.bardelli@aderit.it>, | ||
# <bardelli.marco@gmail.com> | ||
# | ||
# This file is part of DjangoContribAderit. | ||
# | ||
# DjangoContribAderit is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# DjangoContribAderit is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with DjangoContribAderit. If not, see <http://www.gnu.org/licenses/>. | ||
''' | ||
Seantis Questionnaire extensions by Aderit. | ||
''' | ||
__copyright__ = '''Copyright (C) 2012 Aderit srl''' | ||
|
||
from django.conf import settings | ||
|
||
if 'questionnaire' in settings.INSTALLED_APPS: | ||
#from questionnaire.models import Subject as SQSubject | ||
#from questionnaire.models import QuestionSet as SQQuestionSet | ||
from questionnaire.models import (Questionnaire, Question, Answer, | ||
RunInfo, RunInfoHistory, Choice) | ||
from django.contrib.aderit.questionnaire_extensions.models import Subject | ||
from django.contrib.aderit.questionnaire_extensions.models import QuestionSet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# django.contrib.aderit.questionnaire_extensions.models -- python module | ||
# | ||
# Copyright (C) 2012 Aderit srl | ||
# | ||
# Author: Marco Bardelli <marco.bardelli@aderit.it>, | ||
# <bardelli.marco@gmail.com> | ||
# | ||
# This file is part of DjangoContribAderit. | ||
# | ||
# DjangoContribAderit is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# DjangoContribAderit is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with DjangoContribAderit. If not, see <http://www.gnu.org/licenses/>. | ||
''' | ||
Seantis Questionnaire models extensions by Aderit. | ||
''' | ||
__copyright__ = '''Copyright (C) 2012 Aderit srl''' | ||
|
||
try: | ||
from questionnaire.models import Subject as SQSubject | ||
from questionnaire.models import QuestionSet as SQQuestionSet | ||
from django.contrib.aderit.questionnaire_extensions import \ | ||
(Questionnaire, Question, Answer, | ||
RunInfo, RunInfoHistory, Choice) | ||
except ImportError: | ||
pass | ||
else: | ||
class Subject(SQSubject): | ||
class Meta: | ||
proxy = True | ||
|
||
class QuestionSet(SQQuestionSet): | ||
class Meta: | ||
proxy = True | ||
|