X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=blobdiff_plain;f=portal%2Fviews.py;h=de2a9971816d9469520a8106be47913b6ab3ca90;hp=e554f1bdfc4484be246e70d673c165d3353c0bd5;hb=00ccef62a48c74fabda3b047fd78a7411e73f691;hpb=03fbefe41df821b460c228b9273e6c2486af0e8a diff --git a/portal/views.py b/portal/views.py index e554f1bd..de2a9971 100644 --- a/portal/views.py +++ b/portal/views.py @@ -24,7 +24,6 @@ import os.path, re import json -#from django.views.generic import View from django.views.generic.base import TemplateView from django.shortcuts import render from django.template.loader import render_to_string @@ -38,7 +37,7 @@ from plugins.pres_view import PresView from portal.event import Event from portal import signals -from portal.forms import SliceRequestForm, ContactForm +from portal.forms import SliceRequestForm from portal.util import RegistrationView, ActivationView from portal.models import PendingUser, PendingSlice from portal.actions import authority_get_pi_emails, get_request_by_authority, manifold_add_user, manifold_update_user @@ -234,38 +233,6 @@ def register_4m_f4f(request): }) -# view for contact form -def contact(request): - if request.method == 'POST': # If the form has been submitted... - form = ContactForm(request.POST) # A form bound to the POST data - if form.is_valid(): # All validation rules pass - # Process the data in form.cleaned_data - first_name = form.cleaned_data['first_name'] - last_name = form.cleaned_data['last_name'] - affiliation = form.cleaned_data['affiliation'] - subject = form.cleaned_data['subject'] - message = form.cleaned_data['message'] - email = form.cleaned_data['email'] # email of the sender - cc_myself = form.cleaned_data['cc_myself'] - - #recipients = authority_get_pi_emails(authority_hrn) - recipients = ['yasin.upmc@gmail.com'] - if cc_myself: - recipients.append(email) - - from django.core.mail import send_mail - send_mail("Onelab user submitted a query ", [first_name,last_name,affiliation,subject,message], email, recipients) - return render(request,'contact_sent.html') # Redirect after POST - else: - form = ContactForm() # An unbound form - - return render(request, 'contact.html', { - 'form': form, - 'topmenu_items': topmenu_items('Contact Us', request), - 'username': the_user (request) - - }) - @login_required def slice_request(request): errors = []