From 4b069e08b7a56d2b57c128a326caf9eb97e47f7c Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Wed, 3 Oct 2018 12:11:09 +0530 Subject: Disabled unncessary urls --- website/forms.py | 10 +++++++++- website/models.py | 14 ++++++++++++-- website/urls.py | 2 ++ website/views.py | 2 +- 4 files changed, 24 insertions(+), 4 deletions(-) (limited to 'website') 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) - +""" -- cgit