-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(buddy-system): matched requests (#195)
* view with requests for internationals/members <img width="1420" alt="image" src="https://github.com/esnvutbrno/buena-fiesta/assets/6154740/99736ad2-98b4-4124-96aa-b5324d931d6e"> <img width="1420" alt="image" src="https://github.com/esnvutbrno/buena-fiesta/assets/6154740/485906d1-99a4-4707-a0a8-fd293f8f9faf"> <img width="1451" alt="image" src="https://github.com/esnvutbrno/buena-fiesta/assets/6154740/adae9aff-5bf0-4199-97ee-768facfb70d0"> <img width="1451" alt="image" src="https://github.com/esnvutbrno/buena-fiesta/assets/6154740/49463a10-167b-4d6e-a41a-e6b85ad5c96e">
- Loading branch information
Showing
41 changed files
with
757 additions
and
299 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
19 changes: 19 additions & 0 deletions
19
fiesta/apps/accounts/migrations/0017_alter_userprofile_instagram.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,19 @@ | ||
# Generated by Django 4.2.4 on 2023-09-02 12:04 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('accounts', '0016_userprofile_facebook_userprofile_instagram_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='userprofile', | ||
name='instagram', | ||
field=models.CharField(blank=True, validators=[django.core.validators.RegexValidator('^[\\w\\-_.]+$')], verbose_name='instagram username'), | ||
), | ||
] |
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
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
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
fiesta/apps/buddy_system/migrations/0020_rename_description_buddyrequest_issuer_note.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 4.2.4 on 2023-09-02 12:04 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('buddy_system', '0019_alter_buddyrequest_options'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='buddyrequest', | ||
old_name='description', | ||
new_name='issuer_note', | ||
), | ||
] |
59 changes: 59 additions & 0 deletions
59
fiesta/apps/buddy_system/migrations/0021_remove_buddyrequest_issuer_note_and_more.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,59 @@ | ||
# Generated by Django 4.2.4 on 2023-09-24 19:17 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django_extensions.db.fields | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('buddy_system', '0020_rename_description_buddyrequest_issuer_note'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='buddyrequest', | ||
name='issuer_note', | ||
), | ||
migrations.RemoveField( | ||
model_name='buddyrequest', | ||
name='matched_at', | ||
), | ||
migrations.RemoveField( | ||
model_name='buddyrequest', | ||
name='matched_by', | ||
), | ||
migrations.AddField( | ||
model_name='buddyrequest', | ||
name='note', | ||
field=models.TextField(default='', verbose_name='text from issuer'), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='buddysystemconfiguration', | ||
name='enable_note_from_matcher', | ||
field=models.BooleanField(default=True, help_text='Allows matcher to reply with custom notes to the request issuer'), | ||
), | ||
migrations.CreateModel( | ||
name='BuddyRequestMatch', | ||
fields=[ | ||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('note', models.TextField(blank=True, verbose_name='text from matcher')), | ||
('matcher', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='buddy_system_request_matches', to=settings.AUTH_USER_MODEL, verbose_name='matched by')), | ||
('request', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='match', to='buddy_system.buddyrequest', verbose_name='request')), | ||
], | ||
options={ | ||
'verbose_name': 'buddy request match', | ||
'verbose_name_plural': 'buddy request matches', | ||
'ordering': ('-created',), | ||
'get_latest_by': 'modified', | ||
'abstract': False, | ||
}, | ||
), | ||
] |
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
from __future__ import annotations | ||
|
||
from .configuration import BuddySystemConfiguration | ||
from .request import BuddyRequest | ||
from .request import BuddyRequest, BuddyRequestMatch | ||
|
||
__all__ = [ | ||
"BuddySystemConfiguration", | ||
"BuddyRequest", | ||
"BuddyRequestMatch", | ||
] |
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
Oops, something went wrong.