summaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorSashi202018-10-03 12:11:47 +0530
committerGitHub2018-10-03 12:11:47 +0530
commit51d4feffd7f8210b0b865c279d76b1aa216649b9 (patch)
tree932c65d01781a02f37834f65bc7c702d6b9b3abd /website
parent806ce24ff78a82810cb54c04070a902e3b9df1b2 (diff)
parent4b069e08b7a56d2b57c128a326caf9eb97e47f7c (diff)
downloadnccps-2018-51d4feffd7f8210b0b865c279d76b1aa216649b9.tar.gz
nccps-2018-51d4feffd7f8210b0b865c279d76b1aa216649b9.tar.bz2
nccps-2018-51d4feffd7f8210b0b865c279d76b1aa216649b9.zip
Merge pull request #20 from Sashi20/master
Disabled unncessary urls
Diffstat (limited to 'website')
-rwxr-xr-xwebsite/forms.py10
-rw-r--r--website/models.py14
-rw-r--r--website/urls.py2
-rw-r--r--website/views.py2
4 files changed, 24 insertions, 4 deletions
diff --git a/website/forms.py b/website/forms.py
index 5631d46..d833979 100755
--- a/website/forms.py
+++ b/website/forms.py
@@ -376,4 +376,12 @@ class UserRegistrationForm(forms.Form):
timezone.timedelta(days=1)
new_profile.save()
key = Profile.objects.get(user=new_user).activation_key
- return u_name, pwd, key \ No newline at end of file
+ return u_name, pwd, key
+
+#class QuestionForm(forms.ModelForm):
+ """Creates a form to add or edit a Question.
+ It has the related fields and functions required."""
+
+""" class Meta:
+ model = Question
+ exclude = ['user', 'active'] """ \ No newline at end of file
diff --git a/website/models.py b/website/models.py
index d550548..0a6e690 100644
--- a/website/models.py
+++ b/website/models.py
@@ -32,7 +32,7 @@ def get_document_dir(instance, filename):
fname, fext = os.path.splitext(filename)
# print "----------------->",instance.user
return '%s/attachment/%s/%s.%s' % (instance.user, instance.proposal_type, fname+'_'+str(instance.user), fext)
-
+
class Proposal(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE,)
@@ -98,4 +98,14 @@ class Profile(models.Model):
self.user.first_name,
self.user.last_name,
self.user.email
- ) \ No newline at end of file
+ )
+
+"""class Question(models.Model):
+ Question for a quiz.
+
+ question = models.CharField(max_length=100)
+ option_1 = models.CharField(max_length=100)
+ option_2 = models.CharField(max_length=100)
+ option_3 = models.CharField(max_length=100)
+ option_4 = models.CharField(max_length=100)
+ correct_answer = models.CharField(max_length=100) """ \ No newline at end of file
diff --git a/website/urls.py b/website/urls.py
index 2d4e8d8..57e5bae 100644
--- a/website/urls.py
+++ b/website/urls.py
@@ -18,6 +18,8 @@ urlpatterns = [
re_path(r'^cfp/$', views.cfp, name='cfp'),
+ #re_path(r'^quiz/$', views.quiz_view, name='quiz_view'),
+ #re_path(r'^question-add/$', views.question_add, name='question_add'),
re_path(r'^submit-cfp/$', views.submitcfp, name='submitcfp'),
re_path(r'^submit-cfw/$', views.submitcfw, name='submitcfw'),
#url(r'^submit-cfp/$', 'website.views.cfp', name='home'),
diff --git a/website/views.py b/website/views.py
index 0712b23..ea44a0b 100644
--- a/website/views.py
+++ b/website/views.py
@@ -1033,4 +1033,4 @@ def quiz_view(request):
else:
context['login_required'] = True
return render_to_response('login.html', context)
-
+"""