Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PGHOST='ep-crimson-sky-a11pn6g7.ap-southeast-1.aws.neon.tech'
PGDATABASE='cebu_biosys'
PGUSER='cebu_biosys_owner'
PGPASSWORD='fN04GWIKeZnw'

AWS_ACCESS_KEY_ID='AKIAWOUNMQK7Q5KG3LEM'
AWS_SECRET_ACCESS_KEY='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'
AWS_STORAGE_BUCKET_NAME='cebubiosys'
AWS_S3_REGION_NAME='ap-southeast-1' # Optional
Binary file modified accounts/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/admin.cpython-312.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/apps.cpython-312.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/forms.cpython-312.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/models.cpython-312.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/urls.cpython-312.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/views.cpython-312.pyc
Binary file not shown.
175 changes: 39 additions & 136 deletions accounts/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,164 +1,67 @@
# Generated by Django 5.0.2 on 2024-02-13 03:21
# Generated by Django 5.0.2 on 2024-06-03 16:21

import django.contrib.auth.models
import django.contrib.auth.validators
import django.db.models.deletion
import django.utils.timezone
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
("auth", "0012_alter_user_first_name_max_length"),
('auth', '0012_alter_user_first_name_max_length'),
]

operations = [
migrations.CreateModel(
name="Organization",
name='Organization',
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('logo', models.ImageField(null=True, upload_to='logo')),
('name', models.CharField(default='Unnamed Organization', help_text='Name of the organization', max_length=255, unique=True)),
('description', models.TextField(blank=True, help_text='Description of the organization and its focus on biodiversity research', null=True)),
('website', models.URLField(blank=True, help_text='Website of the organization', null=True)),
('email', models.EmailField(blank=True, help_text='Email contact of the organization', max_length=254, null=True)),
('address', models.TextField(blank=True, help_text='Physical address of the organization', null=True)),
('org_uid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
],
),
migrations.CreateModel(
name="Researcher",
name='Researcher',
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("password", models.CharField(max_length=128, verbose_name="password")),
(
"last_login",
models.DateTimeField(
blank=True, null=True, verbose_name="last login"
),
),
(
"is_superuser",
models.BooleanField(
default=False,
help_text="Designates that this user has all permissions without explicitly assigning them.",
verbose_name="superuser status",
),
),
(
"username",
models.CharField(
error_messages={
"unique": "A user with that username already exists."
},
help_text="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
max_length=150,
unique=True,
validators=[
django.contrib.auth.validators.UnicodeUsernameValidator()
],
verbose_name="username",
),
),
(
"first_name",
models.CharField(
blank=True, max_length=150, verbose_name="first name"
),
),
(
"last_name",
models.CharField(
blank=True, max_length=150, verbose_name="last name"
),
),
(
"email",
models.EmailField(
blank=True, max_length=254, verbose_name="email address"
),
),
(
"is_staff",
models.BooleanField(
default=False,
help_text="Designates whether the user can log into this admin site.",
verbose_name="staff status",
),
),
(
"is_active",
models.BooleanField(
default=True,
help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.",
verbose_name="active",
),
),
(
"date_joined",
models.DateTimeField(
default=django.utils.timezone.now, verbose_name="date joined"
),
),
(
"researcher_id",
models.CharField(editable=False, max_length=26, unique=True),
),
("course", models.CharField(max_length=255)),
("bio", models.TextField()),
("facebook", models.URLField(blank=True, null=True)),
("twitter", models.URLField(blank=True, null=True)),
("linkedin", models.URLField(blank=True, null=True)),
(
"groups",
models.ManyToManyField(
blank=True,
help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.",
related_name="user_set",
related_query_name="user",
to="auth.group",
verbose_name="groups",
),
),
(
"user_permissions",
models.ManyToManyField(
blank=True,
help_text="Specific permissions for this user.",
related_name="user_set",
related_query_name="user",
to="auth.permission",
verbose_name="user permissions",
),
),
(
"organization",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
to="accounts.organization",
),
),
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('researcher_id', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
('course', models.CharField(max_length=255)),
('bio', models.TextField()),
('facebook', models.URLField(blank=True, null=True)),
('twitter', models.URLField(blank=True, null=True)),
('linkedin', models.URLField(blank=True, null=True)),
('profile_pic', models.ImageField(null=True, upload_to='profiles')),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='members', to='accounts.organization')),
],
options={
"verbose_name": "user",
"verbose_name_plural": "users",
"abstract": False,
'verbose_name': 'user',
'verbose_name_plural': 'users',
'abstract': False,
},
managers=[
("objects", django.contrib.auth.models.UserManager()),
('objects', django.contrib.auth.models.UserManager()),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 5.0.2 on 2024-06-04 16:26

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('accounts', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='researcher',
name='is_org_account',
field=models.BooleanField(blank=True, default=False, null=True),
),
migrations.AddField(
model_name='researcher',
name='org_description',
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name='researcher',
name='website',
field=models.URLField(blank=True, null=True),
),
]

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 5.0.2 on 2024-06-05 19:27

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('accounts', '0002_researcher_is_org_account_researcher_org_description_and_more'),
]

operations = [
migrations.RemoveField(
model_name='researcher',
name='organization',
),
migrations.AddField(
model_name='researcher',
name='organizations',
field=models.ManyToManyField(blank=True, related_name='members', to='accounts.organization'),
),
]
24 changes: 0 additions & 24 deletions accounts/migrations/0004_alter_researcher_organization.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 5.0.2 on 2024-06-06 12:29

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('accounts', '0003_remove_researcher_organization_and_more'),
]

operations = [
migrations.AddField(
model_name='researcher',
name='address',
field=models.TextField(blank=True, help_text='Physical address of the organization', null=True),
),
migrations.AddField(
model_name='researcher',
name='is_complete_profile',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='researcher',
name='org_name',
field=models.CharField(default='Unnamed Organization', help_text='Name of the organization', max_length=255, null=True, unique=True),
),
]
18 changes: 18 additions & 0 deletions accounts/migrations/0005_alter_researcher_org_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.2 on 2024-06-06 12:30

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('accounts', '0004_researcher_address_researcher_is_complete_profile_and_more'),
]

operations = [
migrations.AlterField(
model_name='researcher',
name='org_name',
field=models.CharField(blank=True, max_length=255, null=True),
),
]
Loading