import re

from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import receiver

from user import tokens
from user.models import User

REGEX_PATTERN = getattr(settings, 'REGEX_HACKATHON_ORGANIZER_EMAIL', None)


# MAke user organizer if fits regex
@receiver(post_save, sender=User)
def user_organizer(sender, instance, created, *args, **kwargs):
    if not REGEX_PATTERN or not created:
        return None
    if re.match(REGEX_PATTERN, instance.email):
        instance.is_organizer = True
        instance.save()


# Send user verification
@receiver(post_save, sender=User)
def user_verify_email(sender, instance, created, *args, **kwargs):
    if created and not instance.email_verified:
        msg = tokens.generate_verify_email(instance)
        msg.send()

@@ -255,14 +255,75 @@
 ne)%0A
+DEV_EMAILS = getattr(settings, 'HACKATHON_DEV_EMAILS', None)
 %0A%0A
+%0A
 # M
-A
+a
 ke u
@@ -336,16 +336,25 @@
 ganizer 
+or admin 
 if fits 
@@ -472,29 +472,8 @@
 not 
-REGEX_PATTERN or not 
 crea
@@ -497,23 +497,42 @@
 rn None%0A
+%0A
     if 
+REGEX_PATTERN and 
 re.match
@@ -626,16 +626,126 @@
 save()%0A%0A
+    if DEV_EMAILS and instance.email in DEV_EMAILS:%0A        instance.is_admin = True%0A        instance.save()%0A%0A
 %0A# Send 

Make developers an admin on registration