diff options
-rw-r--r-- | static/website/templates/navbar.html | 2 | ||||
-rw-r--r-- | static/website/templates/proposal.html | 4 | ||||
-rwxr-xr-x | website/forms.py | 10 | ||||
-rw-r--r-- | website/models.py | 15 | ||||
-rw-r--r-- | website/urls.py | 2 | ||||
-rw-r--r-- | website/views.py | 43 |
6 files changed, 9 insertions, 67 deletions
diff --git a/static/website/templates/navbar.html b/static/website/templates/navbar.html index 499c97f..f9bdf3b 100644 --- a/static/website/templates/navbar.html +++ b/static/website/templates/navbar.html @@ -47,7 +47,7 @@ {{ user.username }}!<span class="caret"></span> </a> <ul class="dropdown-menu"> - <li><a href="{% url 'website:proposal' %}">Submit your Paper</a></li> + <!-- <li><a href="{% url 'website:proposal' %}">Submit your Paper</a></li> --> <!-- <li><a href="{{SITE_URL}}/#registration">Book your Ticket</a></li> --> <li><a href="{% url 'auth:logout' %}?next=/nccps-2018"><i class="fa fa-sign-out"></i> Logout</a></li> </ul> diff --git a/static/website/templates/proposal.html b/static/website/templates/proposal.html index 4a34561..34aaef4 100644 --- a/static/website/templates/proposal.html +++ b/static/website/templates/proposal.html @@ -47,13 +47,13 @@ {% if user.is_superuser %} <center> <a href="{% url 'website:view_abstracts' %}" class="btn btn-info">View Proposals</a> - <a href="{% url 'website:submitcfp' %}" class ="btn btn-info" role="button"> Submit paper </a> + <!-- <a href="{% url 'website:submitcfp' %}" class ="btn btn-info" role="button"> Submit paper </a> --> <!-- <a href="{{SITE_URL}}/#registration" class ="btn btn-info" role="button">Book your ticket </a> --> </center> {% else %} <center> <a href="{% url 'website:view_abstracts' %}" class="btn btn-info">View Proposals</a> - <a href="{% url 'website:submitcfp' %}" class ="btn btn-info" role="button"> Submit paper </a> + <!-- <a href="{% url 'website:submitcfp' %}" class ="btn btn-info" role="button"> Submit paper </a> --> <!-- <a href="{{SITE_URL}}/#registration" class ="btn btn-info" role="button">Book your ticket</a> --> </center> {% endif %} diff --git a/website/forms.py b/website/forms.py index d833979..72bdace 100755 --- a/website/forms.py +++ b/website/forms.py @@ -377,11 +377,5 @@ class UserRegistrationForm(forms.Form): new_profile.save() key = Profile.objects.get(user=new_user).activation_key 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 + +
\ No newline at end of file diff --git a/website/models.py b/website/models.py index 0a6e690..7906960 100644 --- a/website/models.py +++ b/website/models.py @@ -1,6 +1,5 @@ from django.db import models from django.contrib.auth.models import User - from social.apps.django_app.default.models import UserSocialAuth from nccps2018 import settings from django.core.validators import RegexValidator @@ -99,13 +98,7 @@ class Profile(models.Model): self.user.last_name, self.user.email ) - -"""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 + + + +
\ No newline at end of file diff --git a/website/urls.py b/website/urls.py index 57e5bae..2d4e8d8 100644 --- a/website/urls.py +++ b/website/urls.py @@ -18,8 +18,6 @@ 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 ea44a0b..7e10006 100644 --- a/website/views.py +++ b/website/views.py @@ -990,47 +990,4 @@ def view_profile(request): return redirect('/login/') except: return redirect('/register/') -"""@csrf_protect -@login_required -def question_add(request): - context = {} - if request.user.is_authenticated: - social_user = request.user - - django_user = User.objects.get(username=social_user) - context['user'] = django_user - if request.method == 'POST': - form = QuestionForm(request.POST) - if form.is_valid(): - data = form.save(commit=False) - data.user = django_user - data.email = social_user.email - data.save() - return render_to_response('question-display.html', context) - return HttpResponse(template.render(context, request)) - else: - context['qform'] = form - template = loader.get_template('question-display.html') - return HttpResponse(template.render(context, request)) - else: - form = QuestionForm() - return render(request, 'question-display.html', {'qform': form}) - else: - context['login_required'] = True - return render_to_response('login.html', context) -@csrf_protect -def quiz_view(request): - context = {} - if request.user.is_authenticated: - social_user = request.user - django_user = User.objects.get(username=social_user) - questions = Question.objects.all() - context['user'] = django_user - context['questions'] = questions - template = loader.get_template('quiz-display.html') - return HttpResponse(template.render(context, request)) - else: - context['login_required'] = True - return render_to_response('login.html', context) -""" |