Skip to content

Commit

Permalink
confirm delete phone app
Browse files Browse the repository at this point in the history
  • Loading branch information
biomystery committed Jun 4, 2019
1 parent df5042f commit 99fe94e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
53 changes: 28 additions & 25 deletions epigen_ucsd_django/models.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
from django.db import models
from django.contrib.auth.models import User,Group
from phonenumber_field.modelfields import PhoneNumberField
from django.contrib.auth.models import User, Group
from django.contrib.postgres.fields import ArrayField

choice_for_roles = (
('PI','PI'),
('other','other'),
)
choice_for_institution = ['UCSD','Pfizer','other']
('PI', 'PI'),
('other', 'other'),
)
choice_for_institution = ['UCSD', 'Pfizer', 'other']


class CollaboratorPersonInfo(models.Model):
person_id = models.ForeignKey(User, on_delete=models.CASCADE,blank=True, null=True)
group = models.ForeignKey(Group, on_delete=models.CASCADE, blank=True, null=True)
cell_phone = models.CharField('phone',max_length=200,blank=True,null=True)
#email = models.EmailField(max_length=254,blank=True,null=True)
email = ArrayField(models.EmailField(max_length=254), blank=True,null=True)
phone = ArrayField(models.CharField('phone',max_length=200), blank=True,null=True)
index = ArrayField(models.CharField(max_length=200), blank=True,null=True)
initial_password = models.CharField(max_length=200,blank=True,null=True)
#fiscal_index = models.CharField(max_length=200,blank=True,null=True)
role_choice = choice_for_roles
role = models.CharField(max_length=200,choices=role_choice)
notes = models.TextField(blank=True)
class Meta:
unique_together = ('person_id','group')
person_id = models.ForeignKey(
User, on_delete=models.CASCADE, blank=True, null=True)
group = models.ForeignKey(
Group, on_delete=models.CASCADE, blank=True, null=True)
cell_phone = models.CharField(
'phone', max_length=200, blank=True, null=True)
#email = models.EmailField(max_length=254,blank=True,null=True)
email = ArrayField(models.EmailField(
max_length=254), blank=True, null=True)
phone = ArrayField(models.CharField(
'phone', max_length=200), blank=True, null=True)
index = ArrayField(models.CharField(max_length=200), blank=True, null=True)
initial_password = models.CharField(max_length=200, blank=True, null=True)
role_choice = choice_for_roles
role = models.CharField(max_length=200, choices=role_choice)
notes = models.TextField(blank=True)

class Meta:
unique_together = ('person_id', 'group')

# class Person_Index(models.Model):
# index_name = models.CharField(max_length=200,blank=True,null=True)
# person = models.ForeignKey(CollaboratorPersonInfo, on_delete=models.CASCADE,blank=True,null=True)
# class Meta:
# unique_together = ('index_name','person')

class Group_Institution(models.Model):
group = models.ForeignKey(Group, on_delete=models.CASCADE, blank=True, null=True)
institution = models.CharField(max_length=50)



class Group_Institution(models.Model):
group = models.ForeignKey(
Group, on_delete=models.CASCADE, blank=True, null=True)
institution = models.CharField(max_length=50)
2 changes: 0 additions & 2 deletions epigen_ucsd_django/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'phonenumber_field',
'nextseq_app',
'setqc_app',
'masterseq_app',
Expand Down Expand Up @@ -108,7 +107,6 @@
# }



DATABASES = {
'default': {
'ENGINE': config['database']['DATABASE_ENGINE'],
Expand Down

0 comments on commit 99fe94e

Please sign in to comment.