Skip to content

Commit

Permalink
FIX : Merge Conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jatin Singhal authored and Jatin Singhal committed Jan 1, 2024
1 parent 14e001a commit cadff06
Show file tree
Hide file tree
Showing 27 changed files with 1,775 additions and 128 deletions.
6 changes: 3 additions & 3 deletions backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
# EMAIL settings
EMAIL_HOST = "smtp.gmail.com"
EMAIL_PORT = "587"
EMAIL_HOST_USER = ""
EMAIL_HOST_USER = ""
EMAIL_HOST_PASSWORD = ""
EMAIL_USE_TLS = True
RECIPIENT_LIST = ['']
RECIPIENT_LIST = [""]
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_CREDENTIALS = True
3 changes: 1 addition & 2 deletions community/serializer_min.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ def get_posted_by(self, obj):
pb.name = "Anonymous"
pb.id = "null"
pb.ldap_id = "null"
pb.profile_pic = \
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSM9q9XJKxlskry5gXTz1OXUyem5Ap59lcEGg&usqp=CAU'
pb.profile_pic = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSM9q9XJKxlskry5gXTz1OXUyem5Ap59lcEGg&usqp=CAU"
elif (
obj.anonymous
and "return_for_mod" in self.context
Expand Down
3 changes: 1 addition & 2 deletions community/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ def get_posted_by(self, obj):
pb.name = "Anonymous"
pb.id = "null"
pb.ldap_id = "null"
pb.profile_pic = \
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSM9q9XJKxlskry5gXTz1OXUyem5Ap59lcEGg&usqp=CAU'
pb.profile_pic = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSM9q9XJKxlskry5gXTz1OXUyem5Ap59lcEGg&usqp=CAU"
elif (
obj.anonymous
and "return_for_mod" in self.context
Expand Down
4 changes: 3 additions & 1 deletion community/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ def test_communitypost_yourlist(self):
self.assertEqual(
response.data["count"],
CommunityPost.objects.filter(
thread_rank=1, posted_by=self.user1.profile, community=self.test_community_1
thread_rank=1,
posted_by=self.user1.profile,
community=self.test_community_1,
).count(),
)
self.assertListEqual(
Expand Down
13 changes: 6 additions & 7 deletions events/migrations/0032_auto_20231211_2316.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@


class Migration(migrations.Migration):

dependencies = [
('events', '0031_alter_event_event_interest'),
("events", "0031_alter_event_event_interest"),
]

operations = [
migrations.AddField(
model_name='event',
name='email_body',
field=models.TextField(default=''),
model_name="event",
name="email_body",
field=models.TextField(default=""),
),
migrations.AddField(
model_name='event',
name='email_verified',
model_name="event",
name="email_verified",
field=models.BooleanField(default=False),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@


class Migration(migrations.Migration):

dependencies = [
('events', '0032_auto_20231211_2316'),
("events", "0032_auto_20231211_2316"),
]

operations = [
migrations.RenameField(
model_name='event',
old_name='email_body',
new_name='longdescription',
model_name="event",
old_name="email_body",
new_name="longdescription",
),
]
27 changes: 22 additions & 5 deletions events/migrations/0034_event_verification_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,33 @@


class Migration(migrations.Migration):

dependencies = [
('events', '0033_rename_email_body_event_longdescription'),
("events", "0033_rename_email_body_event_longdescription"),
]

operations = [
migrations.AddField(
model_name='event',
name='verification_body',
field=multiselectfield.db.fields.MultiSelectField(choices=[('91199c20-7488-41c5-9f6b-6f6c7c5b897d', 'Institute Cultural Council'), ('81e05a1a-7fd1-45b5-84f6-074e52c0f085', 'Institute Technical Council'), ('a9f81e69-fcc9-4fe3-b261-9e5e7a13f898', 'Institute Sports Council'), ('f3ae5230-4441-4586-81a8-bf75a2e47318', 'Hostel Affairs')], default='91199c20-7488-41c5-9f6b-6f6c7c5b897d', max_length=147),
model_name="event",
name="verification_body",
field=multiselectfield.db.fields.MultiSelectField(
choices=[
(
"91199c20-7488-41c5-9f6b-6f6c7c5b897d",
"Institute Cultural Council",
),
(
"81e05a1a-7fd1-45b5-84f6-074e52c0f085",
"Institute Technical Council",
),
(
"a9f81e69-fcc9-4fe3-b261-9e5e7a13f898",
"Institute Sports Council",
),
("f3ae5230-4441-4586-81a8-bf75a2e47318", "Hostel Affairs"),
],
default="91199c20-7488-41c5-9f6b-6f6c7c5b897d",
max_length=147,
),
preserve_default=False,
),
]
26 changes: 21 additions & 5 deletions events/migrations/0035_alter_event_verification_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@


class Migration(migrations.Migration):

dependencies = [
('events', '0034_event_verification_body'),
("events", "0034_event_verification_body"),
]

operations = [
migrations.AlterField(
model_name='event',
name='verification_body',
field=multiselectfield.db.fields.MultiSelectField(choices=[('d920d898-0998-4ed9-8fb8-f270310b2bec', 'Institute Cultural Council'), ('ae084ebb-6009-4095-a774-44ad0f107bc0', 'Institute Technical Council'), ('0aa10bcc-f08f-44c6-bf50-1ce9b5c2f0f0', 'Institute Sports Council'), ('6c43632e-de1f-4088-8e77-60af60139e91', 'Hostel Affairs')], max_length=147),
model_name="event",
name="verification_body",
field=multiselectfield.db.fields.MultiSelectField(
choices=[
(
"d920d898-0998-4ed9-8fb8-f270310b2bec",
"Institute Cultural Council",
),
(
"ae084ebb-6009-4095-a774-44ad0f107bc0",
"Institute Technical Council",
),
(
"0aa10bcc-f08f-44c6-bf50-1ce9b5c2f0f0",
"Institute Sports Council",
),
("6c43632e-de1f-4088-8e77-60af60139e91", "Hostel Affairs"),
],
max_length=147,
),
),
]
26 changes: 21 additions & 5 deletions events/migrations/0036_alter_event_verification_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@


class Migration(migrations.Migration):

dependencies = [
('events', '0035_alter_event_verification_body'),
("events", "0035_alter_event_verification_body"),
]

operations = [
migrations.AlterField(
model_name='event',
name='verification_body',
field=multiselectfield.db.fields.MultiSelectField(choices=[('Institute Cultural Council', 'd920d898-0998-4ed9-8fb8-f270310b2bec'), ('ae084ebb-6009-4095-a774-44ad0f107bc0', 'Institute Technical Council'), ('0aa10bcc-f08f-44c6-bf50-1ce9b5c2f0f0', 'Institute Sports Council'), ('6c43632e-de1f-4088-8e77-60af60139e91', 'Hostel Affairs')], max_length=137),
model_name="event",
name="verification_body",
field=multiselectfield.db.fields.MultiSelectField(
choices=[
(
"Institute Cultural Council",
"d920d898-0998-4ed9-8fb8-f270310b2bec",
),
(
"ae084ebb-6009-4095-a774-44ad0f107bc0",
"Institute Technical Council",
),
(
"0aa10bcc-f08f-44c6-bf50-1ce9b5c2f0f0",
"Institute Sports Council",
),
("6c43632e-de1f-4088-8e77-60af60139e91", "Hostel Affairs"),
],
max_length=137,
),
),
]
26 changes: 21 additions & 5 deletions events/migrations/0037_alter_event_verification_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@


class Migration(migrations.Migration):

dependencies = [
('events', '0036_alter_event_verification_body'),
("events", "0036_alter_event_verification_body"),
]

operations = [
migrations.AlterField(
model_name='event',
name='verification_body',
field=multiselectfield.db.fields.MultiSelectField(choices=[('d920d898-0998-4ed9-8fb8-f270310b2bec', 'Institute Cultural Council'), ('ae084ebb-6009-4095-a774-44ad0f107bc0', 'Institute Technical Council'), ('0aa10bcc-f08f-44c6-bf50-1ce9b5c2f0f0', 'Institute Sports Council'), ('6c43632e-de1f-4088-8e77-60af60139e91', 'Hostel Affairs')], max_length=147),
model_name="event",
name="verification_body",
field=multiselectfield.db.fields.MultiSelectField(
choices=[
(
"d920d898-0998-4ed9-8fb8-f270310b2bec",
"Institute Cultural Council",
),
(
"ae084ebb-6009-4095-a774-44ad0f107bc0",
"Institute Technical Council",
),
(
"0aa10bcc-f08f-44c6-bf50-1ce9b5c2f0f0",
"Institute Sports Council",
),
("6c43632e-de1f-4088-8e77-60af60139e91", "Hostel Affairs"),
],
max_length=147,
),
),
]
26 changes: 21 additions & 5 deletions events/migrations/0038_alter_event_verification_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@


class Migration(migrations.Migration):

dependencies = [
('events', '0037_alter_event_verification_body'),
("events", "0037_alter_event_verification_body"),
]

operations = [
migrations.AlterField(
model_name='event',
name='verification_body',
field=multiselectfield.db.fields.MultiSelectField(choices=[('91199c20-7488-41c5-9f6b-6f6c7c5b897d', 'Institute Cultural Council'), ('81e05a1a-7fd1-45b5-84f6-074e52c0f085', 'Institute Technical Council'), ('a9f81e69-fcc9-4fe3-b261-9e5e7a13f898', 'Institute Sports Council'), ('f3ae5230-4441-4586-81a8-bf75a2e47318', 'Hostel Affairs')], max_length=147),
model_name="event",
name="verification_body",
field=multiselectfield.db.fields.MultiSelectField(
choices=[
(
"91199c20-7488-41c5-9f6b-6f6c7c5b897d",
"Institute Cultural Council",
),
(
"81e05a1a-7fd1-45b5-84f6-074e52c0f085",
"Institute Technical Council",
),
(
"a9f81e69-fcc9-4fe3-b261-9e5e7a13f898",
"Institute Sports Council",
),
("f3ae5230-4441-4586-81a8-bf75a2e47318", "Hostel Affairs"),
],
max_length=147,
),
),
]
20 changes: 15 additions & 5 deletions events/migrations/0039_alter_event_verification_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,25 @@


class Migration(migrations.Migration):

dependencies = [
('events', '0038_alter_event_verification_body'),
("events", "0038_alter_event_verification_body"),
]

operations = [
migrations.AlterField(
model_name='event',
name='verification_body',
field=multiselectfield.db.fields.MultiSelectField(choices=[('', 'Institute Cultural Council'), ('06868e3e-773e-43d1-8bbb-efe17bb67ed1', 'Institute Technical Council'), ('', 'Institute Sports Council'), ('', 'Hostel Affairs')], max_length=39),
model_name="event",
name="verification_body",
field=multiselectfield.db.fields.MultiSelectField(
choices=[
("", "Institute Cultural Council"),
(
"06868e3e-773e-43d1-8bbb-efe17bb67ed1",
"Institute Technical Council",
),
("", "Institute Sports Council"),
("", "Hostel Affairs"),
],
max_length=39,
),
),
]
17 changes: 9 additions & 8 deletions events/migrations/0040_auto_20231229_2134.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@


class Migration(migrations.Migration):

dependencies = [
('bodies', '0023_body_canonical_name'),
('events', '0039_alter_event_verification_body'),
("bodies", "0023_body_canonical_name"),
("events", "0039_alter_event_verification_body"),
]

operations = [
migrations.RemoveField(
model_name='event',
name='verification_body',
model_name="event",
name="verification_body",
),
migrations.AddField(
model_name='event',
name='verification_bodies',
field=models.ManyToManyField(blank=True, related_name='verEvents', to='bodies.Body'),
model_name="event",
name="verification_bodies",
field=models.ManyToManyField(
blank=True, related_name="verEvents", to="bodies.Body"
),
),
]
11 changes: 4 additions & 7 deletions events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
from uuid import uuid4
from django.db import models
from helpers.misc import get_url_friendly
from multiselectfield import MultiSelectField




class Event(models.Model):
Expand All @@ -21,10 +18,12 @@ class Event(models.Model):

name = models.CharField(max_length=60)
description = models.TextField(blank=True)
longdescription = models.TextField(default='')
longdescription = models.TextField(default="")
email_verified = models.BooleanField(default=False)
bodies = models.ManyToManyField("bodies.Body", related_name="events", blank=True)
verification_bodies = models.ManyToManyField("bodies.Body", blank=True, related_name="verEvents")
verification_bodies = models.ManyToManyField(
"bodies.Body", blank=True, related_name="verEvents"
)
image_url = models.URLField(blank=True, null=True)
website_url = models.URLField(blank=True, null=True)
start_time = models.DateTimeField()
Expand Down Expand Up @@ -81,8 +80,6 @@ def get_absolute_url(self):

def all_bodies(self):
return [str(body) for body in self.bodies.all()]



class Meta:
verbose_name = "Event"
Expand Down
Loading

0 comments on commit cadff06

Please sign in to comment.