Skip to content

Commit

Permalink
Add more suborg admins
Browse files Browse the repository at this point in the history
  • Loading branch information
sounak98 committed Aug 15, 2019
1 parent acc3032 commit a43010d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 2 deletions.
3 changes: 2 additions & 1 deletion gsoc/admin.py
Expand Up @@ -487,7 +487,8 @@ class SubOrgDetailsAdmin(admin.ModelAdmin):
list_filter = ('gsoc_year', 'changed')
# fields = ('last_message', )
readonly_fields = (
'gsoc_year', 'suborg_admin_email', 'past_gsoc_experience', 'past_years',
'gsoc_year', 'suborg_admin_email', 'suborg_admin_2_email', 'suborg_admin_3_email',
'past_gsoc_experience', 'past_years',
'suborg_in_past', 'applied_but_not_selected', 'year_of_start',
'source_code', 'docs', 'anything_else', 'suborg_name', 'description',
'logo', 'primary_os_license', 'ideas_list', 'chat', 'mailing_list', 'twitter_url',
Expand Down
23 changes: 23 additions & 0 deletions gsoc/migrations/0053_auto_20190815_1130.py
@@ -0,0 +1,23 @@
# Generated by Django 2.1.10 on 2019-08-15 11:30

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('gsoc', '0052_userprofile_github_handle'),
]

operations = [
migrations.AddField(
model_name='suborgdetails',
name='suborg_admin_2_email',
field=models.EmailField(blank=True, max_length=254, null=True, verbose_name='Suborg admin 2 email'),
),
migrations.AddField(
model_name='suborgdetails',
name='suborg_admin_3_email',
field=models.EmailField(blank=True, max_length=254, null=True, verbose_name='Suborg admin 3 email'),
),
]
29 changes: 28 additions & 1 deletion gsoc/models.py
Expand Up @@ -190,11 +190,24 @@ class SubOrgDetails(models.Model):

reason_for_participation = models.TextField(
verbose_name='Why does your org want to participate in Google Summer of Code?',
null=True, blank=True
null=True, blank=True,
)
suborg_admin_email = models.EmailField(
verbose_name='Suborg admin email'
)

suborg_admin_2_email = models.EmailField(
verbose_name='Suborg admin 2 email',
blank=True, null=True,
help_text='Fill this if there are other suborg admins other than you'
)

suborg_admin_3_email = models.EmailField(
verbose_name='Suborg admin 3 email',
blank=True, null=True,
help_text='Fill this if there are other suborg admins other than you'
)

mentors_student_engagement = models.TextField(
verbose_name='How will you keep mentors engaged with their students?',
null=True, blank=True
Expand Down Expand Up @@ -301,6 +314,20 @@ def accept(self):
email=self.suborg_admin_email,
send_notifications=False)

if self.suborg_admin_2_email:
RegLink.objects.create(user_role=1,
user_suborg=self.suborg,
user_gsoc_year=self.gsoc_year,
email=self.suborg_admin_2_email,
send_notifications=False)

if self.suborg_admin_3_email:
RegLink.objects.create(user_role=1,
user_suborg=self.suborg,
user_gsoc_year=self.gsoc_year,
email=self.suborg_admin_3_email,
send_notifications=False)

s = Scheduler.objects.filter(command='update_site_template',
data=json.dumps({'template': 'index.html'}),
success=None).all()
Expand Down
Binary file modified project.db
Binary file not shown.

0 comments on commit a43010d

Please sign in to comment.