-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Init * Unpublish project form (#452) * Lay out structure * Make progress * Style menu * Style checkboxes & buttons * Add api call * Make mobile-friendly * Last styling changes * Address styling comments * Remove for non-staff & non-moderators * Add violations backend code (#447) * Add violations backend system * Fix typo * Add new migrations * Basic * Use array * Fix issuesgit status * Swap fetch parameter * Add responses * Add new violation ui for violation notifications * Fix models Co-authored-by: Aditya Jain <[email protected]> * Unpublished Project Modal (#446) * set up modal * style changes * change to label and mobile styles * tiny fix of class style * scrolling * tiny style fix * clean up unused things * overflow scroll bar adjustments * Small style * remove important Co-authored-by: Aditya Jain <[email protected]> * Integrate Co-authored-by: Grace Zhang <[email protected]> Co-authored-by: Andrew Lester <[email protected]> Co-authored-by: Zora Zhang <[email protected]>
- Loading branch information
1 parent
e3e3bbf
commit f73bf35
Showing
32 changed files
with
1,181 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
zubhub_backend/zubhub/creators/migrations/0009_alter_setting_contact.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2 on 2022-04-30 01:48 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('creators', '0008_auto_20220222_0254'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='setting', | ||
name='contact', | ||
field=models.PositiveSmallIntegerField(blank=True, choices=[(1, 'WHATSAPP'), (2, 'EMAIL'), (3, 'SMS'), (4, 'WEB')], default=3, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
zubhub_backend/zubhub/notifications/migrations/0010_alter_notification_type.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2 on 2022-04-30 01:48 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('notifications', '0009_alter_notification_sources'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='notification', | ||
name='type', | ||
field=models.PositiveSmallIntegerField(choices=[(1, 'Bookmark'), (2, 'Clap'), (3, 'Comment'), (4, 'Follow'), (5, 'Following Project'), (6, 'Project Violation')]), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
zubhub_backend/zubhub/projects/management/commands/populate_violation_reasons.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from projects.models import ViolationReason | ||
from django.core.management.base import BaseCommand | ||
|
||
|
||
class Command(BaseCommand): | ||
help = 'Populate ViolationReason table with violation reasons' | ||
|
||
def handle(self, *args, **kwargs): | ||
if ViolationReason.objects.all().count() < 1: | ||
with open( | ||
"./zubhub/projects/management/commands/violation_reasons.txt", | ||
"r") as violation_reasons: | ||
violation_reasons = violation_reasons.readlines() | ||
for violation_reason in violation_reasons: | ||
self.stdout.write(violation_reason) | ||
ViolationReason.objects.create( | ||
description=violation_reason.split("\n")[0]) | ||
self.stdout.write( | ||
self.style.SUCCESS( | ||
'The ViolationReason table has been successfully populated!' | ||
)) | ||
else: | ||
self.stdout.write( | ||
self.style.NOTICE( | ||
'The ViolationReason table is already populated')) |
7 changes: 7 additions & 0 deletions
7
zubhub_backend/zubhub/projects/management/commands/violation_reasons.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Promotes bigotry, discrimination, hatred, or violence against any individual or group; | ||
Threatens, harasses, or intimidates any other person, whether that person is a ZubHub user or not; | ||
Contains foul language or personal attacks; | ||
Contains sexually explicit or graphically violent material; | ||
Provides instructions on how to commit illegal activities or obtain illegal products; | ||
Asks any other user for personally identifying information, contact information, or passwords; or | ||
Exposes any others person's personally identifying information, contact information, or passwords without that person's permission. |
Oops, something went wrong.