"
+ return json.dumps({'html_content':html_content})
+
+@dajaxice_register
+def del_member(request, team_id, member_id):
+ user = get_object_or_404(UserProfile, pk=member_id)
+ message = "Do you want to remove " + str(user.user.get_full_name()) + " ?"
+ return json.dumps({'message':message, 'team_id':team_id, 'member_id':member_id})
+
+@dajaxice_register
+def delete_member(request, team_id, member_id):
+ team = HospiTeam.objects.get(pk=team_id)
+ data = request.POST.copy()
+ user = get_object_or_404(UserProfile, pk=member_id)
+ message = "Successfully removed " + str(user.user.get_full_name())
+ team.members.remove(user)
+ user.save()
+ team.save()
+ return json.dumps({'message':message})
+
+@dajaxice_register
+def del_member_from_room(request, room_id, user_id):
+ try:
+ room = Room.objects.get(pk=room_id)
+ user = get_object_or_404(UserProfile, pk=user_id)
+ room.occupants.remove(user)
+ room.save()
+ message = "Success"
+ except:
+ message = "Error"
+ return json.dumps({'message':message, 'room_id':room_id})
+
+@dajaxice_register
+def add_member_to_room(request, room_id, user_id):
+ try:
+ room = Room.objects.get(pk=room_id)
+ user = get_object_or_404(User, pk=user_id)
+ room.occupants.add(user.profile)
+ room.save()
+ message = "Success"
+ except Exception, e:
+ message = "Error"+e.message
+ return json.dumps({'message':message, 'room_id':room_id})
+
+@dajaxice_register
+def registered_teams(request):
+ html_content = render_to_string('portals/hospi/registered_teams.html', {}, RequestContext(request))
+ return json.dumps({'html_content':html_content})
diff --git a/apps/portals/hospi/forms.py b/apps/portals/hospi/forms.py
new file mode 100644
index 0000000..e69de29
diff --git a/apps/portals/hospi/models.py b/apps/portals/hospi/models.py
new file mode 100644
index 0000000..e69de29
diff --git a/apps/portals/hospi/tests.py b/apps/portals/hospi/tests.py
new file mode 100755
index 0000000..7ce503c
--- /dev/null
+++ b/apps/portals/hospi/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/apps/portals/hospi/views.py b/apps/portals/hospi/views.py
new file mode 100755
index 0000000..29e63ed
--- /dev/null
+++ b/apps/portals/hospi/views.py
@@ -0,0 +1,901 @@
+from django.shortcuts import render
+from apps.walls.models import Wall
+from apps.users.models import UserProfile, ERPProfile, Dept, Subdept, Page
+from apps.hospi.models import HospiTeam, Hostel, Room, Allotment, HospiLog
+from apps.hospi.forms import HostelForm, RoomForm, HospiTeamForm
+from django.shortcuts import get_object_or_404, render_to_response, redirect, HttpResponseRedirect
+from django.core.exceptions import PermissionDenied
+from misc.utils import *
+#from itertools import chain
+from django.conf import settings
+from apps.hospi import utility as u
+import time, datetime
+
+# Create your views here.
+def auto_id(user_id):
+ base = 'SA15W'
+ num = "{0:0>5d}".format(user_id)
+ sid = base + num
+ return sid
+
+def hospi_portal(request):
+ return render(request,'portals/hospi/hospi_base.html')
+ '''
+ user = request.user
+ link_list = []
+ erp_profile = user.erp_profile
+ position = erp_profile.get_position(request)
+ date = datetime.date.today().strftime('%Y-%m-%d')
+ relations = list() + list(erp_profile.supercoord_relations.all()) + list(erp_profile.coord_relations.all())
+ for core in erp_profile.core_relations.all():
+ position = core.name + " Core"
+ dept = core.name
+ link = settings.GOOGLE_FORMS['finance_saarang'] %(dept, position, erp_profile.name,user.profile.mobile_number, user.email, date )
+ link_list.append((position,link))
+
+ for supercoord in erp_profile.supercoord_relations.all():
+ position = supercoord.name + " SuperCoord"
+ dept = supercoord.name
+ link = settings.GOOGLE_FORMS['finance_saarang'] %(dept, position, erp_profile.name,user.profile.mobile_number, user.email, date )
+ link_list.append((position, link))
+
+ for coord in erp_profile.coord_relations.all():
+ position = coord.dept.name +'('+ coord + ')' + " Coord"
+ dept = coord.dept.name
+ link = settings.GOOGLE_FORMS['finance_saarang'] %(dept, position, erp_profile.name,user.profile.mobile_number, user.email, date )
+ link_list.append((position, link))
+
+ club = " "
+ link = settings.GOOGLE_FORMS['finance_clubs'] %(club, position, erp_profile.name,user.profile.mobile_number, user.email, date )
+ link_list.append(("Cultural Club", link))
+ '''
+ local_context = {
+ "list":"list",
+ "current_page":"portal_hospi"
+ }
+
+ return render_to_response('portals/hospi/hospi_portal.html', local_context, context_instance= global_context(request))
+
+#Exclusively handles control room, but added 'all' feature just in case. Take note, one in apps.hospi.views has 0 arguments
+def add_accomodation(request, team_id):
+ data = request.POST.copy()
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ if data['updating'] == 'all':
+ team.date_of_arrival = data['arr_date']
+ team.date_of_departure = data['dep_date']
+ team.time_of_arrival = data['arr_time']
+ team.time_of_departure = data['dep_time']
+ if team.accomodation_status == 'not_req':
+ team.accomodation_status = 'requested'
+ messages.success(request, 'Successfully requested for accommodation.')
+ else:
+ messages.success(request, 'Details successfully updated.')
+ team.save()
+ return redirect('hospi_team_details', int(team_id))
+ elif data['updating'] == 'control_room':
+ team.city = data['city']
+ team.date_of_arrival = data['arr_date']
+ team.date_of_departure = data['dep_date']
+ team.time_of_arrival = data['arr_time']
+ team.time_of_departure = data['dep_time']
+ team.mattress_count = int(data['mattress_count'])
+ team.save()
+ messages.success(request, 'Saved successfully')
+ return redirect('hospi_team_details', int(team_id))
+ return redirect('hospi_team_details', int(team_id))
+'''
+# Create your views here.
+from django.http import HttpResponseRedirect, HttpResponse, Http404
+from django.core.urlresolvers import reverse
+from django.shortcuts import render, redirect, get_object_or_404
+from django.contrib.auth.decorators import login_required
+from django.contrib import messages
+from django.conf import settings
+from django.core.mail import send_mail, send_mass_mail, EmailMessage
+import utility as u
+import random, string, json
+from random import *
+from registration.views import auto_id as uid
+from registration.models import SaarangUser
+from registration.forms import SaarangUserForm
+from models import Hostel, Room, HospiTeam, Allotment, HospiLog
+from events.models import Team, EventRegistration, Event
+from forms import HostelForm, RoomForm, HospiTeamForm
+from events.forms import AddTeamForm
+from mailer.models import MailLog
+from post_office import mail
+import datetime
+from django.views.decorators.csrf import csrf_exempt
+
+####################################################################
+# Mainsite Views
+
+def prehome(request):
+ if not request.session.get('saaranguser_email'):
+ return redirect('hospi_login')
+ email = request.session.get('saaranguser_email')
+ user = SaarangUser.objects.get(email=email)
+ teams_leading = user.team_leader.all().exclude(accomodation_status='hospi')
+ teams_member = user.team_members.all()
+ hospi_teams_leading = user.hospi_team_leader.all()
+ hospi_teams_member = user.hospi_team_members.all()
+ if not user.profile_is_complete():
+ messages.error(request, "Your profile is not complete. Click here to update your profile. ")
+ return render(request, 'hospi/prehome.html', locals())
+
+def set_hospi_team(request, team_id):
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ members = team.members.all()
+ confirmed_list=[]
+ if team.leader.accomod_is_confirmed:
+ messages.error(request, 'Your accommodation has been confirmed in another team. \
+ You cannot request for accommodation again.')
+ return redirect('hospi_prehome')
+
+ team.accomodation_status = 'requested'
+ team.save()
+ request.session['current_team'] = team_id
+ return redirect('hospi_home')
+
+def set_event_team(request, event_team_id):
+ event_team = get_object_or_404(Team, pk=event_team_id)
+ if event_team.leader.accomod_is_confirmed:
+ messages.error(request, 'Your accommodation has been confirmed in another team. \
+ You cannot request for accommodation again.')
+ return redirect('hospi_prehome')
+ team = HospiTeam.objects.create(name=event_team.name, \
+ leader=event_team.leader, accomodation_status='requested')
+ for user in event_team.members.all():
+ team.members.add(user)
+ team.team_sid = auto_id(team.pk)
+ event_team.accomodation_status = 'hospi'
+ event_team.save()
+ team.save()
+ request.session['current_team'] = team.pk
+ return redirect('hospi_home')
+
+def details(request, team_id):
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ request.session['current_team'] = team.pk
+ return redirect('hospi_home')
+
+def home(request):
+ if not request.session.get('saaranguser_email'):
+ return redirect('hospi_login')
+ email = request.session.get('saaranguser_email')
+ user = SaarangUser.objects.get(email=email)
+ if not user.profile_is_complete():
+ messages.error(request, "Your profile is not complete. Click here to update your profile. ")
+ return redirect('hospi_prehome')
+ if not request.session.get('current_team'):
+ return redirect('hospi_prehome')
+ team_id = request.session.get('current_team')
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ if team.members.filter(email=team.leader.email):
+ team.members.remove(team.leader)
+ messages.warning(request, 'Team leader found in members list also. Successfully removed!')
+ members = team.members.all()
+ msg=''
+ if team.accomodation_status != 'confirmed':
+ for member in members:
+ if member.accomod_is_confirmed:
+ msg += member.email +', '
+ if msg:
+ messages.warning(request, msg + ': These members already have accommodation \
+ confirmed in other team. Please remove them, or they will be automatically \
+ removed upon confirmation.')
+ edits = ['not_req', 'requested']
+ if team.accomodation_status in edits:
+ editable = True
+ else:
+ editable = False
+ bill_data = u.bill(team.date_of_arrival, team.time_of_arrival, team.date_of_departure, team.time_of_departure, team.get_total_count())
+ to_return = {
+ 'editable':editable,
+ 'leader':user,
+ 'team':team,
+ 'members':members,
+ 'bill_data':bill_data,
+ }
+ return render(request, 'hospi/home.html', to_return)
+
+def login(request):
+ if request.method == 'POST':
+ data=request.POST.copy()
+ try:
+ user = SaarangUser.objects.get(email=data['email'])
+ try:
+ teams = user.team_leader.all()
+ except Exception, e:
+ messages.error(request, 'You do not lead any team. Please create a team.')
+ return render(request, 'hospi/login.html')
+ if user.password == data['password']:
+ request.session['saaranguser_email'] = user.email
+ return redirect('hospi_prehome')
+ else:
+ messages.error(request, 'Did you misspell your password?')
+ except Exception, e:
+ messages.error(request, 'Is your email id correct?')
+ return render(request, 'hospi/login.html')
+
+def logout(request):
+ try:
+ del request.session['saaranguser_email']
+ messages.success(request, 'You have been logged out.')
+ except KeyError:
+ messages.warning(request, 'Please login first.')
+ return redirect('hospi_login')
+
+
+def add_members(request):
+ data = request.POST.copy()
+ team = get_object_or_404(HospiTeam, pk=data['team_id'])
+ return_list = zip(dict(request.POST)['email'],dict(request.POST)['college_id'])
+ not_registered =[]
+ members = []
+ profile_not_complete=[]
+ added=[]
+ for member in return_list:
+ uemail = member[0]
+ uid = member[1]
+ members.append(uemail)
+ try:
+ user = SaarangUser.objects.get(email=uemail)
+ if uid:
+ user.college_id = uid
+ user.save()
+ if user.profile_is_complete():
+ new = team.members.add(user)
+ added.append(uemail)
+ else:
+ profile_not_complete.append(uemail)
+ except Exception, e:
+ not_registered.append(uemail)
+ if added:
+ t=''
+ for email in added:
+ t+=email+', '
+ messages.success(request, "Successfully added "+t)
+ mail.send(
+ added, template='email/hospi/leader_added_member',
+ context={'team':team,},
+ )
+
+ if not_registered:
+ msg=''
+ for email in not_registered:
+ msg += email + ', '
+ messages.error(request,'Partially added /could not add members. ' + msg + 'have not registered \
+ with Saarang yet. Please ask them to register and try adding them again.')
+ mail.send(
+ not_registered, template='email/hospi/register_invitation',
+ context={'team':team,}
+ )
+
+ if profile_not_complete:
+ print profile_not_complete
+ txt = ''
+ for email in profile_not_complete:
+ txt += email + ', '
+ messages.warning(request, 'Profile not complete. '+txt+" have not completed their profile at Saarang. Please ask them to click on the link they recieved thru email to update their profile, or ask them to Click here to update profile. ")
+ mail.send(
+ profile_not_complete, template='email/hospi/profile_incomplete',
+ context={'team':team,}
+ )
+ return redirect('hospi_home')
+
+def delete_member(request, team_id, member_id):
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ user = get_object_or_404(SaarangUser, pk=member_id)
+
+ team.members.remove(user)
+ mail.send(
+ [user.email], template='email/hospi/member_deleted',
+ context={'team':team,}
+ )
+ return redirect('hospi_home')
+
+def add_accomodation(request):
+ data = request.POST.copy()
+ team = get_object_or_404(HospiTeam, pk=data['team_id'])
+ if data['updating'] == 'city':
+ team.city = data['city']
+ team.save()
+ messages.success(request, 'City updated.')
+ return redirect('hospi_home')
+ elif data['updating'] == 'all':
+ team.city = data['city']
+ team.date_of_arrival = data['arr_date']
+ team.date_of_departure = data['dep_date']
+ team.time_of_arrival = data['arr_time']
+ team.time_of_departure = data['dep_time']
+ if team.accomodation_status == 'not_req':
+ team.accomodation_status = 'requested'
+ messages.success(request, 'Successfully requested for accommodation.')
+ else:
+ messages.success(request, 'Details successfully updated.')
+ team.save()
+ return redirect('hospi_home')
+ elif data['updating'] == 'control_room':
+ team.date_of_arrival = data['arr_date']
+ team.date_of_departure = data['dep_date']
+ team.time_of_arrival = data['arr_time']
+ team.time_of_departure = data['dep_time']
+ team.city = data['city']
+ team.save()
+ messages.success(request, 'Saved successfully')
+ return redirect('hospi_team_details', int(data['team_id']))
+ return redirect('hospi_home')
+
+
+def user_add_team(request):
+ addteamForm = HospiTeamForm()
+ to_return={
+ 'form': addteamForm,
+ }
+ return render(request, 'hospi/add_team.html', to_return)
+
+def user_save_team(request):
+ data = request.POST.copy()
+ user = SaarangUser.objects.get(email=request.session.get('saaranguser_email'))
+ try:
+ team = HospiTeam.objects.create(name=data['team_name'], leader=user )
+ team.team_sid = auto_id(team.pk)
+ team.save()
+ messages.success(request, team.name +' added successfully. Saarang ID is '+team.team_sid)
+ except Exception, e:
+ messages.error(request, 'Some random error occured. please try again: ' + e.message)
+ return redirect('hospi_prehome')
+
+def cancel_request(request):
+ if not request.session.get('saaranguser_email'):
+ return redirect('hospi_login')
+ email = request.session.get('saaranguser_email')
+ user = SaarangUser.objects.get(email=email)
+ if not request.session.get('current_team'):
+ return redirect('hospi_prehome')
+ team_id = request.session.get('current_team')
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ members = team.get_all_members()
+ if team.accomodation_status == 'confirmed':
+ for member in members:
+ member.accomod_is_confirmed = False
+ member.save()
+ team.accomodation_status = 'not_req'
+ team.save()
+ messages.success(request, 'Accommodation request cancelled successfully!')
+ users=[]
+ for user in team.get_all_members():
+ users.append(user.email)
+ mail.send(
+ users, template='email/hospi/cancel_accommodation',
+ context={'team':team,}
+ )
+ return redirect('hospi_prehome')
+
+def delete_team(request, team_id):
+ if not request.session.get('saaranguser_email'):
+ messages.error(request, 'Please login to continue')
+ return redirect('hospi_login')
+ email = request.session.get('saaranguser_email')
+ user = SaarangUser.objects.get(email=email)
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ users=[]
+ for user in team.get_all_members():
+ users.append(user.email)
+ mail.send(
+ users, template='email/hospi/team_deleted',
+ context={'team':team,}
+ )
+ team.delete()
+ messages.success(request, 'Team has been successfully deleted')
+ return redirect('hospi_prehome')
+
+def generate_saar(request, team_id):
+ if not request.session.get('saaranguser_email'):
+ return redirect('hospi_login')
+ email = request.session.get('saaranguser_email')
+ user = SaarangUser.objects.get(email=email)
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ leader = team.leader
+ if team.leader != user:
+ messages.error(request, 'Please login first')
+ return redirect('hospi_login')
+ members = team.members.all()
+ # return render(request, 'hospi/saar.html', locals())
+ return u.generate_pdf(request, team_id)
+
+# End Mainsite views
+#######################################################################
+
+# ERP views
+
+@login_required
+def list_registered_teams(request):
+ dept_list= ['hospi', 'webops']
+ if not request.user.userprofile.dept.name in dept_list:
+ return render(request, 'alert.html', {'msg':'You dont have permission',})
+ teams = HospiTeam.objects.all().exclude(accomodation_status='not_req')
+ to_return = {
+ 'teams':teams,
+ }
+ return render(request, 'hospi/registered_teams.html', to_return)
+
+@login_required
+def team_details(request, team_id):
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ edit_list = ['confirmed', 'rejected']
+ leader = team.leader
+ bill_data = u.bill(team.date_of_arrival, team.time_of_arrival, team.date_of_departure, team.time_of_departure, team.get_total_count())
+ if team.accomodation_status in edit_list:
+ editable = False
+ else:
+ editable=True
+ to_return = {
+ 'leader':leader,
+ 'bill_data':bill_data,
+ 'addUserForm':SaarangUserForm(),
+ 'editable':editable,
+ 'team':team,
+ }
+ return render(request, 'hospi/team_details.html', to_return)
+
+@login_required
+def print_saar(request, team_id):
+ return u.generate_pdf(request, team_id)
+
+@login_required
+def split_team(request, team_id):
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ M=['male', 'Male']
+ F=['female', 'Female']
+ if team.leader.gender in M:
+ female_members = team.get_female_members()
+ team_leader = female_members.pop(0)
+ new_team = HospiTeam.objects.create(name=team.name+'_Female', leader=team_leader)
+ new_team.team_sid = auto_id(new_team.pk)
+ for member in female_members:
+ new_team.members.add(member)
+ team.members.remove(member)
+ team.members.remove(team_leader)
+ team.save()
+ new_team.accomodation_status = team.accomodation_status
+ new_team.city = team.city
+ new_team.date_of_arrival = team.date_of_arrival
+ new_team.time_of_arrival = team.time_of_arrival
+ new_team.date_of_departure = team.date_of_departure
+ new_team.time_of_departure = team.time_of_departure
+ new_team.save()
+ elif team.leader.gender in F:
+ male_members = team.get_male_members()
+ team_leader = male_members.pop(0)
+ new_team = HospiTeam.objects.create(name=team.name+'_Male', leader=team_leader)
+ new_team.team_sid = auto_id(new_team.pk)
+ for member in male_members:
+ new_team.members.add(member)
+ team.members.remove(member)
+ team.members.remove(team_leader)
+ team.save()
+ new_team.accomodation_status = team.accomodation_status
+ new_team.city = team.city
+ new_team.date_of_arrival = team.date_of_arrival
+ new_team.time_of_arrival = team.time_of_arrival
+ new_team.date_of_departure = team.date_of_departure
+ new_team.time_of_departure = team.time_of_departure
+ new_team.save()
+ messages.success(request, 'Team '+new_team.name+' created and ID is '+new_team.team_sid)
+ return redirect('hospi_list_registered_teams')
+
+@login_required
+def update_status(request, team_id):
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ if team.members.filter(email=team.leader.email):
+ team.members.remove(team.leader)
+ messages.warning(request, 'For '+ team.name + ' : ' + team.team_sid +', Team leader found in members list also. Successfully removed!')
+ data = request.POST.copy()
+ stat = ''
+ try:
+ stat=data['status']
+ except Exception, e:
+ pass
+ if stat:
+ print stat
+ if stat == 'confirmed':
+ team.leader.accomod_is_confirmed = True
+ team.leader.save()
+ for member in team.members.all():
+ if member.accomod_is_confirmed == False:
+ member.accomod_is_confirmed = True
+ member.save()
+ else:
+ team.members.remove(member)
+ team.save()
+ a=Allotment.objects.create(team=team, alloted_by=request.user)
+ a.save()
+ team.accomodation_status = stat
+ team.save()
+ messages.success(request, 'Status for '+team.name+' successfully updated to '+stat)
+ emailsubject='Accommodation request '+stat+', Saarang 2014'
+ users=[]
+ for user in team.get_all_members():
+ users.append(user.email)
+ if stat == 'confirmed':
+ mail.send(
+ users, template='email/hospi/confirm_accommodation',
+ context={'team':team,}
+ )
+ else:
+ mail.send(
+ users, template='email/hospi/status_update',
+ context={'status':stat, 'team':team,}
+ )
+ return redirect('hospi_list_registered_teams')
+
+@login_required
+def statistics(request):
+ teams = HospiTeam.objects.all().exclude(accomodation_status='not_req')
+
+ pending_teams = teams.filter(accomodation_status='requested')
+ confirmed_teams = teams.filter(accomodation_status='confirmed')
+ waitlisted_teams = teams.filter(accomodation_status='waitlisted')
+ rejected_teams = teams.filter(accomodation_status='rejected')
+
+ num_pending_teams = len(pending_teams)
+ num_confirmed_teams = len(confirmed_teams)
+ num_waitlisted_teams = len(waitlisted_teams)
+ num_rejected_teams = len(rejected_teams)
+
+ num_total_members_pending = 0
+ num_male_members_pending = 0
+ num_female_members_pending = 0
+
+ num_total_members_confirmed = 0
+ num_male_members_confirmed = 0
+ num_female_members_confirmed = 0
+
+ num_total_members_waitlisted = 0
+ num_male_members_waitlisted = 0
+ num_female_members_waitlisted = 0
+
+ num_total_members_rejected = 0
+ num_male_members_rejected = 0
+ num_female_members_rejected = 0
+
+
+ for team in pending_teams:
+ num_total_members_pending += team.get_total_count()
+ num_male_members_pending += team.get_male_count()
+ num_female_members_pending += team.get_female_count()
+
+ for team in confirmed_teams:
+ num_total_members_confirmed += team.get_total_count()
+ num_male_members_confirmed += team.get_male_count()
+ num_female_members_confirmed += team.get_female_count()
+
+ for team in waitlisted_teams:
+ num_total_members_waitlisted += team.get_total_count()
+ num_male_members_waitlisted += team.get_male_count()
+ num_female_members_waitlisted += team.get_female_count()
+
+ for team in rejected_teams:
+ num_total_members_rejected += team.get_total_count()
+ num_male_members_rejected += team.get_male_count()
+ num_female_members_rejected += team.get_female_count()
+
+ num_total_members = num_total_members_pending + num_total_members_confirmed + \
+ num_total_members_waitlisted + num_total_members_rejected
+
+ num_male_members = num_male_members_pending + num_male_members_confirmed + \
+ num_male_members_waitlisted + num_male_members_rejected
+
+ num_female_members = num_female_members_pending + num_female_members_confirmed + \
+ num_female_members_waitlisted + num_female_members_rejected
+
+ num_total_teams = num_pending_teams + num_confirmed_teams + \
+ num_waitlisted_teams + num_rejected_teams
+
+ return render(request, 'hospi/statistics.html', locals())
+
+#####################################################################################
+
+# Hospi Control room
+@login_required
+def add_hostel_rooms(request):
+ hostelform = HostelForm()
+ roomform = RoomForm()
+ to_return = {
+ 'hostelform':hostelform,
+ 'roomform':roomform,
+ }
+ return render(request, 'hospi/add_hostel_rooms.html', to_return)
+
+@login_required
+def add_hostel(request):
+ try:
+ hostel = HostelForm(request.POST)
+ hos = hostel.save()
+ messages.success(request, 'Hostel ' + hos.name + ' successfully added')
+ except Exception, e:
+ messages.error(request, 'Some error occured. Please contact webops with this message: '+ e.message)
+ return redirect('hospi_room_map')
+
+@login_required
+def add_room(request):
+ try:
+ room = RoomForm(request.POST)
+ rom = room.save()
+ messages.success(request, 'Room ' + rom.name + ' successfully added')
+ except Exception, e:
+ messages.error(request, 'Some error occured. Please contact webops with this message: '+ e.message)
+ return redirect('hospi_room_map')
+
+@login_required
+def room_map(request):
+ hostels = Hostel.objects.all()
+ to_return = {
+ 'hostels':hostels,
+ }
+ return render(request, 'hospi/room_map.html', to_return)
+
+@login_required
+def hostel_details(request, hostel_id):
+ hostel = get_object_or_404(Hostel, pk=hostel_id)
+ rooms = hostel.parent_hostel.all()
+ to_return={
+ 'hostel':hostel,
+ 'rooms':rooms,
+ }
+ return render(request, 'hospi/hostel_details.html', to_return)
+
+@login_required
+def room_details(request, room_id):
+ room = get_object_or_404(Room, pk=room_id)
+ occupants = room.occupants.all()
+ to_return={
+ 'occupants':occupants,
+ 'room':room,
+ }
+ return render(request, 'hospi/room_details.html', to_return)
+
+@login_required
+def list_all_teams(request):
+ dept_list= ['hospi', 'webops']
+ if not request.user.userprofile.dept.name in dept_list:
+ return render(request, 'alert.html', {'msg':'You dont have permission',})
+ teams = HospiTeam.objects.all()
+ to_return={
+ 'teams':teams,
+ }
+ return render(request, 'hospi/list_all_teams.html', to_return)
+
+def auto_id(team_id):
+ base = 'SA2014A'
+ num = "{0:0>3d}".format(team_id)
+ sid = base + num
+ return sid
+
+@login_required
+def add_team(request):
+ addteamForm = HospiTeamForm()
+ to_return={
+ 'form': addteamForm,
+ }
+ return render(request, 'hospi/add_team.html', to_return)
+
+@login_required
+def save_team(request):
+ addteamForm = HospiTeamForm(request.POST)
+ data = request.POST.copy()
+ if addteamForm.is_valid():
+ try:
+ team = addteamForm.save()
+ team.team_sid = auto_id(team.pk)
+ team.save()
+ messages.success(request, team.name +' added successfully. Saarang ID is '+team.team_sid)
+ except Exception, e:
+ messages.error(request, 'Some error occured. please try again: ' + e.message)
+ else:
+ messages.error(request, 'Some error occured. please try again')
+ return redirect('hospi_list_registered_teams')
+
+@login_required
+def check_in_team(request, team_id):
+ """Needs to add some validators"""
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ if team.get_male_count() == 0 and team.get_female_count==0:
+ messages.error(request, 'Incomplete team profile')
+ if team.members.filter(email=team.leader.email):
+ team.members.remove(team.leader)
+ if team.get_female_count() and team.get_male_count():
+ print 'Mixed Team'
+ males = team.get_male_members()
+ females = team.get_female_members()
+ male_rooms = Room.objects.filter(hostel__gender='male')
+ female_rooms = Room.objects.filter(hostel__gender='female')
+ return render(request, 'hospi/check_in_mixed.html', locals())
+ elif team.get_male_count():
+ print 'Male Team'
+ males = team.get_male_members()
+ male_rooms = Room.objects.filter(hostel__gender='male')
+ return render(request, 'hospi/check_in_males.html', locals())
+ elif team.get_female_count():
+ print 'Female Team'
+ females = team.get_female_members()
+ female_rooms = Room.objects.filter(hostel__gender='female')
+ return render(request, 'hospi/check_in_females.html', locals())
+ return HttpResponse("
Incomplete team profile
")
+
+@login_required
+def check_in_mixed(request):
+ data = request.POST.copy()
+ team = get_object_or_404(HospiTeam, pk=data['team_id'])
+ males = team.get_male_members()
+ females = team.get_female_members()
+ for male in males:
+ room = get_object_or_404(Room, pk=data[male.saarang_id])
+ room.occupants.add(male)
+ room.save()
+ HospiLog.objects.create(created_by=request.user, user=male, room=room)
+ for female in females:
+ room = get_object_or_404(Room, pk=data[female.saarang_id])
+ room.occupants.add(female)
+ room.save()
+ HospiLog.objects.create(created_by=request.user, user=female, room=room)
+ team.mattress_count=data['matress']
+ team.checked_in = True
+ team.save()
+ messages.success(request, team.team_sid + ' checked in successfully')
+ return redirect('hospi_list_registered_teams')
+
+@login_required
+def check_in_males(request):
+ data = request.POST.copy()
+ team = get_object_or_404(HospiTeam, pk=data['team_id'])
+ males = team.get_male_members()
+ for male in males:
+ room = get_object_or_404(Room, pk=data[male.saarang_id])
+ room.occupants.add(male)
+ room.save()
+ HospiLog.objects.create(created_by=request.user, user=male, room=room)
+ team.checked_in = True
+ team.mattress_count=data['matress']
+ team.save()
+ messages.success(request, team.team_sid + ' checked in successfully')
+ return redirect('hospi_list_registered_teams')
+
+@login_required
+def check_in_females(request):
+ data = request.POST.copy()
+ team = get_object_or_404(HospiTeam, pk=data['team_id'])
+ females = team.get_female_members()
+ for female in females:
+ room = get_object_or_404(Room, pk=data[female.saarang_id])
+ room.occupants.add(female)
+ room.save()
+ HospiLog.objects.create(created_by=request.user, user=female, room=room)
+ team.checked_in = True
+ team.mattress_count=data['matress']
+ team.save()
+ messages.success(request, team.team_sid + ' checked in successfully')
+ return redirect('hospi_list_registered_teams')
+
+@login_required
+def check_out_team(request, team_id):
+ team = get_object_or_404(HospiTeam, pk=team_id)
+ members = team.members.all()
+ try:
+ room = team.leader.room_occupant.all()[0]
+ room.occupants.remove(team.leader)
+ room.save()
+ log_entry = HospiLog.objects.get(user=team.leader)
+ log_entry.checked_out = True
+ log_entry.checkout_time = datetime.datetime.now()
+ log_entry.checked_out_by = request.user
+ log_entry.save()
+ except:
+ return u.checkout_bill(request, team_id)
+ for member in members:
+ try:
+ room = member.room_occupant.all()[0]
+ room.occupants.remove(member)
+ room.save()
+ log_entry = HospiLog.objects.get(user=member)
+ log_entry.checked_out = True
+ print log_entry
+ log_entry.checkout_time = datetime.datetime.now()
+ log_entry.checked_out_by = request.user
+ log_entry.save()
+ except Exception, e:
+ return u.checkout_bill(request, team_id)
+ team.checked_out = True
+ team.save()
+ messages.success(request, team.team_sid + ' checked out successfully')
+ return redirect('hospi_list_registered_teams')
+
+@login_required
+def print_bill(request, team_id):
+ return u.checkout_bill(request, team_id)
+
+@csrf_exempt
+@login_required
+def update_member(request):
+ data = request.POST.copy()
+ user = get_object_or_404(SaarangUser, pk=int(data['id']))
+ setattr(user, data['columnName'], data['value'])
+ user.save()
+ return HttpResponse(data['value'])
+
+@login_required
+def add_member(request,team_id):
+ team = HospiTeam.objects.get(pk=team_id)
+ if request.method == 'POST':
+ userform =SaarangUserForm(request.POST)
+ print request.POST
+ if userform.is_valid():
+ user = userform.save()
+ user.saarang_id = uid(user.pk)
+ characters = string.ascii_letters + string.punctuation + string.digits
+ password = "".join(choice(characters) for x in range(randint(8, 16)))
+ user.password = password
+ user.activate_status = 2
+ user.save()
+ team.members.add(user)
+ team.save()
+ mail.send(
+ [user.email], template='email/main/activate_confirm',
+ context={'saarang_id':user.saarang_id, 'password':user.password}
+ )
+ messages.success(request, 'User added successfully')
+ else:
+ print "Invalid"
+ return redirect('hospi_team_details', team.pk)
+
+@csrf_exempt
+@login_required
+def del_member(request, team_id):
+ team = HospiTeam.objects.get(pk=team_id)
+ data = request.POST.copy()
+ user = get_object_or_404(SaarangUser, pk=int(data['id']))
+ team.members.remove(user)
+ user.save()
+ team.save()
+ return HttpResponse('ok')
+
+@csrf_exempt
+@login_required
+def website_id_search(request):
+ data=request.GET.copy()
+ user_list = []
+ users_id = SaarangUser.objects.filter(saarang_id__contains=data['q'].upper())[:10]
+ users_email = SaarangUser.objects.filter(email__contains=data['q'].lower())[:10]
+ users_name = SaarangUser.objects.filter(name__contains=data['q'])[:10]
+ users_mobile = SaarangUser.objects.filter(mobile__contains=data['q'])[:10]
+ for user in users_id:
+ user_list.append({"id":user.id,'sid':user.saarang_id, 'email':user.email, 'name':user.name, 'mobile':user.mobile })
+ for user in users_email:
+ user_list.append({"id":user.id,'sid':user.saarang_id, 'email':user.email, 'name':user.name, 'mobile':user.mobile })
+ for user in users_name:
+ user_list.append({"id":user.id,'sid':user.saarang_id, 'email':user.email, 'name':user.name, 'mobile':user.mobile })
+ for user in users_mobile:
+ user_list.append({"id":user.id,'sid':user.saarang_id, 'email':user.email, 'name':user.name, 'mobile':user.mobile })
+ user_dict = json.dumps(user_list)
+ return HttpResponse(user_dict)
+
+@login_required
+def add_user_to_team(request):
+ data = request.POST.copy()
+ try:
+ team = get_object_or_404(HospiTeam, pk=int(data['team_id']))
+ user = get_object_or_404(SaarangUser, pk=int(data['website_id']))
+ team.members.add(user)
+ team.save()
+ messages.success(request, 'User added successfully')
+ except:
+ messages.error(request, 'Error, please try again!!')
+ return redirect('hospi_team_details', int(data['team_id']))
+
+@login_required
+def delete_room(request, room_id):
+ room = Room.objects.get(pk=room_id)
+ return HttpResponse('Under construction')
+'''
diff --git a/apps/portals/qms/ajax.py b/apps/portals/qms/ajax.py
index 70a5817..164f535 100644
--- a/apps/portals/qms/ajax.py
+++ b/apps/portals/qms/ajax.py
@@ -1,5 +1,7 @@
# For simple dajax(ice) functionalities
from dajaxice.decorators import dajaxice_register
+#dajaxice stuff
+from dajaxice.utils import deserialize_form
# For rendering templates
from django.template import RequestContext
@@ -30,7 +32,12 @@ def hello(request):
"""
Used for testing Dajaxice
"""
+
#html_content = render_to_string("dash/task_tables/coord_you.html", query_dictionary, RequestContext(request))
return json.dumps({'message': 'hello'})
-########## FOR ADMIN PORTAL #######################
+
+@dajaxice_register
+def add_user(request):
+ return json.dumps({'message': 'message'})
+
diff --git a/apps/portals/qms/forms.py b/apps/portals/qms/forms.py
new file mode 100644
index 0000000..780cdcf
--- /dev/null
+++ b/apps/portals/qms/forms.py
@@ -0,0 +1,48 @@
+from django import forms
+from django.db import models
+from apps.users.models import UserProfile, Team
+from apps.events.models import EventRegistration,EventParticipation
+from django.contrib.auth.models import User
+
+
+class AddUserForm(forms.ModelForm):
+ class Meta:
+ model = User
+ fields = ['username','password','first_name', 'last_name','email']
+
+
+class AddTeamForm(forms.ModelForm):
+ class Meta:
+ model = Team
+ fields = ['name','members','accomodation_status']
+
+class UserProfileForm(forms.ModelForm):
+ class Meta:
+ model = UserProfile
+ fields = [
+ 'gender',
+ 'age',
+ 'mobile_number',
+ 'branch',
+ 'college_text',
+ 'city',
+ 'desk_id',
+ ]
+
+ def save(self, commit=True, *args, **kwargs):
+ instance = super(UserProfileForm, self).save(commit=False, *args, **kwargs)
+ if commit:
+ instance.save()
+ return instance
+
+
+
+class AddEventRegistrationForm(forms.ModelForm):
+ class Meta:
+ model = EventRegistration
+ #fields = ['name','members','accomodation_status']
+
+
+class EventParticipationForm(forms.ModelForm):
+ class Meta:
+ model = EventParticipation
diff --git a/apps/portals/qms/views.py b/apps/portals/qms/views.py
index cc6d21a..faff235 100644
--- a/apps/portals/qms/views.py
+++ b/apps/portals/qms/views.py
@@ -1,11 +1,23 @@
from django.shortcuts import render
+from django.contrib.auth import authenticate, login
+from django.contrib.auth.decorators import login_required
+
from apps.walls.models import Wall
-from apps.users.models import ERPProfile, Dept, Subdept, Page
+from apps.users.models import ERPProfile, Dept, Subdept, Page,UserProfile,Team
+from django.contrib.auth.models import User
+from misc.models import College
+from apps.events.models import EventRegistration,Event
+
+from apps.users.forms import LoginForm,UserForm
+from apps.portals.qms.forms import AddTeamForm,UserProfileForm,AddEventRegistrationForm,EventParticipationForm
+
from django.shortcuts import get_object_or_404, render_to_response, redirect, HttpResponseRedirect
+from django.http import HttpResponse
+
from django.core.exceptions import PermissionDenied
from misc.utils import *
from itertools import chain
-
+#
# Create your views here.
def erp_analytics(request):
"""
@@ -33,3 +45,102 @@ def erp_analytics(request):
}
return render_to_response('portals/general/admin_portal.html', local_context, context_instance= global_context(request))
+
+@login_required
+def qms_portal(request):
+ user_form = UserForm()
+ user_profile_form = UserProfileForm()
+ teamform = AddTeamForm()
+ registrationform=AddEventRegistrationForm()
+ participationform=EventParticipationForm()
+ to_return={'userform':user_form,'userprofileform':user_profile_form,'teamform':teamform,'registrationform':registrationform,'participationform':participationform}
+ return render(request, 'portals/qms/qms.html', to_return)
+
+
+@login_required
+def id_search(request):
+ data=request.GET.copy()
+ user_list = []
+ selected_users=[]
+ users_id = UserProfile.objects.filter(saarang_id__icontains=data['q'])[:10]
+ users_email = UserProfile.objects.filter(user__email__icontains=data['q'])[:10]
+ users_desk_id = UserProfile.objects.filter(desk_id__icontains=data['q'])[:10]
+
+ for user in users_id:
+ selected_users=selected_users+[user]
+
+ for user in users_email:
+ selected_users=selected_users+[user]
+ for user in users_desk_id:
+ selected_users=selected_users+[user]
+ selected_users = list(set(selected_users))
+ for user in selected_users:
+ user_list.append({"desk_id":user.desk_id,'id':user.user.id,'saarang_id':user.saarang_id, 'email':user.user.email, 'first_name':user.user.first_name,'last_name':user.user.last_name, 'mobile_number':user.mobile_number, 'city':user.city, 'branch':user.branch, 'college_text':user.college_text, 'age':user.age, 'want_accomodation':user.want_accomodation, 'gender':user.gender.capitalize() })
+ user_dict = json.dumps(user_list)
+ return HttpResponse(user_dict)
+
+
+'''
+@login_required
+def id_search(request):
+ data=request.GET.copy()
+ user_list = []
+ users_id = UserProfile.objects.filter(saarang_id__contains=data['q'].upper())[:10]
+ users_email = UserProfile.objects.filter(email__contains=data['q'].lower())[:10]
+ users_name = UserProfile.objects.filter(name__contains=data['q'])[:10]
+ users_mobile = UserProfile.objects.filter(mobile_number__contains=data['q'])[:10]
+ for user in users_id:
+ user_list.append({"desk_id":user.desk_id,'saarang_id':user.saarang_id, 'email':user.email, 'name':user.name, 'mobile':user.mobile, 'city':user.city, 'college':user.college.name, 'gender':user.gender.capitalize() })
+ for user in users_email:
+ user_list.append({"desk_id":user.desk_id,'saarang_id':user.saarang_id, 'email':user.email, 'name':user.name, 'mobile':user.mobile, 'city':user.city, 'college':user.college.name, 'gender':user.gender.capitalize() })
+ for user in users_name:
+ user_list.append({"desk_id":user.desk_id,'saarang_id':user.saarang_id, 'email':user.email, 'name':user.name, 'mobile':user.mobile, 'city':user.city, 'college':user.college.name, 'gender':user.gender.capitalize() })
+ for user in users_mobile:
+ user_list.append({"desk_id":user.desk_id,'saarang_id':user.saarang_id, 'email':user.email, 'name':user.name, 'mobile':user.mobile, 'city':user.city, 'college':user.college.name, 'gender':user.gender.capitalize() })
+ user_dict = json.dumps(user_list)
+ for user in user_list:
+ print user
+ return HttpResponse(user_dict)
+'''
+
+
+#'members':team.members,
+
+@login_required
+def team_search(request):
+ data=request.GET.copy()
+ team_list=[]
+ selected_teams=[]
+ teams = Team.objects.filter(name__icontains=data['q'])[:10]
+
+ for t in teams:
+ selected_teams = selected_teams + [t]
+
+ for team in selected_teams:
+ team_list.append({"name":team.name,'id':team.id,'accomodation_status':team.accomodation_status})
+ team_dict = json.dumps(team_list)
+ return HttpResponse(team_dict)
+
+
+
+
+@login_required
+def event_search(request):
+ data=request.GET.copy()
+ event_list=[]
+ selected_events=[]
+ events = Event.objects.filter(name__icontains=data['q'])[:10]
+
+ for t in events:
+ selected_events = selected_events + [t]
+
+
+ for event in selected_events:
+ participant_count=len(event.event_participated.users_participated.all())
+ team_count=len(event.event_participated.teams_participated.all())
+ event_list.append({"name":event.name,'id':event.id,'participant_count':participant_count,'team_count':team_count})
+ event_dict = json.dumps(event_list)
+ return HttpResponse(event_dict)
+
+
+
diff --git a/apps/portals/spons/__init__.py b/apps/portals/spons/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/apps/portals/spons/admin.py b/apps/portals/spons/admin.py
new file mode 100644
index 0000000..102fd17
--- /dev/null
+++ b/apps/portals/spons/admin.py
@@ -0,0 +1,9 @@
+from django.contrib import admin
+
+from apps.spons.models import SponsImageUpload
+
+class SponsImageUploadAdmin(admin.ModelAdmin):
+ list_display=('priority', 'title', 'sponsor_link', 'logo', 'timestamp', 'uploaded_by')
+ search_fields = ['title', 'sponsor_link']
+
+admin.site.register(SponsImageUpload, SponsImageUploadAdmin)
\ No newline at end of file
diff --git a/apps/portals/spons/forms.py b/apps/portals/spons/forms.py
new file mode 100644
index 0000000..464d11c
--- /dev/null
+++ b/apps/portals/spons/forms.py
@@ -0,0 +1,10 @@
+from apps.spons.models import SponsImageUpload
+from django import forms
+
+class AddLogoForm(forms.ModelForm):
+ class Meta:
+ model = SponsImageUpload
+ exclude = ['timestamp', 'uploaded_by']
+ help_texts = {
+ 'title': ('Example:Title Sponsor, Website Sponsor'),
+ }
\ No newline at end of file
diff --git a/apps/portals/spons/migrations/0001_initial.py b/apps/portals/spons/migrations/0001_initial.py
new file mode 100644
index 0000000..5f448d7
--- /dev/null
+++ b/apps/portals/spons/migrations/0001_initial.py
@@ -0,0 +1,78 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'SponsImageUpload'
+ db.create_table(u'spons_sponsimageupload', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('title', self.gf('django.db.models.fields.CharField')(max_length=1000)),
+ ('sponsor_link', self.gf('django.db.models.fields.URLField')(max_length=500)),
+ ('logo', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
+ ('timestamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('uploaded_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='image_uploaded_by', to=orm['auth.User'])),
+ ('priority', self.gf('django.db.models.fields.FloatField')(default=0.0)),
+ ))
+ db.send_create_signal(u'spons', ['SponsImageUpload'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'SponsImageUpload'
+ db.delete_table(u'spons_sponsimageupload')
+
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'spons.sponsimageupload': {
+ 'Meta': {'object_name': 'SponsImageUpload'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
+ 'priority': ('django.db.models.fields.FloatField', [], {'default': '0.0'}),
+ 'sponsor_link': ('django.db.models.fields.URLField', [], {'max_length': '500'}),
+ 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
+ 'uploaded_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'image_uploaded_by'", 'to': u"orm['auth.User']"})
+ }
+ }
+
+ complete_apps = ['spons']
\ No newline at end of file
diff --git a/apps/portals/spons/migrations/0002_auto__add_field_sponsimageupload_row_layout.py b/apps/portals/spons/migrations/0002_auto__add_field_sponsimageupload_row_layout.py
new file mode 100644
index 0000000..47a198c
--- /dev/null
+++ b/apps/portals/spons/migrations/0002_auto__add_field_sponsimageupload_row_layout.py
@@ -0,0 +1,72 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'SponsImageUpload.row_layout'
+ db.add_column(u'spons_sponsimageupload', 'row_layout',
+ self.gf('django.db.models.fields.IntegerField')(default=4),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'SponsImageUpload.row_layout'
+ db.delete_column(u'spons_sponsimageupload', 'row_layout')
+
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'spons.sponsimageupload': {
+ 'Meta': {'object_name': 'SponsImageUpload'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
+ 'priority': ('django.db.models.fields.FloatField', [], {'default': '0.0'}),
+ 'row_layout': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
+ 'sponsor_link': ('django.db.models.fields.URLField', [], {'max_length': '500'}),
+ 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
+ 'uploaded_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'image_uploaded_by'", 'to': u"orm['auth.User']"})
+ }
+ }
+
+ complete_apps = ['spons']
\ No newline at end of file
diff --git a/apps/portals/spons/migrations/__init__.py b/apps/portals/spons/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/apps/portals/spons/models.py b/apps/portals/spons/models.py
new file mode 100644
index 0000000..e69de29
diff --git a/apps/portals/spons/urls.py b/apps/portals/spons/urls.py
new file mode 100644
index 0000000..e69de29
diff --git a/apps/portals/spons/views.py b/apps/portals/spons/views.py
new file mode 100644
index 0000000..c6118ba
--- /dev/null
+++ b/apps/portals/spons/views.py
@@ -0,0 +1,83 @@
+# Create your views here.
+from django.http import HttpResponseRedirect, HttpResponse, Http404
+from django.shortcuts import render_to_response, render, get_object_or_404, redirect
+from django.contrib.auth import authenticate, login, logout
+from django.contrib.auth.decorators import login_required
+from django.template import RequestContext
+from django.contrib.auth.models import User, Group
+from django.contrib.auth.decorators import permission_required
+from django.core.urlresolvers import reverse
+from django.contrib import messages
+from django.conf import settings
+
+from apps.portals.spons.forms import AddLogoForm
+from apps.spons.models import SponsImageUpload
+
+def add_logo(request):
+ if permission(request.user):
+ form = AddLogoForm(request.POST or None,request.FILES or None)
+ if form.is_valid():
+ img = form.save(commit=False)
+ img.uploaded_by = request.user
+ img.save()
+ messages.success(request,'Image successfully saved')
+ HttpResponseRedirect(reverse('spons_portal'))
+ logos = SponsImageUpload.objects.all().order_by('-priority')
+ to_return = {
+ 'form':form,
+ 'list':logos,
+ }
+ return render(request, 'portals/spons/add_logo.html', to_return)
+ else :
+ return render(request, 'portals/spons/perm.html')
+
+def delete_logo(request, logo_id):
+ if permission(request.user):
+ logo=SponsImageUpload.objects.get(pk=logo_id)
+ logo.delete()
+ messages.success(request, 'Logo deleted successfully!')
+ return redirect('spons_portal')
+ else :
+ return render(request, 'portals/spons/perm.html')
+def edit_logo(request, logo_id):
+ if permission(request.user):
+ logo=SponsImageUpload.objects.get(pk=logo_id)
+ if request.method == 'POST':
+ form = AddLogoForm(request.POST or None,request.FILES or None)
+ if form.is_valid():
+ img=form.save(commit=False)
+ img.uploaded_by=request.user
+ img.save()
+ messages.success(request,'Image successfully updated')
+ HttpResponseRedirect(reverse('spons_portal'))
+ else:
+ form = AddLogoForm(instance=logo)
+ to_return={
+ 'logo':logo,
+ 'form': form,
+ }
+ return render(request, 'portals/spons/edit_logo.html', to_return)
+ else :
+ return render(request, 'portals/spons/perm.html')
+
+def save_logo(request, logo_id):
+ if permission(request.user):
+ logo=SponsImageUpload.objects.get(pk=logo_id)
+ if request.method == 'POST':
+ print 'POST'
+ form = AddLogoForm(request.POST or None,request.FILES or None, instance=logo)
+ print form.errors
+ if form.is_valid():
+ print 'valid'
+ img=form.save(commit=False)
+ img.uploaded_by=request.user
+ img.save()
+ messages.success(request,'Image successfully updated')
+ return redirect('spons_portal')
+ else :
+ return render(request, 'portals/spons/perm.html')
+
+def permission(user_object):
+ if user_object.id in settings.SPONS_ACCESS_ID:
+ return True
+ return False
diff --git a/apps/spons/__init__.py b/apps/spons/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/apps/spons/models.py b/apps/spons/models.py
new file mode 100644
index 0000000..7c69c35
--- /dev/null
+++ b/apps/spons/models.py
@@ -0,0 +1,16 @@
+from django.db import models
+from django.contrib.auth.models import User
+
+class SponsImageUpload(models.Model):
+ title = models.CharField(max_length=1000,verbose_name='Title',help_text='Example:Title Sponsor, Website Sponsor')
+ sponsor_link = models.URLField(max_length=500, help_text='Example: http://company.com')
+ logo = models.ImageField(upload_to='spons')
+ timestamp = models.DateTimeField(auto_now_add=True)
+ uploaded_by = models.ForeignKey(User, related_name='image_uploaded_by')
+ priority = models.FloatField(default=0.00, help_text='Rate in a scale of 00.00000000 to 99.99999999. Highest number will appear first.')
+ row_layout = models.IntegerField(default=4, help_text="1 for 1 in a row, 2 for 2 in a row etc, upto 4")
+
+ class Meta:
+ permissions = (
+ ('manage_logo', 'Can manage logos'),
+ )
diff --git a/apps/users/admin.py b/apps/users/admin.py
index 8ddfe6b..e012d73 100644
--- a/apps/users/admin.py
+++ b/apps/users/admin.py
@@ -1,9 +1,22 @@
from django.contrib import admin
-from apps.users.models import Dept, Subdept, UserProfile, ERPProfile, Page
+from apps.users.models import Dept, Subdept, UserProfile, ERPProfile, Page,Team
-admin.site.register(UserProfile)
+def full_name(obj):
+ return ("%s %s" % (obj.user.first_name, obj.user.last_name))
+full_name.short_description = 'Name'
+
+class UserProfileAdmin(admin.ModelAdmin):
+ list_display=('saarang_id', 'desk_id', full_name,'user','gender','age','mobile_number','college_text','city')
+ search_fields=['name','email','mobile_number']
+
+admin.site.register(UserProfile, UserProfileAdmin)
admin.site.register(ERPProfile)
admin.site.register(Dept)
admin.site.register(Subdept)
-admin.site.register(Page)
\ No newline at end of file
+admin.site.register(Page)
+admin.site.register(Team)
+
+
+from misc.utils import export_as_xls
+admin.site.add_action(export_as_xls)
diff --git a/apps/users/forms.py b/apps/users/forms.py
index 5552d6d..94ab56d 100644
--- a/apps/users/forms.py
+++ b/apps/users/forms.py
@@ -35,6 +35,7 @@ class UserForm(forms.ModelForm):
last_name: The last_name of the user from django.contrib.auth.models.User
email: The last_name of the user from django.contrib.auth.models.User
"""
+ email=forms.EmailField(required=True)
class Meta:
model = User
fields = [
@@ -49,6 +50,12 @@ def save(self, commit=True, *args, **kwargs):
if commit:
instance.save()
return instance
+ def clean_email(self):
+ email = self.cleaned_data.get('email')
+ username = self.cleaned_data.get('username')
+ if email and User.objects.filter(email=email):
+ raise forms.ValidationError(u'Email addresses must be unique.')
+ return email
class UserProfileForm(forms.ModelForm):
"""
diff --git a/apps/users/migrations.tar.gz b/apps/users/migrations.tar.gz
new file mode 100644
index 0000000..5f0cad8
Binary files /dev/null and b/apps/users/migrations.tar.gz differ
diff --git a/apps/users/migrations/0001_initial.py b/apps/users/migrations/0001_initial.py
index b56d636..35df57d 100644
--- a/apps/users/migrations/0001_initial.py
+++ b/apps/users/migrations/0001_initial.py
@@ -210,4 +210,4 @@ def backwards(self, orm):
}
}
- complete_apps = ['users']
\ No newline at end of file
+ complete_apps = ['users']
diff --git a/apps/users/migrations/0017_auto__add_field_userprofile_saarang_id.py b/apps/users/migrations/0017_auto__add_field_userprofile_saarang_id.py
new file mode 100644
index 0000000..4801915
--- /dev/null
+++ b/apps/users/migrations/0017_auto__add_field_userprofile_saarang_id.py
@@ -0,0 +1,172 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'UserProfile.saarang_id'
+ db.add_column(u'users_userprofile', 'saarang_id',
+ self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'UserProfile.saarang_id'
+ db.delete_column(u'users_userprofile', 'saarang_id')
+
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'misc.college': {
+ 'Meta': {'object_name': 'College'},
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'state': ('django.db.models.fields.CharField', [], {'max_length': '40'})
+ },
+ u'users.dept': {
+ 'Meta': {'object_name': 'Dept'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'calendar_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'dept'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.erpprofile': {
+ 'Meta': {'object_name': 'ERPProfile'},
+ 'coord_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'coord_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'core_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'core_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'hostel': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'nickname': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'page_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'user_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'room_no': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'summer_number': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'summer_stay': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'summer_stay2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'supercoord_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'supercoord_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'erp_profile'", 'unique': 'True', 'to': u"orm['auth.User']"}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'person'", 'unique': 'True', 'to': u"orm['walls.Wall']"}),
+ 'winter_stay': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'winter_stay2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
+ },
+ u'users.page': {
+ 'Meta': {'object_name': 'Page'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'calendar_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'page'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.subdept': {
+ 'Meta': {'object_name': 'Subdept'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'dept': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'subdepts'", 'to': u"orm['users.Dept']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subdept'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.team': {
+ 'Meta': {'object_name': 'Team'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'members': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ u'users.userprofile': {
+ 'Meta': {'object_name': 'UserProfile'},
+ 'activation_key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
+ 'age': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}),
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'college': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['misc.College']", 'null': 'True', 'blank': 'True'}),
+ 'college_roll': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
+ 'college_text': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'dob': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ 'gender': ('django.db.models.fields.CharField', [], {'default': "'F'", 'max_length': '1'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'key_expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 28, 0, 0)'}),
+ 'last_activity_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)'}),
+ 'last_activity_ip': ('django.db.models.fields.IPAddressField', [], {'default': "'0.0.0.0'", 'max_length': '15'}),
+ 'mobile_number': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'saarang_id': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'school_student': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'send_mails': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': u"orm['auth.User']"}),
+ 'want_accomodation': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ u'walls.wall': {
+ 'Meta': {'object_name': 'Wall'},
+ 'access_depts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'access_pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'access_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'access_subdepts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'access_users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
+ 'notification_depts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'notification_pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'notification_subdepts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'notification_users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['users']
\ No newline at end of file
diff --git a/apps/users/migrations/0018_auto__add_field_userprofile_last_login__add_field_userprofile_desk_id_.py b/apps/users/migrations/0018_auto__add_field_userprofile_last_login__add_field_userprofile_desk_id_.py
new file mode 100644
index 0000000..1018962
--- /dev/null
+++ b/apps/users/migrations/0018_auto__add_field_userprofile_last_login__add_field_userprofile_desk_id_.py
@@ -0,0 +1,281 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'UserProfile.last_login'
+ db.add_column(u'users_userprofile', 'last_login',
+ self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.desk_id'
+ db.add_column(u'users_userprofile', 'desk_id',
+ self.gf('django.db.models.fields.CharField')(default='SA14D0000', max_length=20),
+ keep_default=False)
+
+ # Adding field 'UserProfile.name'
+ db.add_column(u'users_userprofile', 'name',
+ self.gf('django.db.models.fields.CharField')(max_length=60, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.email'
+ db.add_column(u'users_userprofile', 'email',
+ self.gf('django.db.models.fields.EmailField')(max_length=100, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.mobile'
+ db.add_column(u'users_userprofile', 'mobile',
+ self.gf('django.db.models.fields.BigIntegerField')(max_length=10, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.fb_id'
+ db.add_column(u'users_userprofile', 'fb_id',
+ self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.friend_list'
+ db.add_column(u'users_userprofile', 'friend_list',
+ self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.college_id_hospi'
+ db.add_column(u'users_userprofile', 'college_id_hospi',
+ self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.fb_token'
+ db.add_column(u'users_userprofile', 'fb_token',
+ self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.password'
+ db.add_column(u'users_userprofile', 'password',
+ self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.gender_hospi'
+ db.add_column(u'users_userprofile', 'gender_hospi',
+ self.gf('django.db.models.fields.CharField')(default='Male', max_length=10, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.activate_status'
+ db.add_column(u'users_userprofile', 'activate_status',
+ self.gf('django.db.models.fields.IntegerField')(default=0, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.accomod_is_confirmed'
+ db.add_column(u'users_userprofile', 'accomod_is_confirmed',
+ self.gf('django.db.models.fields.BooleanField')(default=False),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'UserProfile.last_login'
+ db.delete_column(u'users_userprofile', 'last_login')
+
+ # Deleting field 'UserProfile.desk_id'
+ db.delete_column(u'users_userprofile', 'desk_id')
+
+ # Deleting field 'UserProfile.name'
+ db.delete_column(u'users_userprofile', 'name')
+
+ # Deleting field 'UserProfile.email'
+ db.delete_column(u'users_userprofile', 'email')
+
+ # Deleting field 'UserProfile.mobile'
+ db.delete_column(u'users_userprofile', 'mobile')
+
+ # Deleting field 'UserProfile.fb_id'
+ db.delete_column(u'users_userprofile', 'fb_id')
+
+ # Deleting field 'UserProfile.friend_list'
+ db.delete_column(u'users_userprofile', 'friend_list')
+
+ # Deleting field 'UserProfile.college_id_hospi'
+ db.delete_column(u'users_userprofile', 'college_id_hospi')
+
+ # Deleting field 'UserProfile.fb_token'
+ db.delete_column(u'users_userprofile', 'fb_token')
+
+ # Deleting field 'UserProfile.password'
+ db.delete_column(u'users_userprofile', 'password')
+
+ # Deleting field 'UserProfile.gender_hospi'
+ db.delete_column(u'users_userprofile', 'gender_hospi')
+
+ # Deleting field 'UserProfile.activate_status'
+ db.delete_column(u'users_userprofile', 'activate_status')
+
+ # Deleting field 'UserProfile.accomod_is_confirmed'
+ db.delete_column(u'users_userprofile', 'accomod_is_confirmed')
+
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'misc.college': {
+ 'Meta': {'object_name': 'College'},
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'state': ('django.db.models.fields.CharField', [], {'max_length': '40'})
+ },
+ u'users.dept': {
+ 'Meta': {'object_name': 'Dept'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'calendar_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'dept'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.erpprofile': {
+ 'Meta': {'object_name': 'ERPProfile'},
+ 'coord_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'coord_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'core_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'core_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'hostel': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'nickname': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'page_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'user_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'room_no': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'summer_number': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'summer_stay': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'summer_stay2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'supercoord_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'supercoord_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'erp_profile'", 'unique': 'True', 'to': u"orm['auth.User']"}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'person'", 'unique': 'True', 'to': u"orm['walls.Wall']"}),
+ 'winter_stay': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'winter_stay2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
+ },
+ u'users.page': {
+ 'Meta': {'object_name': 'Page'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'calendar_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'page'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.subdept': {
+ 'Meta': {'object_name': 'Subdept'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'dept': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'subdepts'", 'to': u"orm['users.Dept']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subdept'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.team': {
+ 'Meta': {'object_name': 'Team'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'members': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ u'users.userprofile': {
+ 'Meta': {'object_name': 'UserProfile'},
+ 'accomod_is_confirmed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'activate_status': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'activation_key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
+ 'age': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}),
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'college': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['misc.College']", 'null': 'True', 'blank': 'True'}),
+ 'college_id_hospi': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'college_roll': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
+ 'college_text': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'desk_id': ('django.db.models.fields.CharField', [], {'default': "'SA14D0000'", 'max_length': '20'}),
+ 'dob': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'fb_id': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'fb_token': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
+ 'friend_list': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
+ 'gender': ('django.db.models.fields.CharField', [], {'default': "'F'", 'max_length': '1'}),
+ 'gender_hospi': ('django.db.models.fields.CharField', [], {'default': "'Male'", 'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'key_expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 11, 4, 0, 0)'}),
+ 'last_activity_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)'}),
+ 'last_activity_ip': ('django.db.models.fields.IPAddressField', [], {'default': "'0.0.0.0'", 'max_length': '15'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile': ('django.db.models.fields.BigIntegerField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'mobile_number': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
+ 'saarang_id': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'school_student': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'send_mails': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': u"orm['auth.User']"}),
+ 'want_accomodation': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ u'walls.wall': {
+ 'Meta': {'object_name': 'Wall'},
+ 'access_depts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'access_pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'access_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'access_subdepts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'access_users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
+ 'notification_depts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'notification_pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'notification_subdepts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'notification_users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['users']
\ No newline at end of file
diff --git a/apps/users/migrations/0019_auto__add_field_team_accomodation_status.py b/apps/users/migrations/0019_auto__add_field_team_accomodation_status.py
new file mode 100644
index 0000000..abc500e
--- /dev/null
+++ b/apps/users/migrations/0019_auto__add_field_team_accomodation_status.py
@@ -0,0 +1,186 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Team.accomodation_status'
+ db.add_column(u'users_team', 'accomodation_status',
+ self.gf('django.db.models.fields.CharField')(default='not_req', max_length=50, null=True, blank=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Team.accomodation_status'
+ db.delete_column(u'users_team', 'accomodation_status')
+
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'misc.college': {
+ 'Meta': {'object_name': 'College'},
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'state': ('django.db.models.fields.CharField', [], {'max_length': '40'})
+ },
+ u'users.dept': {
+ 'Meta': {'object_name': 'Dept'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'calendar_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'dept'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.erpprofile': {
+ 'Meta': {'object_name': 'ERPProfile'},
+ 'coord_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'coord_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'core_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'core_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'hostel': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'nickname': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'page_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'user_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'room_no': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'summer_number': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'summer_stay': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'summer_stay2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'supercoord_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'supercoord_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'erp_profile'", 'unique': 'True', 'to': u"orm['auth.User']"}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'person'", 'unique': 'True', 'to': u"orm['walls.Wall']"}),
+ 'winter_stay': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'winter_stay2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
+ },
+ u'users.page': {
+ 'Meta': {'object_name': 'Page'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'calendar_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'page'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.subdept': {
+ 'Meta': {'object_name': 'Subdept'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'dept': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'subdepts'", 'to': u"orm['users.Dept']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subdept'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.team': {
+ 'Meta': {'object_name': 'Team'},
+ 'accomodation_status': ('django.db.models.fields.CharField', [], {'default': "'not_req'", 'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'members': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ u'users.userprofile': {
+ 'Meta': {'object_name': 'UserProfile'},
+ 'accomod_is_confirmed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'activate_status': ('django.db.models.fields.IntegerField', [], {'default': '2', 'null': 'True', 'blank': 'True'}),
+ 'activation_key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
+ 'age': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}),
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'college': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['misc.College']", 'null': 'True', 'blank': 'True'}),
+ 'college_id_hospi': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'college_roll': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
+ 'college_text': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'desk_id': ('django.db.models.fields.CharField', [], {'default': "'SA14D0000'", 'max_length': '20'}),
+ 'dob': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'fb_id': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'fb_token': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
+ 'friend_list': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
+ 'gender': ('django.db.models.fields.CharField', [], {'default': "'F'", 'max_length': '1'}),
+ 'gender_hospi': ('django.db.models.fields.CharField', [], {'default': "'Male'", 'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'key_expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 11, 20, 0, 0)'}),
+ 'last_activity_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)'}),
+ 'last_activity_ip': ('django.db.models.fields.IPAddressField', [], {'default': "'0.0.0.0'", 'max_length': '15'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile': ('django.db.models.fields.BigIntegerField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'mobile_number': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
+ 'saarang_id': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'school_student': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'send_mails': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': u"orm['auth.User']"}),
+ 'want_accomodation': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ u'walls.wall': {
+ 'Meta': {'object_name': 'Wall'},
+ 'access_depts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'access_pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'access_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'access_subdepts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'access_users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
+ 'notification_depts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'notification_pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'notification_subdepts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'notification_users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['users']
\ No newline at end of file
diff --git a/apps/users/migrations/0020_auto__del_field_userprofile_activate_status__del_field_userprofile_gen.py b/apps/users/migrations/0020_auto__del_field_userprofile_activate_status__del_field_userprofile_gen.py
new file mode 100644
index 0000000..91291de
--- /dev/null
+++ b/apps/users/migrations/0020_auto__del_field_userprofile_activate_status__del_field_userprofile_gen.py
@@ -0,0 +1,192 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Deleting field 'UserProfile.activate_status'
+ db.delete_column(u'users_userprofile', 'activate_status')
+
+ # Deleting field 'UserProfile.gender_hospi'
+ db.delete_column(u'users_userprofile', 'gender_hospi')
+
+
+ def backwards(self, orm):
+ # Adding field 'UserProfile.activate_status'
+ db.add_column(u'users_userprofile', 'activate_status',
+ self.gf('django.db.models.fields.IntegerField')(default=2, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'UserProfile.gender_hospi'
+ db.add_column(u'users_userprofile', 'gender_hospi',
+ self.gf('django.db.models.fields.CharField')(default='Male', max_length=10, null=True, blank=True),
+ keep_default=False)
+
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'misc.college': {
+ 'Meta': {'object_name': 'College'},
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'state': ('django.db.models.fields.CharField', [], {'max_length': '40'})
+ },
+ u'users.dept': {
+ 'Meta': {'object_name': 'Dept'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'calendar_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'dept'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.erpprofile': {
+ 'Meta': {'object_name': 'ERPProfile'},
+ 'coord_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'coord_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'core_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'core_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'hostel': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'nickname': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'page_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'user_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'room_no': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'summer_number': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'summer_stay': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'summer_stay2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'supercoord_relations': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'supercoord_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'erp_profile'", 'unique': 'True', 'to': u"orm['auth.User']"}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'person'", 'unique': 'True', 'to': u"orm['walls.Wall']"}),
+ 'winter_stay': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'winter_stay2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
+ },
+ u'users.page': {
+ 'Meta': {'object_name': 'Page'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'calendar_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'page'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.subdept': {
+ 'Meta': {'object_name': 'Subdept'},
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'dept': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'subdepts'", 'to': u"orm['users.Dept']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'directory_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ 'wall': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subdept'", 'unique': 'True', 'to': u"orm['walls.Wall']"})
+ },
+ u'users.team': {
+ 'Meta': {'object_name': 'Team'},
+ 'accomodation_status': ('django.db.models.fields.CharField', [], {'default': "'not_req'", 'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'members': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ u'users.userprofile': {
+ 'Meta': {'object_name': 'UserProfile'},
+ 'accomod_is_confirmed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'activation_key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
+ 'age': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}),
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'college': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['misc.College']", 'null': 'True', 'blank': 'True'}),
+ 'college_id_hospi': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'college_roll': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
+ 'college_text': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'desk_id': ('django.db.models.fields.CharField', [], {'default': "'SA14D0000'", 'max_length': '20'}),
+ 'dob': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'fb_id': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'fb_token': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
+ 'friend_list': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
+ 'gender': ('django.db.models.fields.CharField', [], {'default': "'F'", 'max_length': '1'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'key_expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 9, 0, 0)'}),
+ 'last_activity_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)'}),
+ 'last_activity_ip': ('django.db.models.fields.IPAddressField', [], {'default': "'0.0.0.0'", 'max_length': '15'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile': ('django.db.models.fields.BigIntegerField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'mobile_number': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
+ 'saarang_id': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'school_student': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'send_mails': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': u"orm['auth.User']"}),
+ 'want_accomodation': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ u'walls.wall': {
+ 'Meta': {'object_name': 'Wall'},
+ 'access_depts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'access_pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'access_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'access_subdepts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'access_users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'access_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'cache_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
+ 'notification_depts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Dept']"}),
+ 'notification_pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Page']"}),
+ 'notification_subdepts': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['users.Subdept']"}),
+ 'notification_users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'notified_wall'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['auth.User']"}),
+ 'time_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1950, 1, 1, 0, 0)', 'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['users']
\ No newline at end of file
diff --git a/apps/users/models.py b/apps/users/models.py
index 45eb993..f18d47f 100644
--- a/apps/users/models.py
+++ b/apps/users/models.py
@@ -17,6 +17,7 @@
from django.core.urlresolvers import reverse
from django.core.signing import TimestampSigner, BadSignature, SignatureExpired
# Apps
+from apps.users.utils import send_registration_mail
# Decorators
# Models
from misc.models import College
@@ -206,7 +207,7 @@ class UserProfile(models.Model): # The corresponding auth user
# Fest organizational info
# is_core = models.BooleanField(default=False)
# is_hospi = models.BooleanField(default=False)
-
+
#Events registerd
@@ -220,11 +221,51 @@ class UserProfile(models.Model): # The corresponding auth user
send_mails = models.BooleanField(default=True)
+
+ #Saarang ID
+ saarang_id = models.CharField(max_length=10, null=True, blank=True)
+
+ '''
+ Added from SaarangUser to incorporate hospi
+ '''
+ last_login = models.DateTimeField(blank=True, null=True)
+ desk_id = models.CharField(max_length=20, default='SA14D0000')
+ name = models.CharField(max_length=60, blank = True, null=True)
+ email = models.EmailField(max_length=100, blank = True, null=True)
+ mobile = models.BigIntegerField(max_length=10, blank = True, null=True)
+ fb_id = models.CharField(max_length=50, blank = True, null=True)
+ friend_list = models.TextField(max_length=1000, blank = True, null=True)
+ college_id_hospi = models.CharField(max_length=50, blank = True, null=True)
+ fb_token = models.TextField(max_length=1000, blank = True, null=True)
+ password = models.CharField(max_length=128, blank = True, null=True)
+ accomod_is_confirmed = models.BooleanField(default=False)
+
objects = CheckActiveManager()
+
+
+ def profile_is_complete(self):
+ # print self.user.first_name
+ # print self.gender
+ # print self.age
+ # print len(str((self.mobile_number)))>=10
+ # print self.branch
+ # print self.college_text
+ # print self.college_roll
+ # print self.city
+ if (self.user.first_name and self.gender and self.age and len(str((self.mobile_number)))>=10 and self.college_text and self.city):
+ return True
+ else:
+ return False
+
+ '''
+ Addition to hospi ends here
+ '''
+
+
@property
def fest_id(self):
- return settings.FEST_NAME[:2].upper + str(self.user.id).zfill(6)
+ return settings.FEST_NAME[:2].upper() + '16' + str(self.user.id).zfill(5)
def last_seen(self):
return cache.get('seen_%s' % self.user.username)
@@ -242,6 +283,11 @@ def online(self):
def save(self, *args, **kwargs):
#self.user.save()
+ if not self.saarang_id:
+ self.saarang_id = self.fest_id
+ if not self.pk and not settings.DEBUG: #First time profile creation
+ self.saarang_id = self.fest_id
+ send_registration_mail(self.user)
super(UserProfile, self).save(*args, **kwargs)
def delete(self, *args, **kwargs):
@@ -290,10 +336,8 @@ def check_token(self, token):
return True
def __unicode__(self):
- return self.user.first_name
+ return self.user.email + " " + str(self.saarang_id)
- class Admin:
- pass
class ERPProfile(models.Model):
# Relations to other models
@@ -393,5 +437,20 @@ class Team(models.Model):
is_active = models.BooleanField(default=True)
name = models.CharField(max_length=100, unique=True)
members = models.ManyToManyField(User, null=True, blank=True, related_name='teams')
-
+ ACCOMODATION_CHOICES = (
+ ('not_req', 'Accomodation not required'),
+ ('requested', 'Accomodation requested'),
+ ('confirmed', 'Request confirmed'),
+ ('waitlisted', 'Waitlisted'),
+ ('rejected', 'Rejected'),
+ ('hospi', 'Added to hospi portal')
+ )
+ accomodation_status = models.CharField(max_length=50, choices=ACCOMODATION_CHOICES, default='not_req', blank=True, null=True)
+
+ def __unicode__(self):
+ return str(self.name)
+
+ def get_total_count(self):
+ mem = len(self.members.all())
+ return mem
diff --git a/apps/users/pipeline.py b/apps/users/pipeline.py
index b390341..d25cbdb 100755
--- a/apps/users/pipeline.py
+++ b/apps/users/pipeline.py
@@ -5,6 +5,7 @@
from django.core.urlresolvers import resolve, reverse
from django.core.files.base import ContentFile
# Apps
+from apps.users.utils import send_email_validation_mail, send_registration_mail
# Decorators
# Models
from django.contrib.auth.models import User
@@ -15,7 +16,7 @@
from misc.utils import *
from social.pipeline.partial import partial
# Python
-
+import datetime
@partial
def require_email(strategy, details, user=None, is_new=False, *args, **kwargs):
if user and user.email:
@@ -47,3 +48,11 @@ def check_existing_user(strategy, details, response, uid, user=None, *args, **kw
return user
# return redirect('apps.users.views.first_login_required')
+# Send Confirmation email
+
+def send_welcome_email(user, details, is_new=False, new_association=False, **kwargs):
+ print "is new ========================== ", is_new
+ print "new association ================= ", new_association
+ print user.last_login
+ if is_new or user.last_login < datetime.datetime(2015, 12, 10, 0, 0):
+ send_registration_mail(user)
diff --git a/apps/users/token.py b/apps/users/token.py
new file mode 100644
index 0000000..ca64e2c
--- /dev/null
+++ b/apps/users/token.py
@@ -0,0 +1,73 @@
+from datetime import date
+from django.conf import settings
+from django.utils.http import int_to_base36, base36_to_int
+from django.utils.crypto import constant_time_compare, salted_hmac
+from django.utils import six
+
+
+class PasswordResetTokenGenerator(object):
+ """
+ Strategy object used to generate and check tokens for the password
+ reset mechanism.
+ """
+ def make_token(self, user):
+ """
+ Returns a token that can be used once to do a password reset
+ for the given user.
+ """
+ return self._make_token_with_timestamp(user, self._num_days(self._today()))
+
+ def check_token(self, user, token):
+ """
+ Check that a password reset token is correct for a given user.
+ """
+ # Parse the token
+ try:
+ ts_b36, hash = token.split("-")
+ except ValueError:
+ return False
+
+ try:
+ ts = base36_to_int(ts_b36)
+ except ValueError:
+ return False
+
+ # Check that the timestamp/uid has not been tampered with
+ if not constant_time_compare(self._make_token_with_timestamp(user, ts), token):
+ return False
+
+ # Check the timestamp is within limit
+ if (self._num_days(self._today()) - ts) > settings.PASSWORD_RESET_TIMEOUT_DAYS:
+ return False
+
+ return True
+
+ def _make_token_with_timestamp(self, user, timestamp):
+ # timestamp is number of days since 2001-1-1. Converted to
+ # base 36, this gives us a 3 digit string until about 2121
+ ts_b36 = int_to_base36(timestamp)
+
+ # By hashing on the internal state of the user and using state
+ # that is sure to change (the password salt will change as soon as
+ # the password is set, at least for current Django auth, and
+ # last_login will also change), we produce a hash that will be
+ # invalid as soon as it is used.
+ # We limit the hash to 20 chars to keep URL short
+ key_salt = "django.contrib.auth.tokens.PasswordResetTokenGenerator"
+
+ # Ensure results are consistent across DB backends
+ login_timestamp = user.date_joined.replace(microsecond=0, tzinfo=None)
+
+ value = (six.text_type(user.pk) + user.password +
+ six.text_type(login_timestamp) + six.text_type(timestamp))
+ hash = salted_hmac(key_salt, value).hexdigest()[::2]
+ return "%s-%s" % (ts_b36, hash)
+
+ def _num_days(self, dt):
+ return (dt - date(2001, 1, 1)).days
+
+ def _today(self):
+ # Used for mocking in tests
+ return date.today()
+
+default_token_generator = PasswordResetTokenGenerator()
diff --git a/apps/users/utils.py b/apps/users/utils.py
new file mode 100644
index 0000000..f49e6c1
--- /dev/null
+++ b/apps/users/utils.py
@@ -0,0 +1,32 @@
+from apps.users.token import default_token_generator as pset
+from django.utils.http import int_to_base36, base36_to_int
+from post_office import mail
+from django.conf import settings
+
+def send_email_validation_mail(user):
+ uidb36 = int_to_base36(user.id)
+ token = pset.make_token(user)
+ profile = UserProfile.objects.get_or_create(user=user)[0]
+ unsubscribe_link = profile.create_unsubscribe_link()
+ print unsubscribe_link
+ print user.email
+ mail.send(
+ sender = settings.DEFAULT_MAIN_FROM_EMAIL,
+ recipients = [user.email],
+ template = 'validation.email',
+ context = {'subject': 'Validate your email, Saarang 2016', 'user': user, 'FEST_NAME': settings.FEST_NAME, 'SITE_URL': settings.SITE_URL, 'unsubscribe_link': unsubscribe_link, 'uidb36':uidb36,'token':token},
+ headers = {'List-Unsubscribe': unsubscribe_link}
+ )
+ return
+
+def send_registration_mail(user):
+ unsubscribe_link = "dasdasdasei8rwer9f898fasd89a"
+ mail.send(
+ sender = settings.DEFAULT_MAIN_FROM_EMAIL,
+ recipients = [user.email],
+ template = 'registration.email',
+ context = {'subject': 'Welcome to Saarang 2016', 'user': user, 'FEST_NAME': settings.FEST_NAME, 'SITE_URL': settings.SITE_URL},
+ headers = {'List-Unsubscribe': unsubscribe_link}
+ )
+ return
+
diff --git a/apps/users/views.py b/apps/users/views.py
index 4400ab0..68ad815 100644
--- a/apps/users/views.py
+++ b/apps/users/views.py
@@ -1,14 +1,17 @@
# Django
-from django.shortcuts import get_object_or_404, render_to_response, redirect, HttpResponseRedirect, render
-from django.contrib.auth import authenticate, login
+from django.shortcuts import get_object_or_404, render_to_response, redirect, HttpResponseRedirect, render, HttpResponse
+from django.contrib.auth import authenticate, login, logout
from django.contrib import messages
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.templatetags.static import static
+from django.utils.http import int_to_base36, base36_to_int
# Apps
from misc.utils import * #Import miscellaneous functions
from misc import strings
from misc.constants import HOSTEL_CHOICES, BRANCH_CHOICES
+from apps.users.utils import send_email_validation_mail, send_registration_mail
+from apps.users.token import default_token_generator as pset
# Decorators
from django.views.decorators.csrf import csrf_exempt
from rest_framework.decorators import api_view, permission_classes
@@ -75,7 +78,6 @@ def login_user(request):
# Checks for username and password
username = login_form.cleaned_data["username"][:30] # As django truncates username field upto 30 chars
password = login_form.cleaned_data["password"]
-
# Authenticates user against database
user = authenticate(username=username, password=password)
# if user is None:
@@ -304,7 +306,7 @@ def identity(request, role_type=None, role_id=None):
@permission_classes((AllowAny, ))
def participant_registration(request):
serialized = UserSerializer(data = request.DATA)
- if serialized.is_valid():
+ if serialized.init_data['email']:
user = get_object_or_None(User, username=serialized.init_data['email'])
if user:
return Response({
@@ -320,10 +322,19 @@ def participant_registration(request):
user.last_name = serialized.init_data['last_name']
user.is_active = True
user.save()
+ profile = UserProfile.objects.get_or_create(user=user)[0]
+ profile.save()
token = Token.objects.get_or_create(user=user)[0]
user = authenticate(username=serialized.init_data['email'], password=serialized.init_data['password'])
login(request, user)
- data = serialized.data
+ old_data = serialized.init_data
+
+ data = {
+ 'email': serialized.init_data['email'],
+ 'last_name':serialized.init_data['last_name'],
+ 'first_name':serialized.init_data['first_name'],
+ 'password':serialized.init_data['password']
+ }
data['token'] = token.key
data['user_id'] = user.id
return Response(data, status=status.HTTP_201_CREATED)
@@ -348,9 +359,14 @@ def participant_login(request):
user = get_object_or_None(User, username=email)
if user == None:
- return Response({
- "email": ["This email address doesn't have an account."]
- }, status=status.HTTP_400_BAD_REQUEST)
+ userprofile=get_object_or_None(UserProfile, saarang_id=email)
+ if user==None:
+ return Response({
+ "email": ["This email address doesn't have an account."]
+ }, status=status.HTTP_400_BAD_REQUEST)
+ else:
+ user=userprofile.user
+ email=user.email
# Authenticates user against database
user = authenticate(username=email, password=password)
@@ -421,3 +437,27 @@ def unsubscribe(request, username, token):
# Otherwise redirect to login page
next_url = reverse('apps.users.views.unsubscribe', kwargs={'username': username, 'token': token,})
return HttpResponseRedirect('%s?next=%s' % (reverse('login'), next_url))
+
+def validate_email(request, uidb36, token):
+ #TODO: Need to put definite messages
+ assert uidb36 is not None and token is not None
+ try:
+ uid_int = base36_to_int(uidb36)
+ user = User.objects.get(pk=uid_int)
+ except:
+ user = None
+
+ if user is not None and pset.check_token(user, token):
+ user.profile.is_active = True
+ user.save()
+ send_registration_mail(user)
+ else:
+ return HttpResponse("ERROR")
+ return HttpResponseRedirect(settings.MAIN_SITE+'2016/main')
+
+@csrf_exempt
+@api_view(['GET'])
+@permission_classes((AllowAny, ))
+def logout_user(request):
+ logout(request)
+ return HttpResponseRedirect(settings.MAIN_SITE)
diff --git a/apps/walls/models.py b/apps/walls/models.py
index d8c855c..8c6ede3 100644
--- a/apps/walls/models.py
+++ b/apps/walls/models.py
@@ -167,6 +167,7 @@ def send_notif(self, notif_list=None):
# Get my wall and posts which I am to get notifs for
notif_list = User.objects.filter(post.notify_users_query() | wall.notify_users_query()).distinct()
mail_list = []
+
notif_list=list(notif_list)
notif_list.remove(self.by)
message={} # to send push notifications
@@ -174,6 +175,7 @@ def send_notif(self, notif_list=None):
message['message']=self.description.strip()[:50]
send_push(notif_list, message)
+
for recipient in notif_list:
# Check if receipient already has notif on this post
curr_notif = get_object_or_None(recipient.notifications.unread(), target_object_id=post.id)
diff --git a/apps/walls/views.py b/apps/walls/views.py
index ff3892e..56f8db4 100644
--- a/apps/walls/views.py
+++ b/apps/walls/views.py
@@ -22,6 +22,10 @@
# Python
import os
import notifications
+from django.views.decorators.csrf import csrf_exempt
+from post_office import mail
+
+from apps.events.models import EventFeedback
@login_required
def wall (request, wall_id=None, post_id=None):
@@ -160,11 +164,27 @@ def email_test(request):
}
return render_to_response('notification.html', local_context, context_instance= global_context(request))
# For testing API
+@csrf_exempt
def api_test(request):
- print "==========================================="
- print "==== POST:"
- print request.POST
- print "==== GET :"
+ feedback = EventFeedback(q1=request.GET['q1'], q2=request.GET['q2'],q3=request.GET['q3'],q4=request.GET['q4'],q5=request.GET['q5'],event=request.GET['objectid'])
+ feedback.save()
+
print request.GET
print "==========================================="
- return HttpResponse("Success")
+
+ text= "===========================================\n"
+ text+= "==== POST:\n"
+ for i in request.POST:
+ text+= i+': ' + str(request.POST[i])+' | \n'
+ text+= "\n==== GET :\n"
+ for i in request.GET:
+ text+= i+ ' : ' + str(request.GET[i])+' | \n'
+ text+= "\n===========================================\n"
+ mail.send(
+ ['muhammedshahid.k@gmail.com', 'event_feedback@saarang.org'], # List of email addresses also accepted
+ 'noreply@saarang.org',
+ subject='API TEST',
+ message=text + str(feedback.id),
+ html_message=text,
+ )
+ return HttpResponse("Success\n"+text)
diff --git a/configs/global_settings.py b/configs/global_settings.py
index 04fe451..65e65c0 100755
--- a/configs/global_settings.py
+++ b/configs/global_settings.py
@@ -72,6 +72,7 @@
'exportdata', # used to generate csv files from models
'select2',
+ 'bootstrap3',
# Mobile and Mainsite API
'rest_framework',
@@ -85,12 +86,17 @@
'apps.users',
'apps.walls',
'apps.events',
+ 'apps.hospi',
'apps.docs',
'apps.portals.events',
+ 'apps.portals.hospi',
+ 'apps.portals.spons',
+ 'apps.spons',
'apps.portals.general',
'apps.search',
'apps.blog',
'apps.api',
+ 'apps.fb',
)
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + API_APPS
@@ -118,7 +124,7 @@
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+ # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'apps.users.middleware.SocialAuthExceptionMiddleware',
@@ -396,11 +402,12 @@ def skip_suspicious_operations(record):
'social.pipeline.user.get_username',
# 'example.app.pipeline.require_email',
# 'social.pipeline.mail.mail_validation',
- # 'social.pipeline.user.create_user',
+ 'social.pipeline.user.create_user',
'apps.users.pipeline.check_existing_user',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details',
+ #'apps.users.pipeline.send_welcome_email',
)
# Social auth - backend specific
@@ -412,13 +419,18 @@ def skip_suspicious_operations(record):
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '186928535147.apps.googleusercontent.com'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'N2LxEfSraUVwC79sn4aqtqFE'
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = [
- 'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/userinfo.profile',
'https://www.googleapis.com/auth/userinfo.email',
- 'https://www.googleapis.com/auth/calendar',
'https://www.googleapis.com/auth/plus.login',
]
+#SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = [
+# 'https://www.googleapis.com/auth/drive',
+# 'https://www.googleapis.com/auth/userinfo.profile',
+# 'https://www.googleapis.com/auth/userinfo.email',
+# 'https://www.googleapis.com/auth/calendar',
+# 'https://www.googleapis.com/auth/plus.login',
+#]
# Facebook
SOCIAL_AUTH_FACEBOOK_KEY = ''
SOCIAL_AUTH_FACEBOOK_SECRET = ''
@@ -443,12 +455,12 @@ def skip_suspicious_operations(record):
#'friends_work_history', # friends extended profile scope
#'read_friendlists', 'read_insights', 'read_requests',
- 'user_online_presence', #'friends_online_presence',
+ #'user_online_presence', #'friends_online_presence',
# Extended Permissions scope
#'create_event', 'manage_friendlists', 'manage_notifications',
- 'publish_actions', 'publish_stream', # Extended permissions publish
+ #'publish_actions', #'publish_stream', # Extended permissions publish
]
SOCIAL_AUTH_FACEBOOK_EXTENDED_PERMISSIONS = SOCIAL_AUTH_FACEBOOK_SCOPE
# Twitter
@@ -608,3 +620,12 @@ def skip_suspicious_operations(record):
'admin': {}
}
+SPONS_ACCESS_ID = ()
+
+EVENT_VENUES=()
+
+EVENT_CATEGORIES = ()
+
+DEFAULT_MAIN_FROM_EMAIL = ''
+
+APP_ENGINE_ADMIN_KEY = ''
diff --git a/configs/requirements.txt b/configs/requirements.txt
index 1fc7ecc..4f07d9a 100755
--- a/configs/requirements.txt
+++ b/configs/requirements.txt
@@ -1,45 +1,6 @@
BeautifulSoup==3.2.1
Django==1.6.5
South==0.8.4
-#Twisted==14.0.0
-Werkzeug==0.9.4
-argparse==1.2.1
-django-annoying==0.8.0
-django-appconf==0.6
-django-compressor==1.4
-django-cors-headers==0.13
-django-dajaxice==0.6
-django-debug-toolbar==1.2.1
-django-exportdata==0.2
-django-extensions==1.3.7
-django-haystack==2.2.0
-django-model-utils==2.0.3
-django-notifications-hq==0.6.2
-django-post-office==0.8.4
-django-push-notifications==1.1.0
-django-rest-swagger==0.1.14
-django-uuidfield==0.5.0
-djangorestframework==2.3.14
-django-select2-forms==1.1.18
-google-api-python-client==1.2
-httplib2==0.9
-jsonfield==0.9.20
-oauthlib==0.6.1
-pysolr==3.2.0
-python-openid==2.2.5
-python-ptrace==0.7
-python-social-auth==0.1.24
-requests==2.3.0
-requests-oauthlib==0.4.0
-six==1.6.1
-sqlparse==0.1.11
-urllib3==1.8.2
-wsgiref==0.1.2
-zope.interface==4.1.1
-BeautifulSoup==3.2.1
-Django==1.6.5
-MySQL-python==1.2.5
-South==0.8.4
Werkzeug==0.9.4
argparse==1.2.1
django-access-tokens==0.9.2
@@ -52,7 +13,7 @@ django-dajaxice==0.6
django-debug-toolbar==1.2.1
django-exportdata==0.2
django-extensions==1.3.7
-django-haystack==2.2.1
+#django-haystack==2.2.1
django-model-utils==2.0.3
django-notifications-hq==0.6.2
django-post-office==0.8.4
@@ -71,6 +32,7 @@ python-memcached==1.53
python-openid==2.2.5
python-ptrace==0.7
python-social-auth==0.1.24
+pytz==2014.10
requests==2.3.0
requests-oauthlib==0.4.0
six==1.6.1
diff --git a/configs/urls.py b/configs/urls.py
index 1d85401..ae0d686 100755
--- a/configs/urls.py
+++ b/configs/urls.py
@@ -37,10 +37,18 @@
router.register(r'posts',mobile.PostsViewSet, base_name="posts")
router.register(r'comments',mobile.CommentsViewSet, base_name="comments")
router.register(r'gcm',gcm.GCMViewSet, base_name="gcm")
+router.register(r'contacts',mobile.ContactsViewSet, base_name="contacts")
router.register(r'profile',mobile.UserProfileViewSet,base_name="profile")
+router.register(r'profile_post',mobile.UserProfilePostViewSet,base_name="profile_post")
router.register(r'teams',mobile.TeamViewSet,base_name="teams")
router.register(r'blogs',mobile.BlogFeedViewSet,base_name="blogs")
router.register(r'events',mobile.EventViewSet,base_name="events")
+router.register(r'user_events',mobile.RegistrationViewSet,base_name="events_regis")
+router.register(r'display_events',mobile.EventDisplayViewset,base_name="events_display")
+router.register(r'display_spons',mobile.SponsImageViewset,base_name="spons_display")
+router.register(r'edit_profile',mobile.UserProfileEditViewSet,base_name="edit_profile")
+router.register(r'users',mobile.UserViewSet,base_name="users")
+router.register(r'bandhunt',mobile.BandHuntViewSet,base_name="bandhunt")
urlpatterns = patterns('',
# ------------------------------------------------------------------
@@ -58,14 +66,16 @@
url(r'^identity$', 'apps.users.views.identity', name='identity'),
# Email unsubscribe
url(r'^unsubscribe/(?P[\w.@+-]+)/(?P[\w.:\-_=]+)/$', 'apps.users.views.unsubscribe'),
+ # Email Validation
+ url(r'^validate/(?P[0-9A-Za-z]{1,13})-(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 'apps.users.views.validate_email', name='validate_email'),
# Home
url(r'^newsfeed/$', 'apps.home.views.newsfeed', name='newsfeed'), # Shows newsfeed for a user
url(r'^contacts/$', 'apps.home.views.contacts', name='contacts'), # Shows contact page
# Notification
- url(r'^notification/read/(?P\w+)$', 'apps.home.views.read_notification', name='read_notification'), # makes the given notification read and redirects to the page
-
- # Walls
+ url(r'^notification/read/(?P\w+)$', 'apps.home.views.read_notification', name='read_notification'), # makes the given notification read and redirects to the page
+
+ # Walls
url(r'^wall/(?P\d+)$', 'apps.walls.views.wall', name='wall'),
url(r'^wall/(?P\d+)/(?P\d+)$', 'apps.walls.views.wall', name='wall'),
url(r'^wall$', 'apps.walls.views.wall', name='wall'),
@@ -87,16 +97,27 @@
#url(r'^setup/$', 'misc.views.setup', name='setup'),
url(r'^portals/admin/$','apps.portals.general.views.admin_portal', name='admin_portal' ),
+ url(r'^portals/finance/$','apps.portals.finance.views.finance_portal', name='finance_portal' ),
+ url(r'^portals/hospi/$','apps.portals.hospi.views.hospi_portal', name='hospi_portal' ),
+
# events portal
url(r'^portals/events/$','apps.portals.events.views.add_tabs', name='events_portal'),
-
+ #finance portal
url(r'^portals/finance/$','apps.portals.finance.views.finance_portal', name='finance_portal' ),
-
+ #qms portal
+ url(r'^portals/qms/$','apps.portals.qms.views.qms_portal', name='qms_portal' ),
+ url(r'^search2/$', 'apps.portals.qms.views.id_search', name='qms_id_search'),
+ url(r'^search3/$', 'apps.portals.qms.views.team_search', name='qms_team_search'),
+ url(r'^search4/$', 'apps.portals.qms.views.event_search', name='qms_event_search'),
# Participant - Login/registration
url(r'^participant_registration/$','apps.users.views.participant_registration', name='participant_registration'),
url(r'^participant_login/$','apps.users.views.participant_login', name='participant_login'),
url(r'^social_login/$','apps.users.views.social_login', name='social_login'),
+ url(r'^logout_user/$','apps.users.views.logout_user', name='logout_user'),
+
+ # Facebook
+ url(r'^fb/opc/$','apps.fb.views.opc', name='facebook_opc'),
# ------------------------------------------------------------------
# DJANGO APPS - FOR EXTERNAL USE
@@ -117,6 +138,8 @@
# ------------------------------------------------------------------
# THIRD PARTY APPS
# Dajaxice
+ url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
+
url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
# Notifications
@@ -137,6 +160,8 @@
url(r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT}),
+ url(r'^media/(?P.*)$', 'django.views.static.serve',
+ {'document_root': settings.MEDIA_ROOT}),
# API
url(r'^api-web-auth/', include('rest_framework.urls', namespace='rest_framework')),
@@ -147,6 +172,20 @@
# Mobile SDK Auth
url(r'^api-mobile-auth/(?P[^/]+)/?$','apps.api.utils.mobile_auth'),
+ # Spons
+ url(r'^add_logo/$', 'apps.portals.spons.views.add_logo', name='spons_portal'),
+ url(r'^delete_logo/(?P\d+)/$', 'apps.portals.spons.views.delete_logo', name='spons_delete_logo'),
+ url(r'^edit_logo/(?P\d+)/$', 'apps.portals.spons.views.edit_logo', name='spons_edit_logo'),
+ url(r'^save_logo/(?P\d+)/$', 'apps.portals.spons.views.save_logo', name='spons_save_logo'),
+
+ # Had to do this
+ # Include urls from hospi
+ url(r'^hospi/', include('apps.hospi.urls')),
+
+ url(r'^certificate/(?P\d+)/$', 'apps.portals.events.views.generate_pdf_certificate', name='winner_certif'),
+
+ url(r'^schedule/$', 'apps.portals.events.views.generate_schedule', name='events_schedule'),
+
)
# 400 & 500
diff --git a/event_regns.csv b/event_regns.csv
new file mode 100644
index 0000000..47e3955
--- /dev/null
+++ b/event_regns.csv
@@ -0,0 +1,773 @@
+event,email,name,city,college,mobile,team
+Decibels,avrocker33@gmail.com,A,Mumbai,None,9167769266,Dionysian
+Decibels,avneeshasija92@gmail.com,A,New Delhi,BIMTECH,9871120667,Philosophy of Life
+Decibels,ishantverma83@gmail.com,I,JAMMU,MIET JAMMU,09419235635,The Nerds
+Decibels,kanaksirur_1@hotmail.com,M,None,None,+919819304880,EarGasm
+Decibels,radiator13@gmail.com,A,None,None,+918939552852,Nuck Chorris
+Decibels,sayanukil1234@gmail.com,S,Kolkata,Delhi Public School,7685868590,Annihilate The Reich
+Decibels,satz.shaddy@gmail.com,S,Chennai,Patrician College, Adyar,9094960577,Rampage
+Decibels,jenish1994@gmail.com,J,None,None,None,Arcane revelations
+Decibels,hari2835@gmail.com,H,None,None,None,Deaf End
+Decibels,sawantheband@gmail.com,S,MYSORE,SBRR MAHAJANAS FIRST GRADE COLLEGE MYSRORE,+919535325050,SAWAN
+Vox,ranjaniramadoss@yahoo.in,R,Chennai,PSBBSSS,9445076070,None
+Dance Workshops,naveenjain66@gmail.com,N,jaipur,skit,jaipur,9928795887,None
+Solo Dance,naveenjain66@gmail.com,N,jaipur,skit,jaipur,9928795887,None
+Acoustyx,sawantheband@gmail.com,S,MYSORE,SBRR MAHAJANAS FIRST GRADE COLLEGE MYSRORE,+919535325050,SAWAN
+Powerchords,antischooler666@yahoo.com,P,None,None,None,None
+Powerchords,antischooler666@yahoo.com,P,None,None,None,None
+Poster Making,swathikansmhss2012@gmail.com,S,chennai,SKR ENGINEERING COLLEGE,9566104209,None
+Sonata,ramyajune19.nit@gmail.com,R,TRICHY,NIT TRICHY,9942345491,None
+Powerchords,shivaxbeast@gmail.com,S,chennai,vellamal,7708505531,None
+Scrabble,urstrulykaushik@gmail.com,S,eluru,sir c r reddy college of engineering,+919494902468,Age of Ultron
+Dance Workshops,urstrulykaushik@gmail.com,S,eluru,sir c r reddy college of engineering,+919494902468,None
+Onground Photography,urstrulykaushik@gmail.com,S,eluru,sir c r reddy college of engineering,+919494902468,None
+T-shirt Painting Workshop,urstrulykaushik@gmail.com,S,eluru,sir c r reddy college of engineering,+919494902468,Age of Ultron
+Finger painting,urstrulykaushik@gmail.com,S,eluru,sir c r reddy college of engineering,+919494902468,None
+Dance Workshops,sumanth0033@gmail.com,s,Eluru,sir cr reddy college of engineering,+918106271721,None
+Onground Photography,sumanth0033@gmail.com,s,Eluru,sir cr reddy college of engineering,+918106271721,None
+Finger painting,sumanth0033@gmail.com,s,Eluru,sir cr reddy college of engineering,+918106271721,None
+Dance Workshops,kanagalayashwanth@gmail.com,N,None,None,None,None
+Decibels,keyboardsathriyan@gmail.com,S,Chennai,Patrician College Of Arts And Science,+919962745857,rAmpAgE,.
+Solo Dance,premjb75@gmail.com,p,None,None,None,None
+Powerchords,surya_goutham@yahoo.co.in,S,Chennai,Sathyabama University,9003194446,None
+Vox,arjunexcell16@gmail.com,A,None,None,None,None
+Alankar,pranavkonanur@gmail.com,P,Surathkal,Mangalore,NITK Surathkal,9902739710,None
+Online Script Writing,janarthanan.r007@gmail.com,J,PERAMBALUR,TRIARD,9003743035,None
+Online Photography Contest,janarthanan.r007@gmail.com,J,PERAMBALUR,TRIARD,9003743035,None
+Online Script Writing,harigovind10@gmail.com,H,None,None,None,None
+Online Script Writing,examreg.manish@gmail.com,M,Chennai,IIT Madras,8939079032,None
+Online Script Writing,v.raja229@gmail.com,V,Chennai,Peri Institute Of Technology,+919043704009,None
+Online Photography Contest,cathy_dolly94@yahoo.com,C,chennai,Stella Maris,9841183810,None
+Onground Photography,cathy_dolly94@yahoo.com,C,chennai,Stella Maris,9841183810,None
+Oekaki - The Sketching Contest,cathy_dolly94@yahoo.com,C,chennai,Stella Maris,9841183810,Catherine
+Finger painting,cathy_dolly94@yahoo.com,C,chennai,Stella Maris,9841183810,None
+Online Photography Contest,msivasakthi95@yahoo.com,M,None,None,None,None
+Finger painting,msivasakthi95@yahoo.com,M,None,None,None,None
+Poster Making,msivasakthi95@yahoo.com,M,None,None,None,None
+Oekaki - The Sketching Contest,msivasakthi95@yahoo.com,M,None,None,None,star
+Online Photography Contest,varunjain.vj.5@gmail.com,V,Chennai,IIT Madras,7418311520,None
+Powerchords,abilasok@gmail.com,a,alappuzha,snc,9496466308,None
+Decibels,abilasok@gmail.com,a,alappuzha,snc,9496466308,Amorphia
+Solo Dance,abilasok@gmail.com,a,alappuzha,snc,9496466308,None
+Instrumentals,abilasok@gmail.com,a,alappuzha,snc,9496466308,None
+Short Film Making,pssbhargav@gmail.com,B,Chennai,IIT Madras,9003113816,None
+Poster Making,pssbhargav@gmail.com,B,Chennai,IIT Madras,9003113816,None
+Adrenaline Zone,pssbhargav@gmail.com,B,Chennai,IIT Madras,9003113816,None
+Vox,a7nair@live.com,A,chennai,Hindustan University,+919789371137,None
+Short Film Making,thejeshgowda95@gmail.com,T,None,None,None,None
+Online Photography Contest,thivaking@gmail.com,T,Puducherry,Achariya college of Engineering Technology,8870791860,None
+Online Script Writing,prasanna_apache@yahoo.com,P,None,SRM UNIVERSITY,None,None
+Online Photography Contest,prasanna_apache@yahoo.com,P,None,SRM UNIVERSITY,None,None
+Poster Making,nagklu@gmail.com,N,VADDESWARAM,KL UNIVERSITY,9966572007,None
+Online Photography Contest,nagklu@gmail.com,N,VADDESWARAM,KL UNIVERSITY,9966572007,None
+Oekaki - The Sketching Contest,nagklu@gmail.com,N,VADDESWARAM,KL UNIVERSITY,9966572007,jignasa
+Finger painting,aparna.april321@gmail.com,A,Chennai,IIT MADRAS,+91 8608985980,None
+Online Script Writing,,R,Chennai,IIT Madras,09665938128,None
+Vox,antonykevin001@gmail.com,A,Chennai,SVCE,+919940126962,None
+Alankar,vikramsinger@yahoo.com,V,CHENNAI,DG VAISHNAV COLLEGE,09003989892,None
+Vox,emineeves@gmail.com,J,Salem,Sona College Of Technology,9486579597,None
+Sonata,emineeves@gmail.com,J,Salem,Sona College Of Technology,9486579597,None
+Online Photography Contest,emineeves@gmail.com,J,Salem,Sona College Of Technology,9486579597,None
+Onground Photography,emineeves@gmail.com,J,Salem,Sona College Of Technology,9486579597,None
+Online Photography Contest,creativerebel1588@gmail.com,A,Coimbatore,Amrita School of Engineering,+918754707933,None
+Onground Photography,creativerebel1588@gmail.com,A,Coimbatore,Amrita School of Engineering,+918754707933,None
+Poster Making,shanthini.chitchat@gmail.com,S,chennai,anand institute of higher technology,9940507755,None
+Short Film Making,ksaisudhakar@gmail.com,S,Chennai,IIT Madras,9666673672,None
+Scrabble,,K,Chennai,IIT Madras,9940459059,The SCRABBLERS
+Short Film Making,ahamvidhu36@gmail.com,M,chennai,None,9962145189,None
+Short Film Making,teja.kunisetty@gmail.com,K,Chennai,IIT Madras,7200317939,None
+Ad Making,teja.kunisetty@gmail.com,K,Chennai,IIT Madras,7200317939,Cyborgs
+Online Script Writing,swetha.esp95@gmail.com,s,CHENNAI,IITMADRAS,9884184229,None
+Adrenaline Zone,swetha.esp95@gmail.com,s,CHENNAI,IITMADRAS,9884184229,None
+Ad Making,swetha.esp95@gmail.com,s,CHENNAI,IITMADRAS,9884184229,creativeads
+Onground Photography,swetha.esp95@gmail.com,s,CHENNAI,IITMADRAS,9884184229,None
+Online Photography Contest,swetha.esp95@gmail.com,s,CHENNAI,IITMADRAS,9884184229,None
+Clay Sculpting Workshop,swetha.esp95@gmail.com,s,CHENNAI,IITMADRAS,9884184229,None
+Vox,ernestrichards5@gmail.com,E,Chennai,Anna University, CEG campus,9444752027,None
+Online Photography Contest,jayakrishnan13.vm@gmail.com,J,None,None,None,None
+Alankar,adithyaram.shiv@gmail.com,A,Chennai,Sriram Engineering College,917845701815,None
+Young Reporter,kumaransiva41@gmail.com,S,chennai,vidya mandir,9840140337,superkings
+Adrenaline Zone,kumaransiva41@gmail.com,S,chennai,vidya mandir,9840140337,None
+Dance Workshops,kumaransiva41@gmail.com,S,chennai,vidya mandir,9840140337,None
+Vox,com.java.praveen@gmail.com,P,Chennai,ICAT ,Chennai,8056048061,None
+Solo Dance,com.java.praveen@gmail.com,P,Chennai,ICAT ,Chennai,8056048061,None
+Solo Dance,,S,pulivendula,jntua college of engineering pulivendula,+919676110580,None
+Solo Dance,prilusu@gmail.com,P,CHENNAI,MOP VAISHNAV COLLEGE FOR WOMEN,+919578269001,None
+Solo Dance,aparnajayaram@ymail.com,A,Chennai,MOP Vaishnav College for Women,+919566071988,None
+Choreo Night,kunju123kevin@gmail.com,K,Trivandrum,CET Trivandrum,8714510402,WTFz - Watch The FreakZ
+DJukebox,karan.pokeman@yahoo.co.in,K,Chennai,SVCE,+91-9962630415,None
+Online Script Writing,easwaran1996@gmail.com,E,Chennai,IIT Madras,9043255899,None
+Online Script Writing,sandhyasrinivas@hotmail.com,S,Bangalore,R V College of Engineering,+919740080138,None
+Dance Workshops,praalluri1994@live.com,P,eluru,sir c.r reddy college of engineering,8985599131,None
+Lonewolf,praalluri1994@live.com,P,eluru,sir c.r reddy college of engineering,8985599131,None
+Adrenaline Zone,praalluri1994@live.com,P,eluru,sir c.r reddy college of engineering,8985599131,None
+Onground Photography,praalluri1994@live.com,P,eluru,sir c.r reddy college of engineering,8985599131,None
+The Saarang Mob,praalluri1994@live.com,P,eluru,sir c.r reddy college of engineering,8985599131,None
+Onground Photography,samarendra2310@gmail.com,A,Hyderabad,VNRVJIET,9493995972,None
+Online Photography Contest,samarendra2310@gmail.com,A,Hyderabad,VNRVJIET,9493995972,None
+Online Photography Contest,konargourav@gmail.com,G,Chennai,SRM University, Kattankulathur,+919940019726,None
+Onground Photography,konargourav@gmail.com,G,Chennai,SRM University, Kattankulathur,+919940019726,None
+Vox,liszmaninopin@gmail.com,K,Chennai,IIT Madras,+918939233177,None
+Online Script Writing,konargourav@gmail.com,G,Chennai,SRM University, Kattankulathur,+919940019726,None
+Alankar,liszmaninopin@gmail.com,K,Chennai,IIT Madras,+918939233177,None
+Alankar,kelwalkarniharika@rediffmail.com,N,MUMBAI,Ramnarain Ruia College of Arts and Science,9967407227,None
+Powerchords,cletus.devil@gmail.com,C,chennai,loyola college,9962486582,None
+Powerchords,mtimothy95@gmail.com,M,Chennai,Madras Christian College,9940431006,None
+Solo Dance,saikoumudi@gmail.com,K,Hyderabad,Sreenidhi Institute of Science and Technology,8121337106,None
+Poster Making,prasanthgarikapati111@gmail.com,p,bapatla,bapatla engineering college,8985028519,None
+Young Reporter,gocoool786@gmail.com,M,madurai,VCET madurai,9994166165,deadmenwalking
+Ad Making,freak.shirazkhan@gmail.com,S,Chennai,IIT MADRAS,9176393319,Shiraz Khan
+Alankar,ranjithrhythm@gmail.com,R,None,D G Vaishnav, Madras University,9941562979,None
+Vox,csnj2789@gmail.com,N,Chennai,Patrician college of arts and science,9677015737,None
+Dance Workshops,karthikbuddala1234@gmail.com,k,eluru,sir c r reddy college,8125159737,None
+Online Script Writing,karthikbuddala1234@gmail.com,k,eluru,sir c r reddy college,8125159737,None
+Sonata,karthikbuddala1234@gmail.com,k,eluru,sir c r reddy college,8125159737,None
+T-shirt Painting Workshop,shyamonline94@gmail.com,S,coimbatore,SNS college of engineering,9677474995,ALIVE
+Online Script Writing,me14d413@smail.iitm.ac.in,A,Chennai,IIT Madras,+919445419780,None
+Onground Photography,shyamonline94@gmail.com,S,coimbatore,SNS college of engineering,9677474995,None
+Clay Sculpting Workshop,me14d413@smail.iitm.ac.in,A,Chennai,IIT Madras,+919445419780,None
+Poster Making,me14d413@smail.iitm.ac.in,A,Chennai,IIT Madras,+919445419780,None
+Acoustyx,christopher_raja@yahoo.in,C,Chennai,Meenakshi Sundararajan Engineering College,+919940063769,moksha
+Powerchords,ishantverma83@gmail.com,I,JAMMU,MIET JAMMU,09419235635,The Nerds
+Online Script Writing,drishika.vm@gmail.com,D,Bangalore,RV College of Engineering,+919632922977,None
+Dance Workshops,chetanknight1@gmail.com,C,chennai,iit madras,+919840882773,None
+Clay Sculpting Workshop,chetanknight1@gmail.com,C,chennai,iit madras,+919840882773,None
+Clay Sculpting Workshop,chetanknight1@gmail.com,C,chennai,iit madras,+919840882773,None
+Powerchords,sawantheband@gmail.com,S,MYSORE,SBRR MAHAJANAS FIRST GRADE COLLEGE MYSRORE,+919535325050,SAWAN
+Acoustyx,joshuamichael93@gmail.com,J,Vellore,VIT University,9952995338,Sunday Jam
+Sonata,joshuamichael93@gmail.com,J,Vellore,VIT University,9952995338,None
+Onground Photography,kesavanrangan@gmail.com,K,Chennai,Srinivasa Institute of Engineering and Technology,+918939704621,None
+Decibels,joshuamichael93@gmail.com,J,Vellore,VIT University,9952995338,Sunday Jam
+Scrabble,sujashree.r@gmail.com,R,Chennai,Anand Institute of Higher Technology,9444382252,Jabberwacky
+T-shirt Painting Workshop,sujashree.r@gmail.com,R,Chennai,Anand Institute of Higher Technology,9444382252,Jabberwacky
+Clay Sculpting Workshop,sujashree.r@gmail.com,R,Chennai,Anand Institute of Higher Technology,9444382252,None
+Poster Making,sujashree.r@gmail.com,R,Chennai,Anand Institute of Higher Technology,9444382252,None
+Oekaki - The Sketching Contest,sujashree.r@gmail.com,R,Chennai,Anand Institute of Higher Technology,9444382252,Jabberwacky
+Acoustyx,ares_legend@ymail.com,A,Chennai,Sri Venkateshwara College Of Engineering,8754403782,The Crocodile Park
+Sonata,ares_legend@ymail.com,A,Chennai,Sri Venkateshwara College Of Engineering,8754403782,None
+Group Dance,dgdiks22@gmail.com,D,Coimbatore,Amrita School Of Engineeering,Coimbaore,8056548025,None
+Poster Making,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,None
+Clay Sculpting Workshop,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,None
+Vox,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,None
+Online Script Writing,abisaranya02@gmail.com,A,CHENNAI,KENDRIYA VIDYALAYA IIT CAMPUS,9094193842,None
+Powerchords,atul5arora@yahoo.co.in,A,vellore,VIT University Vellore,+919950900005,Debarred
+Decibels,atul5arora@yahoo.co.in,A,vellore,VIT University Vellore,+919950900005,Debarred
+Short Film Making,pranay1028@gmail.com,P,chennai,srm university,9498082703,None
+Tarang,joshuamichael93@gmail.com,J,Vellore,VIT University,9952995338,The Pappu Project
+Vox,prathibha.673@gmail.com,P,Coimbatore,PSG College Of Technology,7200033367,None
+Decibels,shanks_theboss@yahoo.co.in,S,chennai,AAT College,9042249790,Adam and Evil
+Lonewolf,,P,COIMBATORE,P.S.G COLLEGE OF TECHNOLOGY,+919943900999,None
+Onground Photography,maha.darkangel96@gmail.com,M,Chennai,MOP Vaishnva college for women,8754852887,None
+Choreo Night,gowtham_gr8@yahoo.co.in,G,chennai,VIT University chennai,9790756586,xemius
+Powerchords,antonykevin001@gmail.com,A,Chennai,SVCE,+919940126962,Vertigo
+Decibels,antonykevin001@gmail.com,A,Chennai,SVCE,+919940126962,Vertigo
+Acoustyx,antonykevin001@gmail.com,A,Chennai,SVCE,+919940126962,Vertigo
+Acoustyx,antonykevin001@gmail.com,A,Chennai,SVCE,+919940126962,Vertigo
+Alankar,shravanshanoo@gmail.com,S,Chickmagalur,AIT chickmagalur,+919535442298,None
+Vox,shravanshanoo@gmail.com,S,Chickmagalur,AIT chickmagalur,+919535442298,None
+Lonewolf,kirubalove2@gmail.com,K,COIMBATORE,SNS COLLEGE OF ENGINEERING,+919659811938,None
+Short Film Making,crzteen_ram@yahoo.co.in,R,Bangalore,BMS College Of Engineering,+919611316847,None
+Adrenaline Zone,kirubalove2@gmail.com,K,COIMBATORE,SNS COLLEGE OF ENGINEERING,+919659811938,None
+Sonata,csramli@hotmail.com,S,Chennai,IIIT D&M,9952948438,None
+Scrabble,shyamonline94@gmail.com,S,coimbatore,SNS college of engineering,9677474995,ALIVE
+Choreo Night,sunildevika1993@gmail.com,D,Trivandrum,College of Engineering Trivandrum,9605644614,Watch The Freakz
+Online Photography Contest,arkmanu6@gmail.com,A,Chennai,Jerusalem College of Engineering,+919176897144,None
+Onground Photography,arkmanu6@gmail.com,A,Chennai,Jerusalem College of Engineering,+919176897144,None
+Raagapella,k.karthikeyan420@gmail.com,k,Coimbatore,SNS College of Technology,9597774967,None
+Vox,k.karthikeyan420@gmail.com,k,Coimbatore,SNS College of Technology,9597774967,None
+Vox,,I,chennai,srm katangulathur,9884000877,None
+Vox,siddharthsr1997@gmail.com,S,None,None,None,None
+Onground Photography,john.v.evangelist@gmail.com,J,COIMBATORE,SNS COLLEGE OF TECHNOLOGY,8122018150,None
+Poster Making,john.v.evangelist@gmail.com,J,COIMBATORE,SNS COLLEGE OF TECHNOLOGY,8122018150,None
+Online Photography Contest,john.v.evangelist@gmail.com,J,COIMBATORE,SNS COLLEGE OF TECHNOLOGY,8122018150,None
+Alankar,,I,chennai,srm katangulathur,9884000877,None
+Dance Workshops,itsmystyle.kavya@gmail.com,K,Coimbatore,SNS College of Engineering,8220781354,None
+The Saarang Mob,itsmystyle.kavya@gmail.com,K,Coimbatore,SNS College of Engineering,8220781354,None
+Solo Dance,itsmystyle.kavya@gmail.com,K,Coimbatore,SNS College of Engineering,8220781354,None
+Lonewolf,itsmystyle.kavya@gmail.com,K,Coimbatore,SNS College of Engineering,8220781354,None
+Instrumentals,ashok.king17@gmail.com,A,Coimbatore,SNS College of Technology,9994065155,None
+Vox,ashok.king17@gmail.com,A,Coimbatore,SNS College of Technology,9994065155,None
+Unplugged,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,McVibes
+Tarang,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,McVibes
+Online Photography Contest,chintanjain_96@yahoo.co.in,C,Chennai,SVCE,+919840649444,None
+Panache,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,McVibes
+Adrenaline Zone,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,None
+Online Script Writing,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,None
+Dramatics,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,McVibes
+Oekaki - The Sketching Contest,gopiraj15@gmail.com,G,Coimbatore,SNS College ofTechnology,9597195241,McVibes
+Vox,sanjuraja94@yahoo.com,S,Chennai,Stella Maris College,+919791191956,None
+Vox,nethra.rajan@gmail.com,N,chennai,SRM UNIVERSITY,9940172447,None
+Vox,dizizabhishake.kulchap@gmail.com,A,Vellore,VIT University,8940314044,None
+Online Script Writing,ramyajune19.nit@gmail.com,R,TRICHY,NIT TRICHY,9942345491,None
+Lonewolf,joydeep.roni@gmail.com,J,Bhubaneswar,ITER Bhubaneswar,7205851389,None
+Alankar,joydeep.roni@gmail.com,J,Bhubaneswar,ITER Bhubaneswar,7205851389,None
+Vox,joydeep.roni@gmail.com,J,Bhubaneswar,ITER Bhubaneswar,7205851389,None
+Adrenaline Zone,shravanshanoo@gmail.com,S,Chickmagalur,AIT chickmagalur,+919535442298,None
+Dance Workshops,shravanshanoo@gmail.com,S,Chickmagalur,AIT chickmagalur,+919535442298,None
+Decibels,gotenks_goten_g@yahoo.co.in,S,hyderabad,Vasavi college,+919849469988,The Tapes
+Decibels,rensjake93@yahoo.com,R,mangalore,NMAMIT,+918147656717,Avalanche Brakedown
+Solo Dance,shriguberane5913@gmail.com,R,chennai,Vivekanandha Vidhyalaya,8754649293,None
+Online Script Writing,prasheefires@gmail.com,P,Chennai,SSIET,9940465294,None
+Lonewolf,prasheefires@gmail.com,P,Chennai,SSIET,9940465294,None
+Short Film Making,prasheefires@gmail.com,P,Chennai,SSIET,9940465294,None
+Ad Making,prasheefires@gmail.com,P,Chennai,SSIET,9940465294,Clever cruels
+Powerchords,deborshi.140@gmail.com,D,Vellore,VIT, Vellore,9707685569,Avernus
+Decibels,iplaythekeyboard@gmail.com,K,Chennai,SKR,9884214391,The Beta Funktion
+Tarang,aathmasoul@gmail.com,A,Bangalore,Christ University,08197127554,Aathma
+Unplugged,aathmasoul@gmail.com,A,Bangalore,Christ University,08197127554,Aathma
+Online Script Writing,merlyene2@gmail.com,M,Coimbatore,SNS College of Engineering,8122636900,None
+Lonewolf,merlyene2@gmail.com,M,Coimbatore,SNS College of Engineering,8122636900,None
+Onground Photography,merlyene2@gmail.com,M,Coimbatore,SNS College of Engineering,8122636900,None
+Online Photography Contest,merlyene2@gmail.com,M,Coimbatore,SNS College of Engineering,8122636900,None
+Alankar,soundaryajessie@gmail.com,S,CHENNAI,MOP VAISHNAV COLLEGE FOR WOMEN,9791284250,None
+Short Film Making,surya2393@gmail.com,H,Chennai,Sri Sairam institute of technology,9940527797,None
+Vox,nityasamuel@yahoo.co.in,N,Bangalore,RVCE,+919611700163,None
+Decibels,pranav.radhakrishnan@yahoo.co.in,P,Chennai,Ramakrishna Mission Vivekananda College,9940200206,SpineShatter
+Powerchords,pranav.radhakrishnan@yahoo.co.in,P,Chennai,Ramakrishna Mission Vivekananda College,9940200206,SpineShatter
+Online Script Writing,sumosomu95@gmail.com,S,Bangalore,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,None
+Lonewolf,sumosomu95@gmail.com,S,Bangalore,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,None
+Ad Making,sumosomu95@gmail.com,S,Bangalore,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,dsce rockstars
+Ad Making,sumosomu95@gmail.com,S,Bangalore,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,dsce rockstars
+Lonewolf,akshay.thyagu@gmail.com,A,Chennai,SSN College of Engineering,+919566097744,None
+Online Photography Contest,selva1214@gmail.com,B,Chennai,Pachaiyappas college,+91 9176041475,None
+Onground Photography,selva1214@gmail.com,B,Chennai,Pachaiyappas college,+91 9176041475,None
+Decibels,akkithehero@gmail.com,A,new delhi,NIT kurukshetra,+919650941265,Alien Sky Cult
+Decibels,akkithehero@gmail.com,A,new delhi,NIT kurukshetra,+919650941265,Alien Sky Cult
+Decibels,raveesh@aishan.in,R,Bangalore,St. Pauls English School,+919845090837,Diffusion
+Powerchords,raveesh@aishan.in,R,Bangalore,St. Pauls English School,+919845090837,Diffusion
+Dance Workshops,sivanatrajan375@gmail.com,s,CHENNAI,SRI SAIRAM ENGINEERING COLLEGE,+918939142373,None
+Adrenaline Zone,sivanatrajan375@gmail.com,s,CHENNAI,SRI SAIRAM ENGINEERING COLLEGE,+918939142373,None
+Online Script Writing,,P,Coimbatore,SNS College of Engineering.,9952668284,None
+Lonewolf,desai_devki@yahoo.com,D,Chennai,SRM University,+918939662032,None
+Online Script Writing,desai_devki@yahoo.com,D,Chennai,SRM University,+918939662032,None
+Adrenaline Zone,desai_devki@yahoo.com,D,Chennai,SRM University,+918939662032,None
+Adrenaline Zone,harshils1996@gmail.com,H,chennai,IIT Madras,9962309289,None
+Decibels,vekka1988@gmail.com,v,ranchi,st.xaviers college , ranchi,9051731284,4 DEGREES OF FREEDOM
+Online Photography Contest,praveen.praveenraj10@gmail.com,p,Chennai,B.S.Abdur Rahman University,8220746225,None
+Onground Photography,praveen.praveenraj10@gmail.com,p,Chennai,B.S.Abdur Rahman University,8220746225,None
+Panache,manojkreddy.5@gmail.com,M,chennai,B.S.Abdur Rahman University.,9444156780,Crescent Fashion Team
+Onground Photography,ravali.kothuri2@gmail.com,R,Chennai,IIT Madras,9710291142,None
+Online Photography Contest,ravali.kothuri2@gmail.com,R,Chennai,IIT Madras,9710291142,None
+Adrenaline Zone,ravali.kothuri2@gmail.com,R,Chennai,IIT Madras,9710291142,None
+Decibels,duderock.66@gmail.com,G,delhi,School of open learning,9818090432,DISTORTION OF MISCHIEF
+Adrenaline Zone,,P,Calicut,NIT Calicut,9645355991,None
+Alankar,arunprateek1992@gmail.com,A,Chennai,SRM University,+919790776586,None
+Alankar,adeshbhardwaj19@gmail.com,A,chennai,srm university,8056209012,None
+Alankar,adeshbhardwaj19@gmail.com,A,chennai,srm university,8056209012,None
+Alankar,adeshbhardwaj19@gmail.com,A,chennai,srm university,8056209012,None
+Short Film Making,susruthanvesh@live.com,S,Hyderabad,BITS Pilani Hyderabad Campus,919912682704,None
+Dance Workshops,keerthana.sai02@gmail.com,s,bapatla,bapatla engineering college,8500871078,None
+Alankar,sathyachidhu@gmail.com,C,mandya,p e s college of engineering mandya,+918951647473,None
+Decibels,revanth.premkumar@gmail.com,R,Bangalore,Christ University,+91 953645635,Distortion
+Powerchords,revanth.premkumar@gmail.com,R,Bangalore,Christ University,+91 953645635,Distortion
+Dance Workshops,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,None
+Online Script Writing,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,None
+Online Photography Contest,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,None
+Short Film Making,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,None
+Scrabble,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,vk
+Young Reporter,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,vk
+Lonewolf,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,None
+Onground Photography,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,None
+Decibels,prash_94@hotmail.com,P,Vellore,VIT Vellore,+919094101001,Ominous
+Powerchords,prash_94@hotmail.com,P,Vellore,VIT Vellore,+919094101001,Ominous
+Dance Workshops,minaaz_rizvan@yahoo.co.in,M,CHENNAI,B.S.ABDUR RAHMAN UIVERSITY,+919884867424,None
+Onground Photography,chetnachutney96@yahoo.in,C,chennai,MOP Vaishnav college for women,9841178189,None
+Online Photography Contest,chetnachutney96@yahoo.in,C,chennai,MOP Vaishnav college for women,9841178189,None
+Decibels,rpg13@rediffmail.com,R,Bangalore,LEDGE13,+919766826608,LEDGE13
+Scrabble,basha.janybasha.jany94@gmail.com,J,Hyderabad,deccan college of engineering and technology,9059975429,pathan jany basha
+Online Script Writing,akp1596@gmail.com,A,Vellore,VIT Vellore,09994035211,None
+Powerchords,arshaqstick@yahoo.com,A,VELLORE,VIT,+919524094825,Trash Talk
+Onground Photography,deadmanalive07@gmail.com,E,Madurai,Velammal College Of Engineering And Technology,9489708581,None
+Online Photography Contest,deadmanalive07@gmail.com,E,Madurai,Velammal College Of Engineering And Technology,9489708581,None
+Scrabble,deadmanalive07@gmail.com,E,Madurai,Velammal College Of Engineering And Technology,9489708581,DEAD MEN WALKING
+Dance Workshops,deadmanalive07@gmail.com,E,Madurai,Velammal College Of Engineering And Technology,9489708581,None
+Decibels,madhusudan.raman@gmail.com,M,Bangalore,BMS College Of Engineering,+918105854664,D's Kitchen
+Decibels,ashwinxbhc@gmail.com,A,Chennai,Velammal Engineering College,8122310877,River Down South
+Decibels,luthfudeen@gmail.com,L,Chennai,Limkokwing University,+919940206786,River Down South
+Powerchords,rohitkamath143@gmail.com,R,Bangalore,RVCE,+919611362462,D's Kitchen
+Decibels,rohitkamath143@gmail.com,R,Bangalore,RVCE,+919611362462,D's Kitchen
+Decibels,sandip.jun17@gmail.com,S,Chennai,None,9003082899,Third Eye
+Short Film Making,ihatesoundaryan@gmail.com,S,Chennai,SAP Anna University,9789793264,None
+Adrenaline Zone,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,None
+Ad Making,vivekvicky.sharma999@gmail.com,V,madurai,madurai kamaraj university,8989764412,vk
+Online Photography Contest,naveendon.naveen@gmail.com,N,Thanjavur,PERIYAR MANIAMMAI UNIVERSITY,9500067812,None
+Instrumentals,kaushikramg95@gmail.com,K,Tiruchirapalli,NIT, Trichy,+919790756610,None
+Unplugged,sunil.nayak133@gmail.com,S,Surathkal,NITK Surathkal,+917760118257,Mxyzptlk
+Powerchords,sunil.nayak133@gmail.com,S,Surathkal,NITK Surathkal,+917760118257,Mxyzptlk
+Online Photography Contest,yogeshyoyo122@gmail.com,Y,Chennai,Dhanalakshmi college of engineering,9042814375,None
+Onground Photography,yogeshyoyo122@gmail.com,Y,Chennai,Dhanalakshmi college of engineering,9042814375,None
+Decibels,abhi_footballfreak@yahoo.co.in,A,Mangalore,NITK Surathkal,8971825088,The Green Scene
+Online Photography Contest,arvinmuthu@gmail.com,a,Chennai,Dhanalakshmi college of engineering,9566017012,None
+Onground Photography,arvinmuthu@gmail.com,a,Chennai,Dhanalakshmi college of engineering,9566017012,None
+Short Film Making,abhi_footballfreak@yahoo.co.in,A,Mangalore,NITK Surathkal,8971825088,None
+Alankar,viddu93@gmail.com,S,Hyderabad,Sridevi Womens Engineering College,+919441211611,None
+Alankar,trina4friendship@gmail.com,S,CHENNAI,SRM UNIVERSITY,9840805368,None
+Online Script Writing,trina4friendship@gmail.com,S,CHENNAI,SRM UNIVERSITY,9840805368,None
+Adrenaline Zone,chiraggupta1995@gmail.com,C,Mumbai,IIT Madras,7200467232,None
+Short Film Making,iyeswaria@yahoo.co.in,I,CHENNAI,IIT MADRAS,9003106011,None
+Solo Dance,d.shashank222@gmail.com,S,HYD,VNR VJIET,7382453416,None
+Dance Workshops,d.shashank222@gmail.com,S,HYD,VNR VJIET,7382453416,None
+Ad Making,sumosomu95@gmail.com,S,BANGALORE,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,dsce members
+Young Reporter,sumosomu95@gmail.com,S,BANGALORE,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,dsce members
+Online Script Writing,sumosomu95@gmail.com,S,BANGALORE,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,None
+Online Script Writing,sumosomu95@gmail.com,S,BANGALORE,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,None
+Online Script Writing,sumosomu95@gmail.com,S,BANGALORE,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,None
+Online Script Writing,sumosomu95@gmail.com,S,BANGALORE,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,None
+Online Script Writing,sumosomu95@gmail.com,S,BANGALORE,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,None
+Lonewolf,sumosomu95@gmail.com,S,BANGALORE,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,None
+Dramatics,sumosomu95@gmail.com,S,Bangalore,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,dsce rockstars
+Online Photography Contest,sumosomu95@gmail.com,S,Bangalore,DAYANANDA SAGAR COLLEGE OF ENGINEERING,+919663103697,None
+Alankar,sidcena93@gmail.com,S,Chennai,Sri Sairam Engineering College,+919003147557,None
+Alankar,,A,Chennai,IHM Chennai,+919789863162,None
+Short Film Making,dheepikak1996@gmail.com,D,Chennai,IIIT D&M Kancheepuram,+919952035154,None
+Alankar,aakashg369@gmail.com,A,Chennai,IHM Chennai,+919677054198,None
+Decibels,,D,new delhi,motila nehru,9999019677,Mashburn riffs
+Powerchords,,I,chennai,srm katangulathur,9884000877,The Hat Trickles
+Decibels,,I,chennai,srm katangulathur,9884000877,The Hat Trickles
+Tarang,,I,chennai,srm katangulathur,9884000877,The Hat Trickles
+DJukebox,saivignesh_1995@yahoo.com,A,Chennai,Vivekananda College,+91 8754475504,None
+Online Photography Contest,balasaranarch@gmail.com,b,CHENNAI,SAP, CHENNAI,9003252936,None
+Short Film Making,parthibanaz@gmail.com,P,Chennai,SSN college of engineering,8489646901,None
+Online Photography Contest,maniartattack@gmail.com,M,Chennai,Government College Of Fine Arts,919600749207,None
+Onground Photography,,S,Chennai,Govt College Of Fine Arts,7418205425,None
+Online Photography Contest,,S,Chennai,Govt College Of Fine Arts,7418205425,None
+Lonewolf,smounika333@gmail.com,M,tirupathi,sree vidyanikethan engineering college,7799188943,None
+Tarang,shubhankarnikhil@ymail.com,S,Vellore,VIT Vellore,+918124224940,SYMPHONY
+Unplugged,anantm95@gmail.com,A,Mangalore,NITK Surathkal,+91 9880821438,Anant
+Alankar,anantm95@gmail.com,A,Mangalore,NITK Surathkal,+91 9880821438,None
+Alankar,prathibha.673@gmail.com,P,Coimbatore,PSG College Of Technology,7200033367,None
+Ad Making,aravindhspielberg@gmail.com,A,chennai,JEPPIAR,8220674145,warriors
+Short Film Making,wolverinexmen59@gmail.com,A,None,None,None,None
+Lonewolf,saduruddinmohammed@gmail.com,S,Rajahmundry,Godavari Institute of Engineering and Technology,7842329545,None
+Panache,mohammadjalalludeen@gmail.com,J,chennai,The New College,9042923599,New College Fashion Team
+Online Script Writing,stephenraju03@gmail.com,S,Hyderabad,VNR VJIET,+919533567630,None
+Adrenaline Zone,saduruddinmohammed@gmail.com,S,Rajahmundry,Godavari Institute of Engineering and Technology,7842329545,None
+Short Film Making,stephenraju03@gmail.com,S,Hyderabad,VNR VJIET,+919533567630,None
+Dance Workshops,saduruddinmohammed@gmail.com,S,Rajahmundry,Godavari Institute of Engineering and Technology,7842329545,None
+Choreo Night,sruthipj95@gmail.com,s,chennai,women's christian college,8754477027,indian dance club
+Choreo Night,praveensrrm@gmail.com,D,CHENNAI,RKM VIVEKANANDA COLLEGE OF ARTS AND SCIENCE,7200267628,Point 2 Crew
+Group Dance,prilusu@gmail.com,P,CHENNAI,MOP VAISHNAV COLLEGE FOR WOMEN,+919578269001,None
+The Saarang Mob,anithachow86@gmail.com,A,vizag,gayatri vidya parishad,9866820825,None
+Onground Photography,anithachow86@gmail.com,A,vizag,gayatri vidya parishad,9866820825,None
+Lonewolf,kushal.k.kakkad@gmail.com,K,CHENNAI,IITMADRAS,+919176283980,None
+Panache,ahmed.rafath@yahoo.com,R,chennai,The New college,9962362990,The New college Fashion Team - NCFT
+Online Photography Contest,qwertyquiz93@gmail.com,M,Chennai,B.S.Abdur Rahman University.,9940996502,None
+Onground Photography,qwertyquiz93@gmail.com,M,Chennai,B.S.Abdur Rahman University.,9940996502,None
+Short Film Making,pranit1994@gmail.com,P,Vellore,VIT University,9597434328,None
+Mono Acting,keertandakarapu@gmail.com,k,chennai,VIT chennai,7401319904,None
+Mono Acting,syedshoeb22@yahoo.com,S,Hyderabad,BITS, Pilani Hyderabad Campus,8096753759,None
+Short Film Making,syedshoeb22@yahoo.com,S,Hyderabad,BITS, Pilani Hyderabad Campus,8096753759,None
+Short Film Making,archishlinaroy@yahoo.in,A,Vellore,VIT University,9635213113,None
+Short Film Making,thirunadinesh5@gmail.com,D,None,None,None,None
+Online Script Writing,e.gokularaja@gmail.com,G,ERODE,K.S.R.COLLEGE OF ENGINEERING,+918508614045,None
+Ad Making,swathikansmhss2012@gmail.com,S,CHENNAI,SKR ENGINEERING COLLEGE,9566104209,GANGSTAR
+Tarang,raynol025@gmail.com,R,Bangalore,BMSCE, Bangalore,+919731921459,Pineapple Express
+Unplugged,raynol025@gmail.com,R,Bangalore,BMSCE, Bangalore,+919731921459,Pineapple Express
+Online Photography Contest,hariprasad_hp@ymail.com,H,chennai,college of engineering ,guindy,9944973753,None
+Onground Photography,jananiluvsu@gmail.com,J,chennai,chettinad health and research institute,9445157888,None
+Short Film Making,jananiluvsu@gmail.com,J,chennai,chettinad health and research institute,9445157888,None
+Adrenaline Zone,yudhisthiraekalavya@gmail.com,P,CHENNAI,SRM UNIVERSITY,+919488452835,None
+Online Script Writing,yudhisthiraekalavya@gmail.com,P,CHENNAI,SRM UNIVERSITY,+919488452835,None
+Choreo Night,cadetmanus@gmail.com,c,Chennai,Anand Institute of higher technology,9677274486,stepsquad
+Onground Photography,yudhisthiraekalavya@gmail.com,P,CHENNAI,SRM UNIVERSITY,+919488452835,None
+Panache,shahul.deen7@gmail.com,S,Chennai,B.S. AbdurRahman University,8015711353,Crescent Fashion Team
+Adrenaline Zone,creativerebel1588@gmail.com,A,Coimbatore,Amrita School of Engineering,+918754707933,None
+Mono Acting,harini78star@gmail.com,H,chennai,madras school of social work,9962649496,None
+Online Photography Contest,visveshsg@yahoo.co.in,V,chennai,hindustan university,9789848910,None
+Ad Making,e.gokularaja@gmail.com,G,ERODE,K.S.R.COLLEGE OF ENGINEERING,+918508614045,GGM
+Ad Making,mariowaring08@gmail.com,M,KAKINADA,UCEK,JNTUK,9441526589,mario
+Online Photography Contest,priyadarshini1895@gmail.com,P,Chennai,Stella Maris,09444828811,None
+Dance Workshops,komaleshsp@gmail.com,k,Bangalore,Christ University,+919944954759,None
+Mono Acting,venkaj.9@gmail.com,V,HYDERABAD,BITS PILANI HYDERABAD,+91 7730859555,None
+Mono Acting,niveeram@gmail.com,N,coimbatore,SNS College of Engineering,9943319427,None
+Choreo Night,sahana.murthy1317@gmail.com,S,Bangalore,RVCE,9632102463,Footprints
+Online Script Writing,787aditi@gmail.com,A,Chennai,IIT Madras,9884112496,None
+DJukebox,shubhbarsaiyan@gmail.com,S,Chennai,IIT Madras,9003299034,None
+Lonewolf,hadinishad42@gmail.com,H,Vellore,VIT University,8124494431,None
+Online Photography Contest,,B,hyderabad,mallareddy institute of techonology and science,9030777336,None
+Short Film Making,meisjoe8@gmail.com,J,chennai,IIT Madras,9087863363,None
+Online Photography Contest,,M,Coimbatore,Coimbatore institute of Technology,9791416918,None
+Unplugged,raaghavhhh10@gmail.com,R,chennai,crescent (B.S.Abdur rahman university),9176941475,The Forte
+Young Reporter,charu.chauhan.8888@gmail.com,C,CHENNAI,IIT MADRAS,9789275090,Indi
+Tarang,raaghavhhh10@gmail.com,R,chennai,crescent (B.S.Abdur rahman university),9176941475,The Forte
+Powerchords,raaghavhhh10@gmail.com,R,chennai,crescent (B.S.Abdur rahman university),9176941475,The Forte
+Dramatics,preeti94p@gmail.com,P,Bangalore,R.V.C.E.,9686699838,Shards of a Life
+Solo Dance,ramyasimbha@gmail.com,r,chennai,rmk college of engineering and technology,9566284841,None
+Lonewolf,gkloghapriya@gmail.com,L,Madurai,SETHU INSTITUTE OF TECHNOLOGY,+918903171667,None
+Online Photography Contest,kadalai000@gmail.com,K,chennai,anna university,9500865298,None
+Online Script Writing,suriyaraghav95@gmail.com,S,Chennai,Mcc,+918939755654,None
+Online Script Writing,yheame@gmail.com,a,CHENNAI,CHETTINAD HEALTH AND RESERCH INSTITUTE,9445157888,None
+Mono Acting,yheame@gmail.com,a,CHENNAI,CHETTINAD HEALTH AND RESERCH INSTITUTE,9445157888,None
+Adrenaline Zone,yheame@gmail.com,a,CHENNAI,CHETTINAD HEALTH AND RESERCH INSTITUTE,9445157888,None
+Unplugged,,T,HOSUR,ADIYAMAAN COLLEGE OF ENGINEERING,9894687921,KOOTHU N KUMMALAM
+Choreo Night,rachitshetty007@gmail.com,R,Bangalore,R V College Of Enginnering,9821163891,Footprints
+Choreo Night,sahilsarva@yahoo.com,S,Bangalore,R.V College of Engineering,+919632135289,Footprints
+Choreo Night,sambhav.golechha@gmail.com,S,Bangalore,RVCE,8880064248,Footprints
+Choreo Night,ash9994@yahoo.co.in,A,Bnagalore,R. V. College of Engineering,+919986639321,Footprints
+Choreo Night,,V,Bangalore,RVCE,+919740427948,Footprints
+DJukebox,arpit.tca96@gmail.com,C,Bangalore,Christ University,+919742145580,None
+Powerchords,kapil94fender@gmail.com,K,New Delhi,PGDAV College,07838825689,Conundrum - Western Music Society of PGDAV College
+Onground Photography,soundaryajessie@gmail.com,S,CHENNAI,MOP VAISHNAV COLLEGE FOR WOMEN,9791284250,None
+Online Photography Contest,mukeshamaran@gmail.com,m,chennai,VIT VELLORE,+919790906668,None
+Onground Photography,mukeshamaran@gmail.com,m,chennai,VIT VELLORE,+919790906668,None
+Lonewolf,mukeshamaran@gmail.com,m,chennai,VIT VELLORE,+919790906668,None
+Adrenaline Zone,komaleshsp@gmail.com,k,Bangalore,Christ University,+919944954759,None
+Lonewolf,darrel3d@gmail.com,D,Mangalore,Alva's Institute Of Engineering And Technology,+919731572735,None
+Onground Photography,darrel3d@gmail.com,D,Mangalore,Alva's Institute Of Engineering And Technology,+919731572735,None
+Adrenaline Zone,darrel3d@gmail.com,D,Mangalore,Alva's Institute Of Engineering And Technology,+919731572735,None
+Mono Acting,adithyanchandrashekar@gmail.com,A,MANGLORE,ALVAS INSTITUTE OF ENGINERRING & TECHNOLOGY,+919961522192,None
+Onground Photography,damodar235@live.com,D,Eluru,Sir C R Reddy College Of Engineering,+919542225577,None
+Powerchords,asherin7@yahoo.co.in,A,Chennai,Anna University, College of Engineering, Guindy,9884112345,MK-Jam
+Choreo Night,pri_djblue@yahoo.com,P,Bangalore,R.V. College of Engineering,9535318476,Footprints
+Solo Dance,akshiarul94@gmail.com,A,None,None,None,None
+Short Film Making,sudeesandy@gmail.com,S,Mangalore,Alva's Institute of Engineering and Technology,9538537510,None
+Onground Photography,sudeesandy@gmail.com,S,Mangalore,Alva's Institute of Engineering and Technology,9538537510,None
+Tarang,gopal.shyam94@gmail.com,S,Bangalore,NITK Surathkal,+919035110845,The Jammuras
+Short Film Making,darrel3d@gmail.com,D,Mangalore,Alva's Institute Of Engineering And Technology,+919731572735,None
+Solo Dance,srevanthmanu@yahoo.com,R,chennai,sathyabama university,08374464816,None
+Mono Acting,gocoool786@gmail.com,M,madurai,VCET madurai,9994166165,None
+Ad Making,gocoool786@gmail.com,M,madurai,VCET madurai,9994166165,deadmenwalking
+Lonewolf,vishnu.s.bhat@gmail.com,V,Bangalore,dsce,9448971625,None
+Mono Acting,abishek.beckham@yahoo.com,A,CHENNAI,VIT UNIVERSITY,9551070732,None
+Powerchords,anirudh.bhaskaran@gmail.com,A,Thanjavur,SASTRA University,+919789819309,The Rubberband
+Online Photography Contest,deva9547@gmail.com,d,None,None,None,None
+Onground Photography,esaitamil4445@gmail.com,t,None,None,None,None
+Online Photography Contest,,P,None,None,None,None
+Lonewolf,shreyashk2006@gmail.com,S,Bangalore,RV College of Engineering,+917259826907,None
+Choreo Night,jenivasanthi@yahoo.co.in,J,chennai,women's Christian college,9791009534,Women's Christian college shift II
+Onground Photography,psruthik@gmail.com,S,Chennai,SRM University,9884668114,None
+Online Photography Contest,psruthik@gmail.com,S,Chennai,SRM University,9884668114,None
+Unplugged,csramli@hotmail.com,S,Chennai,IIIT D&M,9952948438,ETERNAL
+Lonewolf,olichamp@gmail.com,O,Mangalore,Alva's Institute of Engineering and Technology,+919035938375,None
+Instrumentals,nandy4cool@gmail.com,N,Chennai,SSNCE,9940094861,None
+Powerchords,ares_legend@ymail.com,A,Chennai,Sri Venkateshwara College Of Engineering,8754403782,The Acoustic Bastards
+Onground Photography,ndeepankarthik@gmail.com,D,Chennai,VIT University,+919566152212,None
+The Saarang Mob,ndeepankarthik@gmail.com,D,Chennai,VIT University,+919566152212,None
+The Saarang Mob,ndeepankarthik@gmail.com,D,Chennai,VIT University,+919566152212,None
+Unplugged,siddhant.kalmegh@gmail.com,s,pune,symbiosis arts and commerce college,8149775931,siddhant kalmegh project
+Powerchords,siddhant.kalmegh@gmail.com,s,pune,symbiosis arts and commerce college,8149775931,siddhant kalmegh project
+Decibels,siddhant.kalmegh@gmail.com,s,pune,symbiosis arts and commerce college,8149775931,siddhant kalmegh project
+Mono Acting,kaushikkannan1996@gmail.com,K,Chennai,Hindustan University,+919566134414,None
+Dance Workshops,shane.mathew95@gmail.com,S,Vellore,VIT vellore,9159086145,None
+Solo Dance,ae14b046@smail.iitm.ac.in,r,Chennai,IIT Madras,9790750217,None
+Ad Making,zenith.sanjayan@gmail.com,Z,TRIVANDRUM,SCTCE Trivandrum,9495644771,SCTCE
+Lonewolf,karnan.sethupathi@gmail.com,S,Bangalore,RVCE,9482554251,None
+Online Photography Contest,zenith.sanjayan@gmail.com,Z,TRIVANDRUM,SCTCE Trivandrum,9495644771,None
+Dance Workshops,vy.vaniyadav@gmail.com,V,Chennai,IIT Madras,+919790470107,None
+Adrenaline Zone,vy.vaniyadav@gmail.com,V,Chennai,IIT Madras,+919790470107,None
+Online Photography Contest,sindhurocks93@yahoo.co.in,S,Bangalore,R. V. College of Engineering,+919591228048,None
+Online Photography Contest,sindhurocks93@yahoo.co.in,S,Bangalore,R. V. College of Engineering,+919591228048,None
+Onground Photography,sindhurocks93@yahoo.co.in,S,Bangalore,R. V. College of Engineering,+919591228048,None
+Onground Photography,vy.vaniyadav@gmail.com,V,Chennai,IIT Madras,+919790470107,None
+DJukebox,cm.cmpunk.punk@gmail.com,S,None,None,None,None
+Online Script Writing,srikarmvs94@gmail.com,S,Visakhapatnam,GITAM University,8790447166,None
+Online Script Writing,srikarrss94@yahoo.com,S,Visakhapatnam,GITAM,9494051954,None
+Lonewolf,rags.cena8@gmail.com,R,Bengaluru,R V College of Engineering,+917760193390,None
+Dance Workshops,swethaganesh3994@gmail.com,S,chennai,Prathyusha Institute of Technology and Management,9500037016,None
+Young Reporter,vishwanthvignesh@gmail.com,V,chennai,velammal institute of technology,9551653438,tech sapiens
+Dance Workshops,kishankis@live.in,K,pondicherry,mahatma gandhi medical college n RI,9597104703,None
+Solo Dance,kishankis@live.in,K,pondicherry,mahatma gandhi medical college n RI,9597104703,None
+Online Script Writing,harsharocks.harsha@gmail.com,S,Visakhapatnam,Raghu engineering college,8885698878,None
+Group Dance,sinifun123@gmail.com,s,chennai,School of excellence in law,9444295658,None
+Dance Workshops,lalitha.poluri93@gmail.com,L,bangalore,pesit,9482849083,None
+Dramatics,pranny.95@gmail.com,P,Chennai,Stella Maris College,+919789988291,Stella Players
+Tarang,prithvi10394@gmail.com,P,Chennai,SSN College of Engineering,+919841010394,120 Decibels
+Unplugged,prithvi10394@gmail.com,P,Chennai,SSN College of Engineering,+919841010394,120 Decibels (Acoustic)
+Mono Acting,bharath.4.12.94@gmail.com,B,BANGALORE,BMSCE,9449610538,None
+Powerchords,maxierokkxx@gmail.com,A,Coimbatore,Karunya University,+918903274281,The Second Chance
+Instrumentals,sai.darshan2009@gmail.com,S,chennai,Rajalakshmi Engineering College,+919841105327,None
+Lonewolf,vikram1996@gmail.com,v,Bangalore,RVCE,+917259734280,None
+Dance Workshops,bharat.rahuldhev@gmail.com,B,Bangalore,RVCE,+919886002266,None
+Decibels,b4got1018@gmail.com,B,Chennai,Satyabama University,9790079163,Manufacturing Defects
+Powerchords,aboveanguish@gmail.com,A,kochi,adi shankara,+919567102034,above anguish
+Powerchords,varunsiva@ymail.com,V,Mangalore,NITK Surathkal,9620830765,Mount & Do
+Tarang,saikrishnatvt@gmail.com,S,CHENNAI,RAJALAKSHMI ENGINEERING COLLEGE,9500111971,Unison
+Unplugged,varunsiva@ymail.com,V,Mangalore,NITK Surathkal,9620830765,Mount & Do
+Online Photography Contest,ushakabilan54@gmail.com,U,chennai,SRM University,09952910556,None
+Lonewolf,schandu1729@gmail.com,S,CHENNAI,SRM UNIVERSITY,+919840957096,None
+Unplugged,saikrishnatvt@gmail.com,S,CHENNAI,RAJALAKSHMI ENGINEERING COLLEGE,9500111971,Unison
+Powerchords,b4got1018@gmail.com,B,Chennai,Satyabama University,9790079163,Manufacturing Defects
+Instrumentals,drummerbishwanth@gmail.com,b,chennai,sri sivasubramaniya nadar college,9940455815,None
+Powerchords,drummerbishwanth@gmail.com,b,chennai,sri sivasubramaniya nadar college,9940455815,BURIED REMNANTS
+Decibels,drummerbishwanth@gmail.com,b,chennai,sri sivasubramaniya nadar college,9940455815,BURIED REMNANTS
+Powerchords,ranjaniramadoss@yahoo.in,R,Chennai,PSBBSSS,9445076070,All The Idlies
+Mono Acting,,A,Chennai,Sriram Engineering College- chennai,+919786083522,None
+Onground Photography,nigam.divyansh00@gmail.com,D,Bangalore,Christ University,9634089173,None
+Powerchords,anishgupta19495@gmail.com,A,Vellore,VIT Vellore,9789728330,Illusion
+Online Photography Contest,bhayalh@gmail.com,H,Bangalore,Christ University,+919686533240,None
+Online Photography Contest,georginagalstaun@gmail.com,g,Bengaluru,Christ University, Bengaluru,7022374387,None
+Powerchords,aneesh_thunga@yahoo.co.in,A,Chennai,Easwari Engineering College,9962836198,Beyond Blood
+Ad Making,pssbhargav@gmail.com,B,Chennai,IIT Madras,9003113816,pss
+Mono Acting,sbarjun70@gmail.com,A,Chennai,SOEL,+919444393725,None
+Tarang,abhi_footballfreak@yahoo.co.in,A,Mangalore,NITK Surathkal,8971825088,Thillana
+Short Film Making,carthick980@gmail.com,k,chennai,THE NEWCOLLEGE,918056207623,None
+Powerchords,abhi_footballfreak@yahoo.co.in,A,Mangalore,NITK Surathkal,8971825088,PizzaPlanet
+Tarang,abinav.rsunder@gmail.com,A,Chennai,SSNCE,9445418506,Enigma
+Lonewolf,aadithya1996@gmail.com,a,chennai,sri venkateswara college of engineering,9176091690,None
+Mono Acting,aadithya1996@gmail.com,a,chennai,sri venkateswara college of engineering,9176091690,None
+Choreo Night,piyushgpt135@gmail.com,P,Chennai,Vellore Institute Of Technology, Chennai Campus,9362229525,Xemius Crew
+Choreo Night,shreeshthegreat@gmail.com,S,Chennai,VIT Chennai,+918124092109,Black Pearl
+Mono Acting,alfredajayaureate@gmail.com,A,Chennai,IIT Madras,9600561403,None
+Online Script Writing,alfredajayaureate@gmail.com,A,Chennai,IIT Madras,9600561403,None
+Adrenaline Zone,alfredajayaureate@gmail.com,A,Chennai,IIT Madras,9600561403,None
+Choreo Night,presentarroche@gmail.com,P,Chennai,Women's Christian College,8056039834,Women's Christian College (Morning shift).
+Short Film Making,pradeep17700@gmail.com,P,chennai,SSN College of Engineering,9600622820,None
+Online Script Writing,kayezdee.93@gmail.com,D,Chennai,SRM Valliammai Engineering College,+919445812857,None
+Solo Dance,me.impulse@yahoo.com,N,Chennai,SRM Engineering College,9962646940,None
+Solo Dance,shreyakallingal@gmail.com,S,Chennai,School of Excellence in Law,9487285293,None
+Mono Acting,shreyakallingal@gmail.com,S,Chennai,School of Excellence in Law,9487285293,None
+Unplugged,abhi_footballfreak@yahoo.co.in,A,Mangalore,NITK Surathkal,8971825088,Danger Zone
+Powerchords,rohanxavier567@gmail.com,r,chennai,Madras Christian College,9791993224,FATAL CONSPIRACY
+Decibels,rohanxavier567@gmail.com,r,chennai,Madras Christian College,9791993224,FATAL CONSPIRACY
+Powerchords,tusharmathur737@gmail.com,T,Coimbatore,Amrita college,+91 9894640735,Rock Paper Scissors
+Choreo Night,haroonalkamil080@gmail.com,A,Trivandrum,Mohandas College of Engineering and Technology,+919745698335,MCET FULL THROTTLE
+Online Script Writing,aishwaryassr@gmail.com,A,Chennai,SSN COLLEGE OF ENGINEERING,8939590271,None
+Dramatics,shovingrocks@gmail.com,P,Chennai,Dr. M.G.R. ERI University,7299434437,The Broadway Delusion
+Dance Workshops,kadalai000@gmail.com,K,chennai,anna university,9500865298,None
+Dance Workshops,praneetha.varigonda@gmail.com,P,hyderabad,atri,919666357370,None
+Adrenaline Zone,kamal.haz@gmail.com,K,Chennai,Loyola college,918939270181,None
+Short Film Making,kamal.haz@gmail.com,K,Chennai,Loyola college,918939270181,None
+Solo Dance,sowrabigopi@gmail.com,S,Bangalore,Christ University,9740067129,None
+Short Film Making,messymanish@gmail.com,M,Chennai,SRM University,7871914866,None
+Online Script Writing,praalluri1994@live.com,P,eluru,sir c.r reddy college of engineering,8985599131,None
+Unplugged,vinayshankar93@gmail.com,M,Hyderabad,VNRVJIET,+919030266993,CRESCENDO
+Raagapella,vinayshankar93@gmail.com,M,Hyderabad,VNRVJIET,+919030266993,None
+Instrumentals,shyamleo247@gmail.com,S,Chennai,Sri Venkateswara College of Engineering,+919940014046,None
+Instrumentals,kishore.ramesh59@gmail.com,K,Chennai,The Hindu Senior Secondary School, Indira Nagar,+918939551702,None
+Powerchords,pranavam11511@gmail.com,A,Kerala,National College, Manacaud,9400566231,Dark Prophecy
+Short Film Making,vaibhav.mdev26@gmail.com,V,mangalore,NITK Surathkal,9980737549,None
+Lonewolf,deepikachandrasekar@yahoo.in,D,Chennai,R.M.D Engineering College,7299674937,None
+Tarang,shyamleo247@gmail.com,S,Chennai,Sri Venkateswara College of Engineering,+919940014046,Amalgam
+Raagapella,kirthikaram26@gmail.com,K,coimbatore,sns college of technology,9600994198,None
+Tarang,kirthikaram26@gmail.com,K,coimbatore,sns college of technology,9600994198,McVibes
+Dance Workshops,ashikadhnnjy@gmail.com,a,Bangalore,Christ University,9844069101,None
+The Saarang Mob,ashikadhnnjy@gmail.com,a,Bangalore,Christ University,9844069101,None
+Scrabble,ashikadhnnjy@gmail.com,a,Bangalore,Christ University,9844069101,Suvi
+Raagapella,adityasreeramch@gmail.com,A,Chennai,KM College Of Music and Technology,9494464403,None
+Lonewolf,suriyaraghav95@gmail.com,S,Chennai,Mcc,+918939755654,None
+Tarang,adhithya.bala@gmail.com,A,Thanjavur,SASTRA University,9500482868,Pitch Blend
+Short Film Making,saiprasad1122@gmail.com,S,Thanjavur,SASTRA University,9489527170,None
+Dance Workshops,rashmirythm7@gmail.com,R,Bangalore,Christ University,9739650443,None
+Powerchords,rohan88pathak@gmail.com,R,Bhopal,Oriental College of Technology,7748001642,FlyAsh
+Powerchords,anantvignes@yahoo.in,A,Chennai,PSBB KK Nagar,+91 9884451503,Deaf Note
+Tarang,swarnavarockz@gmail.com,S,Kolkata,Institute of Engineering and Management,7059400945,Riyaz
+Mono Acting,vedant.agrawal13@gmail.com,V,Chennai,IIT Madras,9884299316,None
+Powerchords,rakesh_199310@yahoo.com,R,hyderabad,vasavi college of engineering,8801525552,9 days
+Tarang,sayhey2harsha@gmail.com,H,Coimbatore,PSG Institute of Advanced Studies,7708381568,The Big Band Theory
+Tarang,raaghav_electricguitar@yahoo.co.in,R,None,None,None,HYPNOTICA
+Choreo Night,sindhuvictoria@gmail.com,f,CHENNAI,womens christian college,9789130647,FUSION DANCE CLUB -WCC
+Tarang,thami.mandy@hotmail.com,M,pune,symbiosis college of arts and commerce,7276551585,Stotra
+Powerchords,nandagopal.srinivasan.22@gmail.com,N,Chennai,SSN College Of Engineering,+919840890284,Binary Dogs
+Raagapella,ideaofjustice11@gmail.com,N,Chennai,WCC,9566188892,None
+Powerchords,akshaybharadhwaj420@gmail.com,A,Chennai,P.S.Senior Secondary School,9444832462,Paradimensions
+Lonewolf,gurudatta.ar@gmail.com,G,Bengaluru,PESIT,08105512634,None
+Powerchords,vishihari@hotmail.com,V,Tiruchirapalli,NIT Trichy,+919626049006,Waterlemons
+Choreo Night,rahil_fr_gals@yahoo.com,S,hyderabad,vnr vjiet,9642642420,Livewire
+Dance Workshops,sj_bharath@live.in,S,chennai,SRM Kattankalathur,9500062764,None
+Powerchords,augustinrock007@gmail.com,A,chennai,SRM University,9884017629,circus singularity
+Online Script Writing,summi.felix@gmail.com,S,Chennai,B S Abdur Rahman Univeristy(Crescent),8807395551,None
+Short Film Making,ms.badboy.ashwin@gmail.com,A,chennai,ssn,9840712819,None
+Online Script Writing,ms.badboy.ashwin@gmail.com,A,chennai,ssn,9840712819,None
+Choreo Night,shannu.damarla@gmail.com,s,chennai,IIT Madras,9962670804,IIT Madras
+Powerchords,zenkenkey@yahoo.co.in,J,Cerulean City,IIT Madras,9876543210,TeamRocket
+Online Script Writing,prashanth240k@gmail.com,P,Madurai,NIT Trichy,9444741389,None
+Short Film Making,deepudon3385@gmail.com,D,Bengaluru,RV College of engineering , Bengaluru,+919008887266,None
+Short Film Making,deepudon3385@gmail.com,D,Bengaluru,RV College of engineering , Bengaluru,+919008887266,None
+Short Film Making,deepudon3385@gmail.com,D,Bengaluru,RV College of engineering , Bengaluru,+919008887266,None
+Tarang,ashwath1993.mani@gmail.com,A,Mangalore,NITK,09740251489,Thillana
+Group Dance,satishswat07@gmail.com,s,chennai,guru nanak college,9840824798,None
+Mono Acting,urmilesh.p@ifmr.ac.in,U,Sri City,IFMR,7874569906,None
+Choreo Night,vadhana.bhaskar@gmail.com,V,Chennai,School of Excellence in Law,+919791121793,The Justice League
+Short Film Making,muthu.07.msd@gmail.com,m,TUTICORIN,vv college of engineering,7418292640,None
+Online Script Writing,dhanushgowda95rock@gmail.com,D,mandya,pesce,9164689476,None
+Lonewolf,aneesh.bharadwaj7@gmail.com,A,Bengaluru,RV College of Engineering,9481327206,None
+Tarang,vinayshankar93@gmail.com,M,Hyderabad,VNRVJIET,+919030266993,CRESCENDO
+Choreo Night,abhi.likicool@gmail.com,A,mandya,pes college of engieering,9591056031,PES COLLEGE OF ENGINEERING
+Scrabble,ananya.santasri@gmail.com,A,Chennai,Sathyabama University,7200010393,Spellbound!
+Group Dance,bhuvanagiriakhil@gmail.com,b,guntur,vignanuniversity,9603437893,None
+Lonewolf,bhuvanagiriakhil@gmail.com,b,guntur,vignanuniversity,9603437893,None
+Choreo Night,ssooraj95@gmail.com,S,Bangalore,Christ University,09632095023,Dhritaaksh
+Group Dance,ssooraj95@gmail.com,S,Bangalore,Christ University,09632095023,None
+Solo Dance,ssooraj95@gmail.com,S,Bangalore,Christ University,09632095023,None
+Short Film Making,filmedbyguru@gmail.com,G,chennai,MGR Government and Television Institute,+918148477273,None
+Unplugged,kiran.bonjovi@gmail.com,K,Coimbatore,Kumaraguru College of Technology,9048851600,Dhwani
+Short Film Making,parthikannan91@gmail.com,P,Coimbatore,PSG Institute of Management,+919629703690,None
+Adrenaline Zone,tanu1996@gmail.com,T,Chennai,IIT Madras,9790465021,None
+Tarang,tanmay.kapse@gmail.com,T,NASIK,KVN NAIK ENGG COLLEGE,7058713875,"EHSAAS" THE FEEL OF LOVE
+Unplugged,tanmay.kapse@gmail.com,T,NASIK,KVN NAIK ENGG COLLEGE,7058713875,"EHSAAS" THE FEEL OF LOVE
+Dramatics,pallavi.ramanujam@gmail.com,P,Chennai,SSN College Of Engineering,9840042195,Lights Out Please
+Short Film Making,sendmailforsathish@gmail.com,S,COIMBATORE,GCT COIMBATORE,+919677554008,None
+Short Film Making,sendmailforsathish@gmail.com,S,COIMBATORE,GCT COIMBATORE,+919677554008,None
+Instrumentals,sendmailforsathish@gmail.com,S,COIMBATORE,GCT COIMBATORE,+919677554008,None
+Online Script Writing,sendmailforsathish@gmail.com,S,COIMBATORE,GCT COIMBATORE,+919677554008,None
+Choreo Night,aswinjegan95@gmail.com,A,Trivandrum,College Of Engineering, Trivandrum,+919567763810,WTFz - Watch The FreakZ
+Choreo Night,sreekanthpadmakumar@gmail.com,S,Trivandrum,College Of Engineering, Trivandrum,9048801056,WTFz - Watch The FreakZ
+Powerchords,harishramu097@gmail.com,H,Chennai,PSBB,9940544335,Deaf Note
+Panache,sbkfbid@gmail.com,B,Chennai,SRM University,7200013453,B Team
+Online Script Writing,sbkfbid@gmail.com,B,Chennai,SRM University,7200013453,None
+Solo Dance,akshitha1712@gmail.com,A,None,None,None,None
+Group Dance,venkkrish95@gmail.com,v,chennai,ssn college of engineering,8056287275,None
+Group Dance,super.vijar@gmail.com,r,chennai,ssn college of engineering,9884520247,None
+Online Script Writing,ashishvirar@yahoo.co.in,A,Mangalore,Alva's Institute of Engineering and Technology,+919902356608,None
+Choreo Night,arjunpotter@yahoo.co.in,A,Trivandrum,CET, Trivandrum,9567072988,WTFz - Watch The FreakZ
+Choreo Night,suryaundersquad@gmail.com,s,chennai,anna university,9698652059,solomon twisters
+Choreo Night,rdbharathyo@gmail.com,B,CHENNAI,SSN College Of Engineering,9952949219,SSN-N2K
+Short Film Making,blackmate07@gmail.com,A,chennai,SRM UNIVERSITY,+918122050070,None
+Short Film Making,lobosushanth8@gmail.com,S,Mangalore,Alvas Institute of Engineering and Technology,8971250414,None
+Choreo Night,viquar52@gmail.com,V,HYDERABAD,VNR VJIET,9502899669,live wire
+Choreo Night,vsk.sujith@gmail.com,S,chennai,anna university,8056562511,anna university(solomon twisters)
+Mono Acting,axhay93@hotmail.com,A,Chennai,Madras Christian College,+919003164340,None
+Dramatics,syedshoeb22@yahoo.com,S,Hyderabad,BITS, Pilani Hyderabad Campus,8096753759,Dramatics@BITS-Hyderabad
+Scrabble,ashishvirar@yahoo.co.in,A,Mangalore,Alva's Institute of Engineering and Technology,+919902356608,Chakravyuh_AIET
+Ad Making,ashishvirar@yahoo.co.in,A,Mangalore,Alva's Institute of Engineering and Technology,+919902356608,Chakravyuh_AIET
+Choreo Night,chand_candy@hotmail.com,C,chennai,M.O.P Vaishnav College for Women,9600082032,MOP Vaishnav College for Women
+DJukebox,mhari95@gmail.com,H,chennai,LOYOLA COLLEGE,+919600252327,None
+Tarang,shandoshanty@hotmail.com,S,Bangalore,Christ University,+918105277453,Abhoga
+Choreo Night,dhanushgowda95rock@gmail.com,d,karnataka,pes college of engineering,9164689476,pesceman
+The Saarang Mob,rachitjainswm@gmail.com,r,Bangalore,Christ University,9632396735,None
+Short Film Making,vinayak.prakash@ymail.com,V,Chennai,L.V.Prasad Film and TV Academy,9884826305,None
+Young Reporter,asn.suri@gmail.com,A,Vellore,VIT Vellore,9790910940,ELA1
+Short Film Making,selvatnj@hotmail.com,s,thanjavur,sastra university,9524430016,None
+DJukebox,shanks_theboss@yahoo.co.in,S,chennai,AAT College,9042249790,None
+Lonewolf,pandimuruganias@gmail.com,p,Madurai,Thiagarajar college, Madurai-9,9698395661,None
+Lonewolf,pandimuruganias@gmail.com,p,Madurai,Thiagarajar college, Madurai-9,9698395661,None
+Lonewolf,pandimuruganias@gmail.com,p,Madurai,Thiagarajar college, Madurai-9,9698395661,None
+Choreo Night,jayahar.g@gmail.com,A,CHENNAI,VELS UNIVERSITY,8754583597,D positive
+Choreo Night,jayahar.g@gmail.com,A,CHENNAI,VELS UNIVERSITY,8754583597,D positive
+Dramatics,axhay93@hotmail.com,A,Chennai,Madras Christian College,+919003164340,Theatre No:59
+Dramatics,axhay93@hotmail.com,A,Chennai,Madras Christian College,+919003164340,Theatre No:59
+Short Film Making,freak.shirazkhan@gmail.com,S,Chennai,IIT MADRAS,9176393319,None
+Lonewolf,sayan.hawkeye@gmail.com,S,Vellore,VIT University,Vellore.,+919787124827,None
+Lonewolf,ani.ramjiwal@gmail.com,A,Vellore,VIT University,+9629341876,None
+Dramatics,karaan8@gmail.com,K,Chennai,SRM University,+919791081768,SRM University
+Solo Dance,sivasri1996@gmail.com,S,Chennai,SASTRA University Thanjavur,8056298459,None
+Solo Dance,sridhanyaharihar@gmail.com,S,Thanjavur,SASTRA University,9003954907,None
+Solo Dance,hemabalamurugan20@gmail.com,H,THANJAVUR,SASTRA UNIVERSITY,+919600664991,None
+Solo Dance,hemabalamurugan20@gmail.com,H,THANJAVUR,SASTRA UNIVERSITY,+919600664991,None
+Solo Dance,akhilabala1@gmail.com,A,Chennai,SASTRA University Thanjavur,9003226640,None
+Solo Dance,rdarshanaa@gmail.com,D,Chennai,Sastra University,9841347690,None
+Solo Dance,jmsastra@gmail.com,m,thanjavur,sastra university,9445097162,None
+Powerchords,manoj06ing@gmail.com,R,bangalore,christ universtiy,9739650443,rashmi
+Dramatics,shrutan_93@hotmail.com,S,chennai,anna university,9941010660,Theatron,ANna University
+Lonewolf,sonurohu@hotmail.com,R,MANGALORE,Alva's institute of Engineering and technology,8123227825,None
+Dance Workshops,manoj06ing@gmail.com,R,bangalore,christ universtiy,9739650443,None
+Online Script Writing,uma.g.201094@gmail.com,U,chennai,Women's Christian College, Chennai,9043376305,None
+Dance Workshops,maniragr@gmail.com,m,HYDERABAD,VNR VIGNAN JYOTHI INSTITUTE OF ENGG AND TECH,9908565607,None
+The Saarang Mob,maniragr@gmail.com,m,HYDERABAD,VNR VIGNAN JYOTHI INSTITUTE OF ENGG AND TECH,9908565607,None
+Adrenaline Zone,rashmirythm7@gmail.com,R,Bangalore,Christ University,9739650443,None
+Dramatics,uma.g.201094@gmail.com,U,chennai,Women's Christian College, Chennai,9043376305,Dramaticaally Correct
+Instrumentals,nkascool@yahoo.com,S,Chennai,SRM University Kattankulathur,9176817877,None
+Tarang,amrbasil1112@gmail.com,A,Chennai,LICET,9500058870,F.T.B.
+Dramatics,gauravkhemka94@gmail.com,G,Chennai,Loyola College,9789831347,Loyola Club of Performing Arts
+Choreo Night,saishivarocks@gmail.com,S,Chennai,Rajalakshmi Engineering College,+918525058605,S.E.A Crew
+Tarang,yaminijkumar@gmail.com,y,Bangalore,Mount Carmel,7829444533,Taaranga
+Dramatics,ashwinmathew24@gmail.com,A,Manipal,Manipal Institute of Technology,+919886464497,Aaina Dramatics
+Choreo Night,venkateshkrishna997@gmail.com,v,chennai,easwari engineering college,+919894722123,killa kripz
+Panache,a7nair@live.com,A,chennai,Hindustan University,+919789371137,hindustan univ
+Choreo Night,theerthana@gmail.com,T,Chennai,EASWARI ENGINEERING COLLEGE,+919840069901,killa kripz
+DJukebox,aksansh007@gmail.com,A,CHENNAI,SRM UNIVERSITY,+919962942184,None
+Solo Dance,theindianpower@gmail.com,N,Thanjavur,SASTRA University Thanjavur,9626071440,None
+Choreo Night,pravinpranesh93@gmail.com,P,Chennai,Madras Institute of Technology,9443392106,MYT BLACK CREW
+Ad Making,sriavinashkumar@gmail.com,A,Chennai,Rajalakshmi Institute of Technology,9884918994,Battlers
+Young Reporter,sriavinashkumar@gmail.com,A,Chennai,Rajalakshmi Institute of Technology,9884918994,Battlers
+Lonewolf,sriavinashkumar@gmail.com,A,Chennai,Rajalakshmi Institute of Technology,9884918994,None
+Dramatics,dangerousvt@gmail.com,V,Chennai,Dr. M.G.R. University,9884911803,The Broadway Delusion
+Lonewolf,shubham2vineet@gmail.com,V,Chennai,SRM University,8015908225,None
+Group Dance,hila_sunshine@yahoo.co.in,A,Chennai,SRM University,9176553876,None
+Group Dance,,M,Chennai,SSN,9791041094,None
+Choreo Night,shamaxf.f@gmail.com,S,Chennai,Hindustan University Padur,+919710482203,Hindustan University
+Unplugged,abinav.rsunder@gmail.com,A,Chennai,SSNCE,9445418506,Enigma
+Short Film Making,billgatessri@gmail.com,S,CHENNAI,SRR ENGINEERING COLLEGE,9445184606,None
+Online Script Writing,demonkrithin@gmail.com,K,Coimbatore,Coimbatore Institute of Technology,8760113727,None
+Dramatics,ameethkumar123@gmail.com,A,chennai,Dr.MGR Educational research institute,9566049391,The Broadway Delusion
+Dramatics,rapveriyan@gmail.com,P,chennai,Dr. M.G.R University,8124193378,The Broadway Delusion
+Dramatics,rapveriyan@gmail.com,P,chennai,Dr. M.G.R University,8124193378,The Broadway Delusion
+Dramatics,rapveriyan@gmail.com,P,chennai,Dr. M.G.R University,8124193378,The Broadway Delusion
+Dramatics,rapveriyan@gmail.com,P,chennai,Dr. M.G.R University,8124193378,The Broadway Delusion
+Choreo Night,venkateshb.1993@gmail.com,V,chennai,St.Josephs college of engineering,9551363360,RAIDERZ CREW
+Dramatics,drishika.vm@gmail.com,D,Bangalore,RV College of Engineering,+919632922977,Shards of a Life
+Lonewolf,gsubing@gmail.com,S,Calicut,NIT Calicut,8547845982,None
+Choreo Night,nipunnathic@gmail.com,N,Trivandrum,College Of Engineering, Trivandrum,+919496338701,WTFz - Watch The FreakZ
+Dramatics,srujana95@gmail.com,S,Hyderabad,BITS Pilani Hyderabad Campus,+919705523194,Dramatics
+Lonewolf,srujana95@gmail.com,S,Hyderabad,BITS Pilani Hyderabad Campus,+919705523194,None
+Scrabble,srujana95@gmail.com,S,Hyderabad,BITS Pilani Hyderabad Campus,+919705523194,BITS
+Tarang,ssbrock@gmail.com,S,Chennai,College Of Engineering, Guindy,9566099872,Sruthilaya
+Unplugged,ssbrock@gmail.com,S,Chennai,College Of Engineering, Guindy,9566099872,Sruthilaya
+Choreo Night,chillout.haja@gmail.com,H,chennai,sathyabama university,9840187129,sathyabama (puppeteers)
+Online Script Writing,sriavinashkumar@gmail.com,A,Chennai,Rajalakshmi Institute of Technology,9884918994,None
+Young Reporter,srujana95@gmail.com,S,Hyderabad,BITS Pilani Hyderabad Campus,+919705523194,ELAS
+Lonewolf,komalagrawal033@gmail.com,K,Hyderabad,BITS Pilani Hyderabad Campus,+917729987363,None
+Short Film Making,psruthik@gmail.com,S,Chennai,SRM University,9884668114,None
+Unplugged,ashwath1993.mani@gmail.com,A,Mangalore,NITK,09740251489,Taut Strings On The Loose
+Dramatics,ruchijain241295@gmail.com,R,chennai,Dr.MGR Educational and research institute,8056034477,The Broadway Delusion
+Dramatics,naveenrokz33@gmail.com,N,chennai,Dr.MGR Educational and research institute,9444353167,The Broadway Delusion
+Instrumentals,adit.ravi@gmail.com,A,Chennai,IIT Madras,9962609436,None
+Unplugged,adit.ravi@gmail.com,A,Chennai,IIT Madras,9962609436,Outside the Bucks
+Lonewolf,aniishbuju@yahoo.in,A,chennai,tagore engineering college,9080320351,None
+Solo Dance,ashwinkrishnanpc@gmail.com,A,Chennai,SRM,9176274146,None
+Short Film Making,kirubha.trichy@gmail.com,K,chennai,Asian college of journalsim,9843935588,None
+Online Script Writing,navrojrulz93@gmail.com,n,Thanjavur,SASTRA University,+919789658508,None
+Online Script Writing,sandhyav317@gmail.com,S,Bangalore,SASTRA University,8754685548,None
+Online Script Writing,santosh.venk@gmail.com,S,Thanjavur,SASTRA University,919444431801,None
+Online Script Writing,sandhya.ganesh94@gmail.com,S,Thanjavur,Sastra University,8754028906,None
+Lonewolf,yash_youngistaan@yahoo.in,Y,Vellore,VIT University,9943333895,None
+Lonewolf,suryashekhar.chakraborty2014@vit.ac.in,S,Vellore,VIT University,9944534349,None
+Solo Dance,sravanti9.gutti@gmail.com,G,Chennai,SRM University,8870319793,None
+Dramatics,narmadha.28@gmail.com,N,Chennai,Ethiraj College for Women,+919840272045,Teatro
+Choreo Night,nivashhero.hero@gmail.com,n,chennai,DG Vaishnav,9840972919,DG Vaishnav (OPM)
+Solo Dance,nivashhero.hero@gmail.com,n,chennai,DG Vaishnav,9840972919,None
+Group Dance,inklifepoet@gmail.com,V,Chennai,SRM University,9790747918,None
+Decibels,drufus.simon@gmail.com,D,Hyderabad,vasavi engg college,9676136756,REVIVAL
+Online Script Writing,anukeerthanaece12@gmail.com,A,chennai,Rajalakshmi Institute of Technology,7299954639,None
+Lonewolf,rakesh.hyd1725@gmail.com,R,Hyderabad,BITS PILANI HYDERABAD CAMPUS,8499819812,None
+Powerchords,saxdude4u@gmail.com,S,Chennai,Loyola,7299981767,Allies and Axis
+Online Script Writing,kishore8326@gmail.com,K,Coimbatore,PSG COLLEGE OF ARTS AND SCIENCE,9003703519,None
+Ad Making,kishore8326@gmail.com,K,Coimbatore,PSG COLLEGE OF ARTS AND SCIENCE,9003703519,I , Me and Myself .
+Tarang,barselan94@gmail.com,B,chennai,music college,9444167559,MUSIC PATROL
+Unplugged,barselan94@gmail.com,B,chennai,music college,9444167559,MUSIC PATROL
+Unplugged,beatsofthari@gmail.com,H,chennai,music college,9884258102,MUSIC PATROL
+Tarang,ckrishna953@gmail.com,C,chennai,music college,9710009174,MUSIC PATROL
+Unplugged,buzzaravind94@gmail.com,G,chennai,Music college,8015772102,MUSIC PATROL
+Tarang,buzzaravind94@gmail.com,G,chennai,Music college,8015772102,MUSIC PATROL
+Tarang,beatsofthari@gmail.com,H,chennai,music college,9884258102,MUSIC PATROL
+Unplugged,pilotgb30@gmail.com,B,CHENNAI,TAMILNADU MUSIC COLLEGE,9940436175,MUSIC PATROL
+Tarang,pilotgb30@gmail.com,B,CHENNAI,TAMILNADU MUSIC COLLEGE,9940436175,MUSIC PATROL
+Panache,sonasush@gmail.com,S,chennai,Ethiraj College for Women,+919791046842,Ethiraj College for Women
+Panache,gaanam.nair7@gmail.com,G,Chennai,Ethiraj College For Women,8939169303,Ethiraj College For Woman
+Panache,nehamunoth95@gmail.com,N,chennai,Ethiraj college for women,8807857658,Ethiraj College For Woman
+Panache,sweetnisyedi@yahoo.com,N,chennai,ethiraj college for woman,9600050369,ethiraj
+Panache,simonisahoo@gmail.com,S,chennai,ethiraj college for woman,9600899730,ethiraj college for woman arts
+Panache,shagufta.asif96@gmail.com,S,chennai,ethiraj college for women,9751782934,ethiraj sallai
+Dance Workshops,,S,Mumbai,BITS Pilani Hyderabad Campus,8497948430,None
+Tarang,krish730530@gmail.com,k,chennai,sakthi engineering college,9003386767,mike settu
+Unplugged,krish730530@gmail.com,k,chennai,sakthi engineering college,9003386767,mike settu
+Solo Dance,vvn.sriharshitha2896@gmail.com,S,None,None,None,None
+Solo Dance,emailuthra@gmail.com,u,chennai,mop vaishnav college for women,9790925096,None
+Panache,vadhana.bhaskar@gmail.com,V,Chennai,School of Excellence in Law,+919791121793,Statutory Squad
+Young Reporter,priswa1995@gmail.com,S,Chennai,SSN,9940691125,V4
+Raagapella,krishnasaimurthy@gmail.com,S,hyderabad,mgit,09966322674,None
+Lonewolf,krishnasaimurthy@gmail.com,S,hyderabad,mgit,09966322674,None
+Adrenaline Zone,icyalps@gmail.com,S,Chennai,SSN college of engineering,+919176971749,None
+Scrabble,gurudatta.ar@gmail.com,G,Bengaluru,PESIT,08105512634,Bengaluru boys
+Lonewolf,arjhun7204@gmail.com,A,chennai,velammal engineering college,9003183466,None
+Lonewolf,shyammohan11@gmail.com,S,Chennai,IIT Madras,+919791120601,None
+Ad Making,maniartattack@gmail.com,M,Chennai,Government College Of Fine Arts,919600749207,Fine Heart
+Adrenaline Zone,manivannan10594@gmail.com,m,Chennai,S.A Engineering College,8056223737,None
+Adrenaline Zone,dhileepkumarj@gmail.com,D,Chennai,S.A Engineering College,9551392985,None
+Lonewolf,nihal42harish@gmail.com,N,Bangalore,PESIT,9035480780,None
+Scrabble,gurudatta.ar@gmail.com,G,Bengaluru,PESIT,+918105512634,B2C
+$treet$,saishivarocks@gmail.com,S,Chennai,Rajalakshmi Engineering College,+918525058605,S.E.A Crew
+Lonewolf,sridharv2010@gmail.com,S,Chennai,Chennai Mathematical Institute,+917708287561,None
+Scrabble,ronmat1995@gmail.com,r,Bangalore,Christ University,+917760419976,Legacy
+Tarang,ragamusic.prasad@gmail.com,R,chennai,Tamil nadu Govt. Music College,7299498300,MUSIC PATROL
+Unplugged,ragamusic.prasad@gmail.com,R,chennai,Tamil nadu Govt. Music College,7299498300,MUSIC PATROL
+Short Film Making,raghav12.ramesh@gmail.com,R,Chennai,Mgr Govt Film and Television Institute,9790973863,None
+Solo Dance,ashwinisen93@yahoo.com,A,Chennai,Sri Venkateswara College Of Engineering,9445056385,None
+Dramatics,vaishnavi_94_29@hotmail.com,V,Bangalore,RVCE,BANGALORE,9880499544,Shards of a Life
+Choreo Night,ashwiniratnam22@gmail.com,A,Bangalore,R V College of Engineering,9663537429,Footprints
+Scrabble,supriyadevasahayam@gmail.com,S,CHENNAI,RMDEC,9094752021,Kryptonite
+Short Film Making,prabhahar_secret@yahoo.com,P,Chennai,University of Madras,9944433406,None
+Dance Workshops,prabhahar_secret@yahoo.com,P,Chennai,University of Madras,9944433406,None
+Raagapella,shachinsibi@yahoo.co.in,M,CHENNAI,SRI SAIRAM INSTITUTE OF TECHNOLOGY,+919003491593,None
+Scrabble,sankaran.kvan@gmail.com,S,Chennai,Anna University - BIT Campus, Tiruchirappalli,+919952925688,Suicide Squad
+Ad Making,sankaran.kvan@gmail.com,S,Chennai,Anna University - BIT Campus, Tiruchirappalli,+919952925688,Suicide Squad
diff --git a/files/data/blogs.xls b/files/data/blogs.xls
index 943aa29..96702d6 100644
Binary files a/files/data/blogs.xls and b/files/data/blogs.xls differ
diff --git a/files/data/blogs_all.xls b/files/data/blogs_all.xls
new file mode 100644
index 0000000..943aa29
Binary files /dev/null and b/files/data/blogs_all.xls differ
diff --git a/files/emails/confirm_accommodation.html b/files/emails/confirm_accommodation.html
new file mode 100644
index 0000000..0c2286a
--- /dev/null
+++ b/files/emails/confirm_accommodation.html
@@ -0,0 +1,7 @@
+
Hello,
+
Greetings from Saarang 2015.
+
Your request for accommodation at IIT Madras for Saarang 2015 has been confirmed. Team name: {{team.name}} Team leader: {{team.leader.user.get_full_name}} ({{team.leader.user.email}})
+
SAAR (Saarang Advance Accommodation Registration) confirmation letter can be now downloaded from the Accommodation Portal. Please take a printout of all the pages of SAAR and keep at the time of check in, along with xerox and original of your college identity card. Also, you need to submit a bonafide certificate from your college.
\ No newline at end of file
diff --git a/files/emails/confirm_accommodation.subject b/files/emails/confirm_accommodation.subject
new file mode 100644
index 0000000..d54fed0
--- /dev/null
+++ b/files/emails/confirm_accommodation.subject
@@ -0,0 +1 @@
+Accommodation request confirmed, Saarang 2015
\ No newline at end of file
diff --git a/files/emails/hospi_leader_added_member.html b/files/emails/hospi_leader_added_member.html
new file mode 100644
index 0000000..ac4385e
--- /dev/null
+++ b/files/emails/hospi_leader_added_member.html
@@ -0,0 +1,5 @@
+
Hello,
+
Greetings from Saarang 2015.
+
{{team.leader.user.get_full_name}} ({{team.leader.user.email}}) has added you to {% if team.leader.gender == 'male' %}his{% elif team.leader.gender == 'female' %}her{% endif %} team '{{team.name}}' for accommodation at IIT Madras during Saarang 2015. We will inform you when the request is confirmed.
+
Wishing you a happy Saarang,
+
Web Operations Team, Saarang 2015
\ No newline at end of file
diff --git a/files/emails/hospi_leader_added_member.subject b/files/emails/hospi_leader_added_member.subject
new file mode 100644
index 0000000..8e82c22
--- /dev/null
+++ b/files/emails/hospi_leader_added_member.subject
@@ -0,0 +1 @@
+Accommodation at Saarang 2015
\ No newline at end of file
diff --git a/files/emails/hospi_profile_incomplete.html b/files/emails/hospi_profile_incomplete.html
new file mode 100644
index 0000000..424f2b8
--- /dev/null
+++ b/files/emails/hospi_profile_incomplete.html
@@ -0,0 +1,5 @@
+
Hello,
+
Greetings from Saarang 2015.
+
{{team.leader.user.get_full_name}} ({{team.leader.user.email}}) has tried to add you to team '{{team.name}}' for accommodation at IIT Madras during Saarang 2015. But, since you have not completed your profile at Saarang Website, he/she could not add you. Please update your profile at Saarang Website and inform {{team.leader.user.get_full_name}} that you have completed the profile. We will inform you when the request is confirmed.
+
Wishing you a happy Saarang,
+
Web Operations Team, Saarang 2015
\ No newline at end of file
diff --git a/files/emails/hospi_profile_incomplete.subject b/files/emails/hospi_profile_incomplete.subject
new file mode 100644
index 0000000..2db71f1
--- /dev/null
+++ b/files/emails/hospi_profile_incomplete.subject
@@ -0,0 +1 @@
+Profile not complete. Accommodation, Saarang 2015
\ No newline at end of file
diff --git a/files/emails/hospitality_payment.html b/files/emails/hospitality_payment.html
new file mode 100644
index 0000000..86c0d0d
--- /dev/null
+++ b/files/emails/hospitality_payment.html
@@ -0,0 +1,2 @@
+
#NextBigBang
Hello,
Greetings from Saarang 2015.
Congratulations for getting accommodation at Saarang 2015. We have some important announcements regarding your stay at IIT Madras.
Mode of Payment for Accommodation:
1. Credit / Debit cards:
We accept payment using any of the cards though POS (Swipe) system which is installed at hospitality control rooms. You will have to report at the control room (boys and girls separately) for finishing the formalities.
You can also pay using demand draft drawn in the name of "IITM STUDENTS' ACTIVITIES TRUST - SAARANG", payable at "STATE BANK OF INDIA, IIT Madras".
This Demand draft can be of any bank i.e. you can get this DD from any bank which is convenient for you.
The amount can be found in your SAAR document which includes caution deposit. We will return this caution deposit to you in cash when you check out.
In case you want to make changes in the team resulting in change of the bill amount i.e. changes in team strength or no. of days of stay you can cancel the current request and request for a new team with the desired team strength and let us know the new and old team ID's by email to hospitality@saarang.org. Make a DD ready for that updated bill amount or you can also pay the updated amount through card when you come here.
diff --git a/files/emails/hospitality_payment.subject b/files/emails/hospitality_payment.subject
new file mode 100644
index 0000000..b5524ec
--- /dev/null
+++ b/files/emails/hospitality_payment.subject
@@ -0,0 +1 @@
+Saarang 2015 Accommodation - Payment process
\ No newline at end of file
diff --git a/files/emails/instructions.html b/files/emails/instructions.html
new file mode 100644
index 0000000..16bb3d0
--- /dev/null
+++ b/files/emails/instructions.html
@@ -0,0 +1,4 @@
+
#NextBigBang
Saarang 2015
Dear {{user.first_name}},
Hope you are getting ready for the Next Big Bang. You missed the first, don't miss the next one. Please find below a set of instructions you need to follow for a smooth experience here at Saarang, IIT Madras.
Saarang ID and personal details:
Mentioned below is your Saarang ID. Please verify them since these details will be mentioned on your certificates / further communication. If you require to edit your personal details or any of the information is missing and you need to add them, you could do so by clicking on your name at Saarang website after logging in.
Saarang ID: {{user.profile.saarang_id}}
Name: {{user.get_full_name}}
Email ID: {{user.email}}
Phone Number: {{user.profile.mobile_number}}
College: {{user.profile.college_text}}
Saarang ID Card:
Present this email to the QMS Registration Desk situated at Gajendra Circle (GC / Elephant circle) in IIT Madras. Upon verification with your College ID card, you will be handed over your Saarang ID Card.
The Saarang ID card is your ticket to Saarang! Each ID card is loaded with your unique barcode and enables you to quickly register for events and workshops without the need to fill up forms at any stage.
The registration fee for the entire Saarang experience is Rs. 150, which will provide you memorable experience with your ID card.
Please note that is necessary to have a ID card to participate in any event or workshop at Saarang.
The ID card is vital for us to keep track of the events you have participated in and provide you with participation certificates afterwards. So make sure you collect it as soon as you arrive at Saarang and keep it safe till the end!
Event Registrations:
If you have been selected by the Saarang team for a Pre-Registered Event or Pre-Registered Workshop through the website, then you can directly proceed to the event venue after the collection of your Saarang ID card from QMS Registration desk at GC.
Registrations for On-Spot Events and Workshops will take place at the corresponding event venues, on production of Saarang ID Card. They will be carried out on a first come first serve basis. The registration timings for each event will be made available at the same venue and hospitality desk. You will be required to produce your Saarang ID Card to register for any event or workshop.
Please note that there will be no registrations for any lecture in the Saarang lecture series. Entry will be provided on a first come first serve basis.
Accommodation:
For people whose accommodation was confirmed, detailed mails were sent by hospitality team explaining the payment procedure and documents to be brought.
You may also apply for on-spot accommodation at the control room. The boys control room is located at Godavari Hostel, IIT Madras and the Girls control room is located at Sharavati Hostel, IIT Madras. On-spot accommodation is provided on a first come first serve basis and has a very limited capacity. During check in, you would need to produce your College ID, and bonafide certificate.
We strictly do not accept cash for payments. The payment can be done by using any of the Credit/Debit Cards through POS systems installed at our control rooms. If you are not able to bring a card, you can get a Demand Draft here at State Bank of India, IIT Madras.
You may also arrange for accommodation outside the campus. A list of hotels and lodges in Chennai can be found here and here. Please note that the charges of the alternate accommodations outside IIT Madras mentioned in the file are subject to change. Please call the hotels and lodges on the numbers provided in the file to confirm room availability and room charges.
As per or revised policies, prize money for winners of events held as part of Saarang 2015 will be transferred though NEFT/RTGS only. Therefore, all participants are advised to get their account details, namely:
+
+
+
+
+
+
diff --git a/files/emails/ppm.subject b/files/emails/ppm.subject
new file mode 100644
index 0000000..83414bc
--- /dev/null
+++ b/files/emails/ppm.subject
@@ -0,0 +1 @@
+Important note about Prize Money, Saarang 2015
\ No newline at end of file
diff --git a/files/emails/registration.html b/files/emails/registration.html
new file mode 100644
index 0000000..dec9de0
--- /dev/null
+++ b/files/emails/registration.html
@@ -0,0 +1 @@
+
#NextBigBang
Dear {{user.first_name}},
Thank you for registering at Saarang 2015
Your Saarang ID is {{user.profile.saarang_id}}.
Please make a note of this ID as it will be required to register for events, accommodation etc. In any communication regarding Saarang with us, please include this ID also.
Do checkout the website for more information on Events, Professional Shows etc.
diff --git a/files/emails/registration.subject b/files/emails/registration.subject
new file mode 100644
index 0000000..798a317
--- /dev/null
+++ b/files/emails/registration.subject
@@ -0,0 +1 @@
+Welcome to Saarang 2015 - Registration Confirmation
\ No newline at end of file
diff --git a/files/emails/status_update.html b/files/emails/status_update.html
new file mode 100644
index 0000000..e983214
--- /dev/null
+++ b/files/emails/status_update.html
@@ -0,0 +1,9 @@
+
Hello,
+
Greetings from Saarang 2015.
+
Your request for accommodation at IIT Madras for Saarang 2015 has been {{ status }}.
+
Team name: {{team.name}}
+
Team leader: {{team.leader.user.get_full_name}} ({{team.leader.user.email}})
+
{{team.get_total_count}} members.
+
Wishing you a happy Saarang,
+
Web Operations Team,
+
Saarang 2015'
\ No newline at end of file
diff --git a/files/emails/status_update.subject b/files/emails/status_update.subject
new file mode 100644
index 0000000..cc8b1f4
--- /dev/null
+++ b/files/emails/status_update.subject
@@ -0,0 +1 @@
+Accommodation request {{status}}, Saarang 2015
\ No newline at end of file
diff --git a/files/emails/validation.html b/files/emails/validation.html
new file mode 100644
index 0000000..75a8026
--- /dev/null
+++ b/files/emails/validation.html
@@ -0,0 +1 @@
+
#NextBigBang
Dear {{user.first_name}},
Please validate your email at Saarang 2015
You have registered at Saarang website with the email id: {{user.email}}
Please click here or copy and paste the url given below to your address bar to verify your email and complete the registration process.
{{ field }}
+ {% if field.errors %}
+
+ {{ field.errors.as_text }}
+
+ {% endif %}
+
+
+ {% endfor %}
+ {% for field in roomform.hidden_fields %}
+ {{ field }}
+ {% endfor %}
+
+
+
+
\ No newline at end of file
diff --git a/files/templates/portals/hospi/add_team.html b/files/templates/portals/hospi/add_team.html
new file mode 100644
index 0000000..353ff47
--- /dev/null
+++ b/files/templates/portals/hospi/add_team.html
@@ -0,0 +1,33 @@
+
{{ field }}
+ {% if field.errors %}
+
+ {{ field.errors.as_text }}
+
+ {% endif %}
+
+
+
+ {% endfor %}
+ {% for field in form.hidden_fields %}
+ {{ field }}
+ {% endfor %}
+
+
+
\ No newline at end of file
diff --git a/files/templates/portals/hospi/check_in_females.html b/files/templates/portals/hospi/check_in_females.html
new file mode 100644
index 0000000..bf8407e
--- /dev/null
+++ b/files/templates/portals/hospi/check_in_females.html
@@ -0,0 +1,28 @@
+
Select rooms
+
+
+ {% csrf_token %}
+ {% for female in females %}
+
+ {{ female.user.get_full_name }}
+
+
+
+
+ {% endfor %}
+
+
+ Matresses
+
+
+
+
+
+
+
+
+
diff --git a/files/templates/portals/hospi/check_in_males.html b/files/templates/portals/hospi/check_in_males.html
new file mode 100644
index 0000000..abf0597
--- /dev/null
+++ b/files/templates/portals/hospi/check_in_males.html
@@ -0,0 +1,27 @@
+
Select rooms
+
+ {% csrf_token %}
+{% for male in males %}
+
+ {{ male.user.get_full_name }}
+
+
+
+
+{% endfor %}
+
+
+ Matresses
+
+
+
+
+
+
+
+
+
diff --git a/files/templates/portals/hospi/check_in_mixed.html b/files/templates/portals/hospi/check_in_mixed.html
new file mode 100644
index 0000000..fc746b2
--- /dev/null
+++ b/files/templates/portals/hospi/check_in_mixed.html
@@ -0,0 +1,41 @@
+
Select rooms
+
+ {% csrf_token %}
+{% for male in males %}
+
+ {{ male.name }}
+
+
+
+
+{% endfor %}
+
+
+{% for female in females %}
+
+ {{ female.name }}
+
+
+
+
+{% endfor %}
+
+
+ Matresses
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/files/templates/portals/hospi/check_out_bill.html b/files/templates/portals/hospi/check_out_bill.html
new file mode 100644
index 0000000..572a17b
--- /dev/null
+++ b/files/templates/portals/hospi/check_out_bill.html
@@ -0,0 +1,213 @@
+
+
+{% load url from future %}
+{% load staticfiles %}
+{% load humanize %}
+
+
+
+
+ Checkout Reciept | {{team.team_sid }} | Saarang 2016
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Saarang Copy
+
Saarang 2016 Accommodation Team Details
Generated at: {% now "jS F Y H:i" %}
+
+
+
Team
{{ team.name }}
+
Saarang ID
+
{{ team.team_sid }}
+
+
+
City
+
{{ team.city }}
+
Leader
{{ leader.user.get_full_name }}
+
+
+
Mobile
{{ leader.mobile_number }}
College
{{ leader.college_text }}
+
+
+
Email
{{ leader.user.email }}
+
+
+
+
Accommodation details
+
+
+
From
{{ team.time_of_arrival|title }} on {{ team.date_of_arrival }}
No. of mattresses: {{team.mattress_count}}
Returned?
+
+
+
To
{{ team.time_of_departure|title }} on {{ team.date_of_departure }}
+
+
+----------------------------------------------------------------------------------------------------- Tear along here ------------------------------------------------------------------------------------------
+
+
+
+
+
+
Participant Copy
+
Saarang 2016 Accommodation Team Details
Generated at: {% now "jS F Y H:i" %}
+
+
+
Team
{{ team.name }}
+
Saarang ID
+
{{ team.team_sid }}
+
+
+
City
+
{{ team.city }}
+
Leader
{{ leader.user.get_full_name }}
+
+
+
Mobile
{{ leader.mobile_number }}
College
{{ leader.college_text }}
+
+
+
Email
{{ leader.user.email }}
+
+
+
+
Accommodation details
+
+
+
From
{{ team.time_of_arrival|title }} on {{ team.date_of_arrival }}
No. of mattresses: {{team.mattress_count}}
Returned?
+
+
+
To
{{ team.time_of_departure|title }} on {{ team.date_of_departure }}
Click "Edit Team" to Add/Remove Members
+ All requests has to be confirmed by Saarang.
+ You can Edit your team and change accommodation details till your Accommodation
+ Request has been Confirmed,
+ Rejectedor Waitlisted
+
+
+ {% endif %}
+ Please note that the profile of user should be complete in all manner. ie, no column should be blank in the table. It is very important for one to complete his/her profile, to be eligible for accommodation. This applies for team leader also.
+
College ID cards of each team member, including leader, along with photocopies.
+
Bonafide certificate from college authorities, showing names of each team member including team leader.
+
Printed copy of SAAR along with Terms and Conditions signed by Team leader (SAAR will be emailed to you when accommodation is confirmed)
+
+
+
+
+
+
+ For hospitality related queries, please contact hospitality@saarang.org. If you have difficulty using the registration portal, please send an email to webadmin@saarang.org. Please provide full details of the problem you are facing while writing to the hospitality section or webadmin.
+
+
+
+ {% if editable %}
+
+
+
+
+
+
+
Add members to team: {{ team.name }}
+
+
+
+ {% csrf_token %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Add accomodation details for team: {{ team.name }}
+
+
+ {% if team.leader.accomod_is_confirmed %}
+
+ Your accommodation has already been confirmed, you cannot request again.
+ {% else %}
+
+
+ {% csrf_token %}
+
+
+
Required from:
+
+
+
+
+
to
+
+
+
+
+
+
+
+
Check in time:
09:00 hrs on 6th Jan 2016 to 17:00 hrs on 6th Jan 2016
+ 00:00 hrs to 17:00 hrs on 8th, 9th and 10th Jan 2016
+
Check out time:
00:00 hrs to 17:00 hrs on 7th, 8th, 9th, 10th Jan 2016
+ 00:00 hrs to 09:00 hrs on 11th Jan 2016
+
+
+
+
+ {% endif %}
+
+
+
+
+
+
+
+
Add city to team: {{ team.name }}
+
+
+ {% if team.leader.accomod_is_confirmed %}
+
+ Your accommodation has already been confirmed, you cannot edit again.
The profile of every individual registering for accommodation should be complete in all manner. No field should be left blank in the profile. It is very important to update these, to help us serve you better.
+
All payments should be made through Debit/Credit cards or Demand Drafts.
+
Demand Drafts (DD) should be drwan in favour of IITM STUDENTS' ACTIVITIES TRUST, SAARANG.
+
You can request for accommodation inside IIT Madras Campus through this portal
+
One individual can avail accommodation in only one team
+
Accommodation will be provided only from 9 AM on 6th January to 9AM on 11th January.
+
All requests have to get confirmed by Saarang
+
Upon confirmation you will receive SAAR (Saarang Advance Accommodation Registration) document which can also be downloaded from here
+
For more information and pricing system, refer this document
+
By using this portal and requesting accommodataion, you agree that you will abide by the Terms and Conditions
+
+
+
+
+
+
You currently lead these teams:
+
+
+ {% if teams_leading %}
+ created while you registered for events:
+
+ {% endif %}
+ Please ask you team leader if you want accommodation for these teams.
+
+
+
+
+
+
Create a new team:
+
+
+
+
+ {% csrf_token %}
+
+
+
+
+ Please note that this is for accommodation only. Not for registering to an event.
+ If you want to register for accomodation for yourself, not as a team, please create a team with no members.
+
+
+
+
+
+ For hospitality related queries, please contact hospitality@saarang.org. If you have difficulty using the registration portal, please send an email to webadmin@saarang.org. Please provide full details of the problem you are facing while writing to the hospitality section or webadmin.
+
{% if team.checked_in and not team.checked_out %} IN{% elif team.checked_in and team.checked_out %} OUT {% elif not team.checked_in and not team_checked_out %} ?{% endif %}
{{ team.time_of_arrival|title }} on {{ team.date_of_arrival }}
+
+
+
To
{{ team.time_of_departure|title }} on {{ team.date_of_departure }}
+
+
+
+
+
+
Team Members
+
+ {% for member in members %}
+
+
{{ forloop.counter }}
+
{{ member.saarang_id }}
+
{{ member.user.get_full_name }}
+
{{ member.user.email }}
+
+
{{ member.gender|title }}
+
{{ member.mobile_number }}
+
+ {% endfor %}
+
+
+
+
Billing details
+
+
+
Days of stay
+
No. of members
+
Amount/team member
+
Total
+
+
+
{{ bill_data.days }}
+
{{ team.get_total_count }}
+
{{ bill_data.amt_head|intcomma }} INR
+
{{ bill_data.total|intcomma }} INR
+
+
+
Caution Deposit
+
{{ bill_data.cd|intcomma }} INR
+
+
+
Amount payable
+
{{ bill_data.grand_total|intcomma }} INR
+
+
+
+
+
+
+
TERMS AND CONDITIONS - ACCOMMODATION - SAARANG 2016
+
(To be signed by team leader and submitted at the Control Room at the time of check-in)
+
+
Accommodation Charges per person = Rs. 300 per day for all the 5 days
Caution deposit: Rs. 300 per person
Accommodation is strictly provided only for students and not for any other person accompanying with student, if it is the case then such persons should make their own arrangements.
Participants need to carry SAAR and photocopy of their college ID cards along with the original Bonafide certificate from college is necessary to avail accommodation.
The process of Checking in will be done at Control rooms located in the hostel zone. So, participants are requested to come to the Control rooms as soon as they come to IIT Campus. The exact location of the control rooms will be intimated later.
Accommodation will be provided only from 9 AM on 6th January to 9AM on 11th January.
(A participant can stay for the days he/she registered for. Any cases of overstay within the above time period will attract additional payment of 300 INR per day.)
We will provide you with mattresses. But participants are requested to get their own locks & keys for the rooms that they will be allotted during Saarang. (Note: You may have to share rooms with other participants. So plan accordingly upon reaching).
Girls are not allowed in boys’ hostels and vice versa.
Control room is open from midnight (12 AM) to 5PM every day, i.e. for 17 hours per day.
It will remain closed from 5PM to 12AM due to Professional Shows.
The control room will close at 9 AM on 11th January. All the formalities of checking out have to be done before that.
If any delay is made in checking out, caution deposit will not be refunded.
Refund of caution deposit is subject to terms and conditions (like condition of the room, condition of mattresses while checking out) along with the return of receipt provided at the time of check in.
Participants would necessarily need to share accommodation. Single rooms will not be provided to any participant.
Valuable items should not be kept along with the luggage in the room. Saarang 2016 will not be responsible for any loss or damage of property. Please secure your belongings and put your details on the same.
Please make entries in the register kept with the hostel security whenever you move in and out of the room.
Possession and consumption of alcohol and narcotics in any form is strictly prohibited. If reported, the participant status of the person will be ipso facto null and void and the case will be severely dealt with.
Smoking is prohibited in the campus.
Outstation participants are not allowed to use the sports equipment of the hostels. If any usage or damage is reported, the cost of the equipment will be collected.
Participants will not be allowed to occupy the rooms they have been allotted beyond the date for which they have registered.
Please keep the rooms and hostel area clean.
Saarang 2016, Office of Hostel management or IIT Madras is not responsible for any injuries or accidents caused during your stay.
+
+
DECLARATION
+
I and my team members agree to abide by the Terms and Conditions of Saarang 2016. Failing to do so will result in my accommodation being cancelled.
+
+
(Signature) {{team.leader.user.get_full_name}} Team Leader Team: {{team.name}}
+
+
+
-- Wishing you a pleasant, comfortable stay and a Great Journey of a Lifetime at IIT Madras. Hospitality Team, Saarang 2016 --
\ No newline at end of file
diff --git a/files/templates/portals/hospi/statistics.html b/files/templates/portals/hospi/statistics.html
new file mode 100644
index 0000000..af092ec
--- /dev/null
+++ b/files/templates/portals/hospi/statistics.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
Status
+
Teams
+
Participants
+
Males
+
Females
+
+
+
+
+
Pending
+
{{ num_pending_teams }}
+
{{ num_total_members_pending }}
+
{{ num_male_members_pending }}
+
{{ num_female_members_pending }}
+
+
+
Confirmed
+
{{ num_confirmed_teams }}
+
{{ num_total_members_confirmed }}
+
{{ num_male_members_confirmed }}
+
{{ num_female_members_confirmed }}
+
+
+
Waitlisted
+
{{ num_waitlisted_teams }}
+
{{ num_total_members_waitlisted }}
+
{{ num_male_members_waitlisted }}
+
{{ num_female_members_waitlisted }}
+
+
+
Rejected
+
{{ num_rejected_teams }}
+
{{ num_total_members_rejected }}
+
{{ num_male_members_rejected }}
+
{{ num_female_members_rejected }}
+
+
+
Total
+
{{ num_total_teams }}
+
{{ num_total_members }}
+
{{ num_male_members }}
+
{{ num_female_members }}
+
+
+
+
+
\ No newline at end of file
diff --git a/files/templates/portals/hospi/team_details.html b/files/templates/portals/hospi/team_details.html
new file mode 100644
index 0000000..3489700
--- /dev/null
+++ b/files/templates/portals/hospi/team_details.html
@@ -0,0 +1,523 @@
+
+{% load staticfiles %}
+{% load url from future %}
+{% load dajaxice_templatetags %}
+{% dajaxice_js_import %}
+{% load humanize %}
+
+
+
+
+ {% block title %}{{team.name}}{% endblock %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{team.name}}
+
+
+
+
+
{{team.name}}
+
{{ team.team_sid }}
+
{{ team.time_of_arrival|title }} on {{ team.date_of_arrival }} -to-
+ {% if team.accomodation_status != 'not_req' %}
+
{{ team.time_of_departure|title }} on {{ team.date_of_departure }}
+
{% if team.accomodation_status == 'confirmed' and not team.checked_in and not team.checked_out %}
+ Check-in
+{% elif team.accomodation_status == 'confirmed' and team.checked_in and not team.checked_out %}
+ Check-out
+{% endif %}
+
+
+
+Members highlighted in red indicates people who have accommodation confirmed already in other teams. They will be automatically removed upon confirmation of this team. (Leader has been pre-notified)
+
+ The Title: The title of the sponsor. Eg: Title Sponsor, Online Media Partner, etc.
+
+
+ The Sponsor Link : A link to the sponsor's webpage. Clicking on the logo on the spons page will take you here.
+
+
+ Logo : A jpg or a png of the sponsor logo. Please do not try to upload pdfs.
+
+
+ Priority : The basis of the ordering system. Higher numbers will be added on top. The decimal system is so that if you want to add a logo between two others, giving it a number between the other two is easier.
+
Saarang is the annual cultural festival of IIT Madras, and one of the top five best college festivals across the country. Over the years, Saarang has remained the preferred platform of an exhibition of culture, talent and competition for students from all over India, from the fields of dance, music, literature and more, all under one roof
For four days in January, IIT Madras is transformed into a hub of activity, with a large number of students, participants, and passers-by who enjoy the amalgam of events, food stalls, workshops and music shows. To the students of the institution and Chennai alike, Saarang is synonymous with culture, colour, fun, learning, and big names, big money, big dreams.
The pool of resources, great judges and opportunity it offers to young talent is a magnetic draw to students, while Chennai localites however, love Saarang for the yearly bonanza of big artistes from all over the world, performing at IIT as part of the professional and World Cultural shows. There is something for absolutely everybody, and we as we at Saarang say, this is truly the next Big Bang- see you at Saarang, for a truly out-of-the-world experience.
One of the largest Classical performances is on it's way this January with a Sarod Concert by the renowned Ustad Amjad Ali Khan and a graceful Bharatnatyam performance by the breath-taking Rukmini Vijayakumar.
Come, witness the legends perform on the star-studded opening act of Saarang 2016, the Classical Night, on 6th January at IIT Madras.
Bring the music alive, unleash yourself, dance, dance and dance till you drop. Presenting the biggest inter-collegiate dance competition, Choreo Night Saarang, IIT Madras. #JourneyOfALifetime
Saarang's EDM Night presents to you the electro mashup sensation - Djs From Mars as international headliners for 2016. They're bringing the party to India for the very first time, exclusively at Saarang, IIT Madras.
With mashups of popular music from all your favourite artistes, from Adele to Zedd, they have featured consistently in the range of top 100 international DJs. Known for performing with their iconic cardboard box masks, their live shows are packed with pure energy
Saarang's Rock Show presents to you the alternative rock band - Red Jumpsuit Apparatus as headliners for 2016. They are all set to rock India for the very first time as a part of their 'Don't You Fake It 10th Anniversary World Tour' exclusively at Saarang, IIT Madras.
Known for hits such as the acoustic song - 'Your Guardian Angel', classic rock songs such as 'Face Down' and 'False Pretense' which features in the movie 'Never Back Down', they'll be performing their famous Gold Rated debut album in its entirety for the very first time since its release.
Saarang's Popular Night presents to you the hit Bollywood music directing duo - Vishal & Shekhar as headliners for 2016. They are all set to energize Saarang once again with their ever so famous and award winning numbers.
Known for hits in Bollywood compositions, they have won numerous awards for their albums of the hit movies; Anjaana Anjaani, I Hate Love Storys, Jhankaar Beats, Dus, Om Shanti Om, Bachna Ae Haseeno, Dostana, Ra.One, Chennai Express, Bang Bang, Happy New Year and many more, they'll be performing from their large arsenal of reputed albums.
- var selector_chosen = quickElement('div', selector_div, '');
- selector_chosen.className = 'selector-chosen';
- var title_chosen = quickElement('h2', selector_chosen, interpolate(gettext('Chosen %s') + ' ', [field_name]));
- quickElement('img', title_chosen, '', 'src', admin_static_prefix + 'img/icon-unknown.gif', 'width', '10', 'height', '10', 'class', 'help help-tooltip', 'title', interpolate(gettext('This is the list of chosen %s. You may remove some by selecting them in the box below and then clicking the "Remove" arrow between the two boxes.'), [field_name]));
-
- var to_box = quickElement('select', selector_chosen, '', 'id', field_id + '_to', 'multiple', 'multiple', 'size', from_box.size, 'name', from_box.getAttribute('name'));
- to_box.className = 'filtered';
- var clear_all = quickElement('a', selector_chosen, gettext('Remove all'), 'title', interpolate(gettext('Click to remove all chosen %s at once.'), [field_name]), 'href', 'javascript: (function() { SelectBox.move_all("' + field_id + '_to", "' + field_id + '_from"); SelectFilter.refresh_icons("' + field_id + '");})()', 'id', field_id + '_remove_all_link');
- clear_all.className = 'selector-clearall';
-
- from_box.setAttribute('name', from_box.getAttribute('name') + '_old');
-
- // Set up the JavaScript event handlers for the select box filter interface
- addEvent(filter_input, 'keyup', function(e) { SelectFilter.filter_key_up(e, field_id); });
- addEvent(filter_input, 'keydown', function(e) { SelectFilter.filter_key_down(e, field_id); });
- addEvent(from_box, 'change', function(e) { SelectFilter.refresh_icons(field_id) });
- addEvent(to_box, 'change', function(e) { SelectFilter.refresh_icons(field_id) });
- addEvent(from_box, 'dblclick', function() { SelectBox.move(field_id + '_from', field_id + '_to'); SelectFilter.refresh_icons(field_id); });
- addEvent(to_box, 'dblclick', function() { SelectBox.move(field_id + '_to', field_id + '_from'); SelectFilter.refresh_icons(field_id); });
- addEvent(findForm(from_box), 'submit', function() { SelectBox.select_all(field_id + '_to'); });
- SelectBox.init(field_id + '_from');
- SelectBox.init(field_id + '_to');
- // Move selected from_box options to to_box
- SelectBox.move(field_id + '_from', field_id + '_to');
-
- if (!is_stacked) {
- // In horizontal mode, give the same height to the two boxes.
- var j_from_box = $(from_box);
- var j_to_box = $(to_box);
- var resize_filters = function() { j_to_box.height($(filter_p).outerHeight() + j_from_box.outerHeight()); }
- if (j_from_box.outerHeight() > 0) {
- resize_filters(); // This fieldset is already open. Resize now.
- } else {
- // This fieldset is probably collapsed. Wait for its 'show' event.
- j_to_box.closest('fieldset').one('show.fieldset', resize_filters);
- }
- }
-
- // Initial icon refresh
- SelectFilter.refresh_icons(field_id);
- },
- refresh_icons: function(field_id) {
- var from = $('#' + field_id + '_from');
- var to = $('#' + field_id + '_to');
- var is_from_selected = from.find('option:selected').length > 0;
- var is_to_selected = to.find('option:selected').length > 0;
- // Active if at least one item is selected
- $('#' + field_id + '_add_link').toggleClass('active', is_from_selected);
- $('#' + field_id + '_remove_link').toggleClass('active', is_to_selected);
- // Active if the corresponding box isn't empty
- $('#' + field_id + '_add_all_link').toggleClass('active', from.find('option').length > 0);
- $('#' + field_id + '_remove_all_link').toggleClass('active', to.find('option').length > 0);
- },
- filter_key_up: function(event, field_id) {
- var from = document.getElementById(field_id + '_from');
- // don't submit form if user pressed Enter
- if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)) {
- from.selectedIndex = 0;
- SelectBox.move(field_id + '_from', field_id + '_to');
- from.selectedIndex = 0;
- return false;
- }
- var temp = from.selectedIndex;
- SelectBox.filter(field_id + '_from', document.getElementById(field_id + '_input').value);
- from.selectedIndex = temp;
- return true;
- },
- filter_key_down: function(event, field_id) {
- var from = document.getElementById(field_id + '_from');
- // right arrow -- move across
- if ((event.which && event.which == 39) || (event.keyCode && event.keyCode == 39)) {
- var old_index = from.selectedIndex;
- SelectBox.move(field_id + '_from', field_id + '_to');
- from.selectedIndex = (old_index == from.length) ? from.length - 1 : old_index;
- return false;
- }
- // down arrow -- wrap around
- if ((event.which && event.which == 40) || (event.keyCode && event.keyCode == 40)) {
- from.selectedIndex = (from.length == from.selectedIndex + 1) ? 0 : from.selectedIndex + 1;
- }
- // up arrow -- wrap around
- if ((event.which && event.which == 38) || (event.keyCode && event.keyCode == 38)) {
- from.selectedIndex = (from.selectedIndex == 0) ? from.length - 1 : from.selectedIndex - 1;
- }
- return true;
- }
-}
-
-})(django.jQuery);
diff --git a/path_to_static/admin/js/actions.js b/path_to_static/admin/js/actions.js
deleted file mode 100644
index 1992a70..0000000
--- a/path_to_static/admin/js/actions.js
+++ /dev/null
@@ -1,139 +0,0 @@
-(function($) {
- $.fn.actions = function(opts) {
- var options = $.extend({}, $.fn.actions.defaults, opts);
- var actionCheckboxes = $(this);
- var list_editable_changed = false;
- var checker = function(checked) {
- if (checked) {
- showQuestion();
- } else {
- reset();
- }
- $(actionCheckboxes).prop("checked", checked)
- .parent().parent().toggleClass(options.selectedClass, checked);
- },
- updateCounter = function() {
- var sel = $(actionCheckboxes).filter(":checked").length;
- $(options.counterContainer).html(interpolate(
- ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), {
- sel: sel,
- cnt: _actions_icnt
- }, true));
- $(options.allToggle).prop("checked", function() {
- if (sel == actionCheckboxes.length) {
- value = true;
- showQuestion();
- } else {
- value = false;
- clearAcross();
- }
- return value;
- });
- },
- showQuestion = function() {
- $(options.acrossClears).hide();
- $(options.acrossQuestions).show();
- $(options.allContainer).hide();
- },
- showClear = function() {
- $(options.acrossClears).show();
- $(options.acrossQuestions).hide();
- $(options.actionContainer).toggleClass(options.selectedClass);
- $(options.allContainer).show();
- $(options.counterContainer).hide();
- },
- reset = function() {
- $(options.acrossClears).hide();
- $(options.acrossQuestions).hide();
- $(options.allContainer).hide();
- $(options.counterContainer).show();
- },
- clearAcross = function() {
- reset();
- $(options.acrossInput).val(0);
- $(options.actionContainer).removeClass(options.selectedClass);
- };
- // Show counter by default
- $(options.counterContainer).show();
- // Check state of checkboxes and reinit state if needed
- $(this).filter(":checked").each(function(i) {
- $(this).parent().parent().toggleClass(options.selectedClass);
- updateCounter();
- if ($(options.acrossInput).val() == 1) {
- showClear();
- }
- });
- $(options.allToggle).show().click(function() {
- checker($(this).prop("checked"));
- updateCounter();
- });
- $("div.actions span.question a").click(function(event) {
- event.preventDefault();
- $(options.acrossInput).val(1);
- showClear();
- });
- $("div.actions span.clear a").click(function(event) {
- event.preventDefault();
- $(options.allToggle).prop("checked", false);
- clearAcross();
- checker(0);
- updateCounter();
- });
- lastChecked = null;
- $(actionCheckboxes).click(function(event) {
- if (!event) { event = window.event; }
- var target = event.target ? event.target : event.srcElement;
- if (lastChecked && $.data(lastChecked) != $.data(target) && event.shiftKey === true) {
- var inrange = false;
- $(lastChecked).prop("checked", target.checked)
- .parent().parent().toggleClass(options.selectedClass, target.checked);
- $(actionCheckboxes).each(function() {
- if ($.data(this) == $.data(lastChecked) || $.data(this) == $.data(target)) {
- inrange = (inrange) ? false : true;
- }
- if (inrange) {
- $(this).prop("checked", target.checked)
- .parent().parent().toggleClass(options.selectedClass, target.checked);
- }
- });
- }
- $(target).parent().parent().toggleClass(options.selectedClass, target.checked);
- lastChecked = target;
- updateCounter();
- });
- $('form#changelist-form table#result_list tr').find('td:gt(0) :input').change(function() {
- list_editable_changed = true;
- });
- $('form#changelist-form button[name="index"]').click(function(event) {
- if (list_editable_changed) {
- return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."));
- }
- });
- $('form#changelist-form input[name="_save"]').click(function(event) {
- var action_changed = false;
- $('div.actions select option:selected').each(function() {
- if ($(this).val()) {
- action_changed = true;
- }
- });
- if (action_changed) {
- if (list_editable_changed) {
- return confirm(gettext("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action."));
- } else {
- return confirm(gettext("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button."));
- }
- }
- });
- };
- /* Setup plugin defaults */
- $.fn.actions.defaults = {
- actionContainer: "div.actions",
- counterContainer: "span.action-counter",
- allContainer: "div.actions span.all",
- acrossInput: "div.actions input.select-across",
- acrossQuestions: "div.actions span.question",
- acrossClears: "div.actions span.clear",
- allToggle: "#action-toggle",
- selectedClass: "selected"
- };
-})(django.jQuery);
diff --git a/path_to_static/admin/js/actions.min.js b/path_to_static/admin/js/actions.min.js
deleted file mode 100644
index 4d2c5f7..0000000
--- a/path_to_static/admin/js/actions.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-(function(a){a.fn.actions=function(n){var b=a.extend({},a.fn.actions.defaults,n),e=a(this),g=false,k=function(c){c?i():j();a(e).prop("checked",c).parent().parent().toggleClass(b.selectedClass,c)},f=function(){var c=a(e).filter(":checked").length;a(b.counterContainer).html(interpolate(ngettext("%(sel)s of %(cnt)s selected","%(sel)s of %(cnt)s selected",c),{sel:c,cnt:_actions_icnt},true));a(b.allToggle).prop("checked",function(){if(c==e.length){value=true;i()}else{value=false;l()}return value})},i=
-function(){a(b.acrossClears).hide();a(b.acrossQuestions).show();a(b.allContainer).hide()},m=function(){a(b.acrossClears).show();a(b.acrossQuestions).hide();a(b.actionContainer).toggleClass(b.selectedClass);a(b.allContainer).show();a(b.counterContainer).hide()},j=function(){a(b.acrossClears).hide();a(b.acrossQuestions).hide();a(b.allContainer).hide();a(b.counterContainer).show()},l=function(){j();a(b.acrossInput).val(0);a(b.actionContainer).removeClass(b.selectedClass)};a(b.counterContainer).show();
-a(this).filter(":checked").each(function(){a(this).parent().parent().toggleClass(b.selectedClass);f();a(b.acrossInput).val()==1&&m()});a(b.allToggle).show().click(function(){k(a(this).prop("checked"));f()});a("div.actions span.question a").click(function(c){c.preventDefault();a(b.acrossInput).val(1);m()});a("div.actions span.clear a").click(function(c){c.preventDefault();a(b.allToggle).prop("checked",false);l();k(0);f()});lastChecked=null;a(e).click(function(c){if(!c)c=window.event;var d=c.target?
-c.target:c.srcElement;if(lastChecked&&a.data(lastChecked)!=a.data(d)&&c.shiftKey===true){var h=false;a(lastChecked).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked);a(e).each(function(){if(a.data(this)==a.data(lastChecked)||a.data(this)==a.data(d))h=h?false:true;h&&a(this).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked)})}a(d).parent().parent().toggleClass(b.selectedClass,d.checked);lastChecked=d;f()});a("form#changelist-form table#result_list tr").find("td:gt(0) :input").change(function(){g=
-true});a('form#changelist-form button[name="index"]').click(function(){if(g)return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."))});a('form#changelist-form input[name="_save"]').click(function(){var c=false;a("div.actions select option:selected").each(function(){if(a(this).val())c=true});if(c)return g?confirm(gettext("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action.")):
-confirm(gettext("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button."))})};a.fn.actions.defaults={actionContainer:"div.actions",counterContainer:"span.action-counter",allContainer:"div.actions span.all",acrossInput:"div.actions input.select-across",acrossQuestions:"div.actions span.question",acrossClears:"div.actions span.clear",allToggle:"#action-toggle",selectedClass:"selected"}})(django.jQuery);
diff --git a/path_to_static/admin/js/admin/DateTimeShortcuts.js b/path_to_static/admin/js/admin/DateTimeShortcuts.js
deleted file mode 100644
index 671af9b..0000000
--- a/path_to_static/admin/js/admin/DateTimeShortcuts.js
+++ /dev/null
@@ -1,287 +0,0 @@
-// Inserts shortcut buttons after all of the following:
-//
-//
-
-var DateTimeShortcuts = {
- calendars: [],
- calendarInputs: [],
- clockInputs: [],
- dismissClockFunc: [],
- dismissCalendarFunc: [],
- calendarDivName1: 'calendarbox', // name of calendar
that gets toggled
- calendarDivName2: 'calendarin', // name of
that contains calendar
- calendarLinkName: 'calendarlink',// name of the link that is used to toggle
- clockDivName: 'clockbox', // name of clock
that gets toggled
- clockLinkName: 'clocklink', // name of the link that is used to toggle
- shortCutsClass: 'datetimeshortcuts', // class of the clock and cal shortcuts
- admin_media_prefix: '',
- init: function() {
- // Get admin_media_prefix by grabbing it off the window object. It's
- // set in the admin/base.html template, so if it's not there, someone's
- // overridden the template. In that case, we'll set a clearly-invalid
- // value in the hopes that someone will examine HTTP requests and see it.
- if (window.__admin_media_prefix__ != undefined) {
- DateTimeShortcuts.admin_media_prefix = window.__admin_media_prefix__;
- } else {
- DateTimeShortcuts.admin_media_prefix = '/missing-admin-media-prefix/';
- }
-
- var inputs = document.getElementsByTagName('input');
- for (i=0; i
- //
");
- addButton = $this.filter(":last").next().find("a");
- }
- addButton.click(function(e) {
- e.preventDefault();
- var totalForms = $("#id_" + options.prefix + "-TOTAL_FORMS");
- var template = $("#" + options.prefix + "-empty");
- var row = template.clone(true);
- row.removeClass(options.emptyCssClass)
- .addClass(options.formCssClass)
- .attr("id", options.prefix + "-" + nextIndex);
- if (row.is("tr")) {
- // If the forms are laid out in table rows, insert
- // the remove button into the last table cell:
- row.children(":last").append('
");
- } else {
- // Otherwise, just insert the remove button as the
- // last child element of the form's container:
- row.children(":first").append('' + options.deleteText + "");
- }
- row.find("*").each(function() {
- updateElementIndex(this, options.prefix, totalForms.val());
- });
- // Insert the new form when it has been fully edited
- row.insertBefore($(template));
- // Update number of total forms
- $(totalForms).val(parseInt(totalForms.val(), 10) + 1);
- nextIndex += 1;
- // Hide add button in case we've hit the max, except we want to add infinitely
- if ((maxForms.val() !== '') && (maxForms.val()-totalForms.val()) <= 0) {
- addButton.parent().hide();
- }
- // The delete button of each row triggers a bunch of other things
- row.find("a." + options.deleteCssClass).click(function(e) {
- e.preventDefault();
- // Remove the parent form containing this button:
- var row = $(this).parents("." + options.formCssClass);
- row.remove();
- nextIndex -= 1;
- // If a post-delete callback was provided, call it with the deleted form:
- if (options.removed) {
- options.removed(row);
- }
- // Update the TOTAL_FORMS form count.
- var forms = $("." + options.formCssClass);
- $("#id_" + options.prefix + "-TOTAL_FORMS").val(forms.length);
- // Show add button again once we drop below max
- if ((maxForms.val() === '') || (maxForms.val()-forms.length) > 0) {
- addButton.parent().show();
- }
- // Also, update names and ids for all remaining form controls
- // so they remain in sequence:
- for (var i=0, formCount=forms.length; i
"):c.children(":first").append(''+a.deleteText+"");c.find("*").each(function(){i(this,
-a.prefix,f.val())});c.insertBefore(b(d));b(f).val(parseInt(f.val(),10)+1);g=g+1;e.val()!==""&&e.val()-f.val()<=0&&h.parent().hide();c.find("a."+a.deleteCssClass).click(function(d){d.preventDefault();d=b(this).parents("."+a.formCssClass);d.remove();g=g-1;a.removed&&a.removed(d);d=b("."+a.formCssClass);b("#id_"+a.prefix+"-TOTAL_FORMS").val(d.length);(e.val()===""||e.val()-d.length>0)&&h.parent().show();for(var c=0,f=d.length;c type pairs
- class2type = {},
-
- // List of deleted data cache ids, so we can reuse them
- core_deletedIds = [],
-
- core_version = "1.9.1",
-
- // Save a reference to some core methods
- core_concat = core_deletedIds.concat,
- core_push = core_deletedIds.push,
- core_slice = core_deletedIds.slice,
- core_indexOf = core_deletedIds.indexOf,
- core_toString = class2type.toString,
- core_hasOwn = class2type.hasOwnProperty,
- core_trim = core_version.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
- // Used for splitting on whitespace
- core_rnotwhite = /\S+/g,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- },
-
- // The ready event handler
- completed = function( event ) {
-
- // readyState === "complete" is good enough for us to call the dom ready in oldIE
- if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
- detach();
- jQuery.ready();
- }
- },
- // Clean-up method for dom ready events
- detach = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", completed, false );
- window.removeEventListener( "load", completed, false );
-
- } else {
- document.detachEvent( "onreadystatechange", completed );
- window.detachEvent( "onload", completed );
- }
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: core_version,
-
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var src, copyIsArray, copy, name, options, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return String( obj );
- }
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ core_toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // keepScripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
- if ( scripts ) {
- jQuery( scripts ).remove();
- }
- return jQuery.merge( [], parsed.childNodes );
- },
-
- parseJSON: function( data ) {
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- if ( data === null ) {
- return data;
- }
-
- if ( typeof data === "string" ) {
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- if ( data ) {
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
- }
- }
- }
-
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && jQuery.trim( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- core_push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return core_concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var args, proxy, tmp;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- length = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < length; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", completed );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", completed );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // detach all dom ready events
- detach();
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || type !== "function" &&
- ( length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( list && ( !fired || stack ) ) {
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var action = tuple[ 0 ],
- fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ](function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
- }
- });
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[0] ] = function() {
- deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = core_slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
- if( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-jQuery.support = (function() {
-
- var support, all, a,
- input, select, fragment,
- opt, eventName, isSupported, i,
- div = document.createElement("div");
-
- // Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = "
a";
-
- // Support tests won't run in some limited or non-browser environments
- all = div.getElementsByTagName("*");
- a = div.getElementsByTagName("a")[ 0 ];
- if ( !all || !a || !all.length ) {
- return {};
- }
-
- // First batch of tests
- select = document.createElement("select");
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName("input")[ 0 ];
-
- a.style.cssText = "top:1px;float:left;opacity:.5";
- support = {
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: div.firstChild.nodeType === 3,
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: a.getAttribute("href") === "/a",
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.5/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
- checkOn: !!input.value,
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Tests for enctype support on a form (#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>",
-
- // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
- boxModel: document.compatMode === "CSS1Compat",
-
- // Will be defined later
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- boxSizingReliable: true,
- pixelPosition: false
- };
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<9
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- // Check if we can trust getAttribute("value")
- input = document.createElement("input");
- input.setAttribute( "value", "" );
- support.input = input.getAttribute( "value" ) === "";
-
- // Check if an input maintains its value after becoming a radio
- input.value = "t";
- input.setAttribute( "type", "radio" );
- support.radioValue = input.value === "t";
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "checked", "t" );
- input.setAttribute( "name", "t" );
-
- fragment = document.createDocumentFragment();
- fragment.appendChild( input );
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<9
- // Opera does not clone events (and typeof div.attachEvent === undefined).
- // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
- if ( div.attachEvent ) {
- div.attachEvent( "onclick", function() {
- support.noCloneEvent = false;
- });
-
- div.cloneNode( true ).click();
- }
-
- // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
- for ( i in { submit: true, change: true, focusin: true }) {
- div.setAttribute( eventName = "on" + i, "t" );
-
- support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
- }
-
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, marginDiv, tds,
- divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- container = document.createElement("div");
- container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
-
- body.appendChild( container ).appendChild( div );
-
- // Support: IE8
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- div.innerHTML = "
t
";
- tds = div.getElementsByTagName("td");
- tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Support: IE8
- // Check if empty table cells still have offsetWidth/Height
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check box-sizing and margin behavior
- div.innerHTML = "";
- div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
- support.boxSizing = ( div.offsetWidth === 4 );
- support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
-
- // Use window.getComputedStyle because jsdom on node.js will break without it.
- if ( window.getComputedStyle ) {
- support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
- support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- marginDiv = div.appendChild( document.createElement("div") );
- marginDiv.style.cssText = div.style.cssText = divReset;
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
-
- support.reliableMarginRight =
- !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
- }
-
- if ( typeof div.style.zoom !== core_strundefined ) {
- // Support: IE<8
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Support: IE6
- // Check if elements with layout shrink-wrap their children
- div.style.display = "block";
- div.innerHTML = "";
- div.firstChild.style.width = "5px";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
- if ( support.inlineBlockNeedsLayout ) {
- // Prevent IE 6 from affecting layout for positioned elements #11048
- // Prevent IE from shrinking the body in IE 7 mode #12869
- // Support: IE<8
- body.style.zoom = 1;
- }
- }
-
- body.removeChild( container );
-
- // Null elements to avoid leaks in IE
- container = div = tds = marginDiv = null;
- });
-
- // Null elements to avoid leaks in IE
- all = select = fragment = opt = a = input = null;
-
- return support;
-})();
-
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-function internalData( elem, name, data, pvt /* Internal Use Only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
-}
-
-function internalRemoveData( elem, name, pvt ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var i, l, thisCache,
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split(" ");
- }
- }
- } else {
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = name.concat( jQuery.map( name, jQuery.camelCase ) );
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject( cache[ id ] ) ) {
- return;
- }
- }
-
- // Destroy the cache
- if ( isNode ) {
- jQuery.cleanData( [ elem ], true );
-
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
- delete cache[ id ];
-
- // When all else fails, null
- } else {
- cache[ id ] = null;
- }
-}
-
-jQuery.extend({
- cache: {},
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data ) {
- return internalData( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- return internalRemoveData( elem, name );
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return internalData( elem, name, data, true );
- },
-
- _removeData: function( elem, name ) {
- return internalRemoveData( elem, name, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- // Do not set data on non-element because it will not be cleared (#8335).
- if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
- return false;
- }
-
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- // nodes accept data unless otherwise specified; rejection can be conditional
- return !noData || noData !== true && elem.getAttribute("classid") === noData;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var attrs, name,
- elem = this[0],
- i = 0,
- data = null;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attrs = elem.attributes;
- for ( ; i < attrs.length; i++ ) {
- name = attrs[i].name;
-
- if ( !name.indexOf( "data-" ) ) {
- name = jQuery.camelCase( name.slice(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- // Try to fetch any internally stored data first
- return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
- }
-
- this.each(function() {
- jQuery.data( this, key, value );
- });
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- var name;
- for ( name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray(data) ) {
- queue = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- hooks.cur = fn;
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return jQuery._data( elem, key ) || jQuery._data( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- jQuery._removeData( elem, type + "queue" );
- jQuery._removeData( elem, key );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while( i-- ) {
- tmp = jQuery._data( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var nodeHook, boolHook,
- rclass = /[\t\r\n]/g,
- rreturn = /\r/g,
- rfocusable = /^(?:input|select|textarea|button|object)$/i,
- rclickable = /^(?:a|area)$/i,
- rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
- ruseDefault = /^(?:checked|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- getSetInput = jQuery.support.input;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call( this, j, this.className ) );
- });
- }
-
- if ( proceed ) {
- // The disjunction here is for better compressibility (see removeClass)
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- " "
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
- elem.className = jQuery.trim( cur );
-
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = arguments.length === 0 || typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call( this, j, this.className ) );
- });
- }
- if ( proceed ) {
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- ""
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
- elem.className = value ? jQuery.trim( cur ) : "";
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.match( core_rnotwhite ) || [];
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- // Toggle whole class name
- } else if ( type === core_strundefined || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // If the element has a class name or if we're passed "false",
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var ret, hooks, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val,
- self = jQuery(this);
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // oldIE doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attr: function( elem, name, value ) {
- var hooks, notxml, ret,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === core_strundefined ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
-
- } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- // In IE9+, Flash objects don't have .getAttribute (#12945)
- // Support: IE9+
- if ( typeof elem.getAttribute !== core_strundefined ) {
- ret = elem.getAttribute( name );
- }
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( core_rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( (name = attrNames[i++]) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( rboolean.test( name ) ) {
- // Set corresponding property to false for boolean attributes
- // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8
- if ( !getSetAttribute && ruseDefault.test( name ) ) {
- elem[ jQuery.camelCase( "default-" + name ) ] =
- elem[ propName ] = false;
- } else {
- elem[ propName ] = false;
- }
-
- // See #9699 for explanation of this approach (setting first, then removal)
- } else {
- jQuery.attr( elem, name, "" );
- }
-
- elem.removeAttribute( getSetAttribute ? name : propName );
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to default in case type is set after value during creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- var
- // Use .prop to determine if this attribute is understood as boolean
- prop = jQuery.prop( elem, name ),
-
- // Fetch it accordingly
- attr = typeof prop === "boolean" && elem.getAttribute( name ),
- detail = typeof prop === "boolean" ?
-
- getSetInput && getSetAttribute ?
- attr != null :
- // oldIE fabricates an empty string for missing boolean attributes
- // and conflates checked/selected into attroperties
- ruseDefault.test( name ) ?
- elem[ jQuery.camelCase( "default-" + name ) ] :
- !!attr :
-
- // fetch an attribute node for properties not recognized as boolean
- elem.getAttributeNode( name );
-
- return detail && detail.value !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- // IE<8 needs the *property* name
- elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
-
- // Use defaultChecked and defaultSelected for oldIE
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
- }
-
- return name;
- }
-};
-
-// fix oldIE value attroperty
-if ( !getSetInput || !getSetAttribute ) {
- jQuery.attrHooks.value = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return jQuery.nodeName( elem, "input" ) ?
-
- // Ignore the value *property* by using defaultValue
- elem.defaultValue :
-
- ret && ret.specified ? ret.value : undefined;
- },
- set: function( elem, value, name ) {
- if ( jQuery.nodeName( elem, "input" ) ) {
- // Does not return so that setAttribute is also used
- elem.defaultValue = value;
- } else {
- // Use nodeHook if defined (#1954); otherwise setAttribute is fine
- return nodeHook && nodeHook.set( elem, value, name );
- }
- }
- };
-}
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ?
- ret.value :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- elem.setAttributeNode(
- (ret = elem.ownerDocument.createAttribute( name ))
- );
- }
-
- ret.value = value += "";
-
- // Break association with cloned elements by also using setAttribute (#9646)
- return name === "value" || value === elem.getAttribute( name ) ?
- value :
- undefined;
- }
- };
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- nodeHook.set( elem, value === "" ? false : value, name );
- }
- };
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-}
-
-
-// Some attributes require a special call on IE
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret == null ? undefined : ret;
- }
- });
- });
-
- // href/src property should get the full normalized URL (#10299/#12915)
- jQuery.each([ "href", "src" ], function( i, name ) {
- jQuery.propHooks[ name ] = {
- get: function( elem ) {
- return elem.getAttribute( name, 4 );
- }
- };
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Note: IE uppercases css property names, but if we were to .toLowerCase()
- // .cssText, that would destroy case senstitivity in URL's, like in "background"
- return elem.style.cssText || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = value + "" );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-var rformElems = /^(?:input|select|textarea)$/i,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
- var tmp, events, t, handleObjIn,
- special, eventHandle, handleObj,
- handlers, type, namespaces, origType,
- elemData = jQuery._data( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !(events = elemData.events) ) {
- events = elemData.events = {};
- }
- if ( !(eventHandle = elemData.handle) ) {
- eventHandle = elemData.handle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !(handlers = events[ type ]) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
- var j, handleObj, tmp,
- origCount, t, events,
- special, handlers, type,
- namespaces, origType,
- elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery._removeData( elem, "events" );
- }
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- var handle, ontype, cur,
- bubbleType, special, tmp, i,
- eventPath = [ elem || document ],
- type = core_hasOwn.call( event, "type" ) ? event.type : event,
- namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf(".") >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf(":") < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- event.isTrigger = true;
- event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === (elem.ownerDocument || document) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- try {
- elem[ type ]();
- } catch ( e ) {
- // IE<9 dies on focus/blur to hidden element (#1486,#12518)
- // only reproducible on winXP IE8 native, not IE9 in IE8 mode
- }
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, ret, handleObj, matched, j,
- handlerQueue = [],
- args = core_slice.call( arguments ),
- handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( (event.result = ret) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var sel, handleObj, matches, i,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Find delegate handlers
- // Black-hole SVG