Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(user)/user bio #758

Merged
merged 40 commits into from
Apr 16, 2024
Merged

Feat(user)/user bio #758

merged 40 commits into from
Apr 16, 2024

Conversation

haruixu
Copy link
Contributor

@haruixu haruixu commented Jan 29, 2024

Proposed changes

  • Bio for bruker som inneholder: beskrivelse, github-link og linkedin-link
  • Skal senere implementere en egen HS-side

Issue number: closes #

Pull request checklist

Please check if your PR fulfills the following requirements:

  • CHANGELOG.md has been updated. Guide
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • The fixtures have been updated if needed (for migrations)

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@haruixu haruixu marked this pull request as ready for review February 19, 2024 18:12
@haruixu haruixu requested a review from MadsNyl February 19, 2024 18:12
@haruixu haruixu assigned martcl and JarandJR and unassigned martcl and JarandJR Feb 19, 2024
@MadsNyl MadsNyl self-requested a review February 20, 2024 10:55
@MadsNyl MadsNyl dismissed their stale review February 20, 2024 10:56

Er good nå

Copy link
Contributor

@MadsNyl MadsNyl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MadsNyl MadsNyl merged commit bfa2299 into dev Apr 16, 2024
7 checks passed
@MadsNyl MadsNyl deleted the feat(user)/user-bio branch April 16, 2024 07:13
MadsNyl added a commit that referenced this pull request Apr 16, 2024
* Feat(kontres)/add image to bookable item (#785)

* added optional image to bookable item model

* added update method in serializer to handle new images

* linting

* remove update method for images

* Feat(kontres)/add approved by (#786)

* added approved by field

* endpoint will now set approved by

* serializer will return full user object in approved_by_detail

* created test for approved by

* migration

* remove unnecessary code

* removed write-only field in approved-by context

* Create minutes for Codex (#787)

* init

* format

* Feat(minute)/viewset (#788)

* added richer reponse on post and put

* added to admin panel

* added filter for minute

* Feat(kontres)/add notification (#790)

* created methods for sending notification to admin and user

* endpoint will now send notification if needed

* add migrations for new notification types

* Memberships with fines activated (#791)

init

* Feat(user)/user bio (#758)

* Created model, serializer and view for user-bio

* Created user bio model and made migrations

* Created user bio serializer + viewsets + added new endpoint

* Tested create method + added bio serializer to user serializer

* Format

* Created update method and started testing

* Debugging test failures in user retrieve

* fixed model error

* Created user_bio_factory + started testing put method

* Created fixture for UserBio

* Created custom excpetion for duplicate user bio

* Added permissions and inherited from BaseModel

* Modularized serializer for bio

* Use correct serializers in viewset + added destroy method

* Finished testing bio viewset integration + format

* Changed environent file to .env to avoid pushing up keys

* Fix: Flipped assertion statement in test, since user bio should not be deleted

* skiped buggy test from kontres

* added mark to pytest.skip

* Moved keys to .env file and reverted docker variables

* Skip buggy kontres test

* format

* Added str method to user_bio

* Removed unused imports

* format

* Changed user relation to a OneToOne-field (same affect as ForeignKey(unique=True) + removed check for duplicate bio in serializer

* Migrations + changed assertion status code in duplicate bio test (could try catch in serializer to produce 400 status code)

* format

* format

* Changed limit for description 50 -> 500 + migrations

* Migrate

* added id to serializer

* merged leaf nodes in migrations

* format

---------

Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Mads Nylund <madsnyl@gmail.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>

* Update CHANGELOG.md

---------

Co-authored-by: Erik Skjellevik <98759397+eriskjel@users.noreply.github.com>
Co-authored-by: haruixu <114171733+haruixu@users.noreply.github.com>
Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>
MadsNyl added a commit that referenced this pull request Apr 17, 2024
* Feat(kontres)/add image to bookable item (#785)

* added optional image to bookable item model

* added update method in serializer to handle new images

* linting

* remove update method for images

* Feat(kontres)/add approved by (#786)

* added approved by field

* endpoint will now set approved by

* serializer will return full user object in approved_by_detail

* created test for approved by

* migration

* remove unnecessary code

* removed write-only field in approved-by context

* Create minutes for Codex (#787)

* init

* format

* Feat(minute)/viewset (#788)

* added richer reponse on post and put

* added to admin panel

* added filter for minute

* Feat(kontres)/add notification (#790)

* created methods for sending notification to admin and user

* endpoint will now send notification if needed

* add migrations for new notification types

* Memberships with fines activated (#791)

init

* Feat(user)/user bio (#758)

* Created model, serializer and view for user-bio

* Created user bio model and made migrations

* Created user bio serializer + viewsets + added new endpoint

* Tested create method + added bio serializer to user serializer

* Format

* Created update method and started testing

* Debugging test failures in user retrieve

* fixed model error

* Created user_bio_factory + started testing put method

* Created fixture for UserBio

* Created custom excpetion for duplicate user bio

* Added permissions and inherited from BaseModel

* Modularized serializer for bio

* Use correct serializers in viewset + added destroy method

* Finished testing bio viewset integration + format

* Changed environent file to .env to avoid pushing up keys

* Fix: Flipped assertion statement in test, since user bio should not be deleted

* skiped buggy test from kontres

* added mark to pytest.skip

* Moved keys to .env file and reverted docker variables

* Skip buggy kontres test

* format

* Added str method to user_bio

* Removed unused imports

* format

* Changed user relation to a OneToOne-field (same affect as ForeignKey(unique=True) + removed check for duplicate bio in serializer

* Migrations + changed assertion status code in duplicate bio test (could try catch in serializer to produce 400 status code)

* format

* format

* Changed limit for description 50 -> 500 + migrations

* Migrate

* added id to serializer

* merged leaf nodes in migrations

* format

---------

Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Mads Nylund <madsnyl@gmail.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>

* Update CHANGELOG.md

* added filter for allowed photos for user (#794)

added filter for allowed photos

---------

Co-authored-by: Erik Skjellevik <98759397+eriskjel@users.noreply.github.com>
Co-authored-by: haruixu <114171733+haruixu@users.noreply.github.com>
Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>
MadsNyl added a commit that referenced this pull request Apr 17, 2024
* Feat(kontres)/add image to bookable item (#785)

* added optional image to bookable item model

* added update method in serializer to handle new images

* linting

* remove update method for images

* Feat(kontres)/add approved by (#786)

* added approved by field

* endpoint will now set approved by

* serializer will return full user object in approved_by_detail

* created test for approved by

* migration

* remove unnecessary code

* removed write-only field in approved-by context

* Create minutes for Codex (#787)

* init

* format

* Feat(minute)/viewset (#788)

* added richer reponse on post and put

* added to admin panel

* added filter for minute

* Feat(kontres)/add notification (#790)

* created methods for sending notification to admin and user

* endpoint will now send notification if needed

* add migrations for new notification types

* Memberships with fines activated (#791)

init

* Feat(user)/user bio (#758)

* Created model, serializer and view for user-bio

* Created user bio model and made migrations

* Created user bio serializer + viewsets + added new endpoint

* Tested create method + added bio serializer to user serializer

* Format

* Created update method and started testing

* Debugging test failures in user retrieve

* fixed model error

* Created user_bio_factory + started testing put method

* Created fixture for UserBio

* Created custom excpetion for duplicate user bio

* Added permissions and inherited from BaseModel

* Modularized serializer for bio

* Use correct serializers in viewset + added destroy method

* Finished testing bio viewset integration + format

* Changed environent file to .env to avoid pushing up keys

* Fix: Flipped assertion statement in test, since user bio should not be deleted

* skiped buggy test from kontres

* added mark to pytest.skip

* Moved keys to .env file and reverted docker variables

* Skip buggy kontres test

* format

* Added str method to user_bio

* Removed unused imports

* format

* Changed user relation to a OneToOne-field (same affect as ForeignKey(unique=True) + removed check for duplicate bio in serializer

* Migrations + changed assertion status code in duplicate bio test (could try catch in serializer to produce 400 status code)

* format

* format

* Changed limit for description 50 -> 500 + migrations

* Migrate

* added id to serializer

* merged leaf nodes in migrations

* format

---------

Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Mads Nylund <madsnyl@gmail.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>

* Update CHANGELOG.md

* added filter for allowed photos for user (#794)

added filter for allowed photos

* Upped payment time when coming from waiting list (#796)

---------

Co-authored-by: Erik Skjellevik <98759397+eriskjel@users.noreply.github.com>
Co-authored-by: haruixu <114171733+haruixu@users.noreply.github.com>
Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>
MadsNyl added a commit that referenced this pull request Apr 17, 2024
* Feat(kontres)/add image to bookable item (#785)

* added optional image to bookable item model

* added update method in serializer to handle new images

* linting

* remove update method for images

* Feat(kontres)/add approved by (#786)

* added approved by field

* endpoint will now set approved by

* serializer will return full user object in approved_by_detail

* created test for approved by

* migration

* remove unnecessary code

* removed write-only field in approved-by context

* Create minutes for Codex (#787)

* init

* format

* Feat(minute)/viewset (#788)

* added richer reponse on post and put

* added to admin panel

* added filter for minute

* Feat(kontres)/add notification (#790)

* created methods for sending notification to admin and user

* endpoint will now send notification if needed

* add migrations for new notification types

* Memberships with fines activated (#791)

init

* Feat(user)/user bio (#758)

* Created model, serializer and view for user-bio

* Created user bio model and made migrations

* Created user bio serializer + viewsets + added new endpoint

* Tested create method + added bio serializer to user serializer

* Format

* Created update method and started testing

* Debugging test failures in user retrieve

* fixed model error

* Created user_bio_factory + started testing put method

* Created fixture for UserBio

* Created custom excpetion for duplicate user bio

* Added permissions and inherited from BaseModel

* Modularized serializer for bio

* Use correct serializers in viewset + added destroy method

* Finished testing bio viewset integration + format

* Changed environent file to .env to avoid pushing up keys

* Fix: Flipped assertion statement in test, since user bio should not be deleted

* skiped buggy test from kontres

* added mark to pytest.skip

* Moved keys to .env file and reverted docker variables

* Skip buggy kontres test

* format

* Added str method to user_bio

* Removed unused imports

* format

* Changed user relation to a OneToOne-field (same affect as ForeignKey(unique=True) + removed check for duplicate bio in serializer

* Migrations + changed assertion status code in duplicate bio test (could try catch in serializer to produce 400 status code)

* format

* format

* Changed limit for description 50 -> 500 + migrations

* Migrate

* added id to serializer

* merged leaf nodes in migrations

* format

---------

Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Mads Nylund <madsnyl@gmail.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>

* Update CHANGELOG.md

* added filter for allowed photos for user (#794)

added filter for allowed photos

* Upped payment time when coming from waiting list (#796)

* fixed paymenttime saved to db (#798)

---------

Co-authored-by: Erik Skjellevik <98759397+eriskjel@users.noreply.github.com>
Co-authored-by: haruixu <114171733+haruixu@users.noreply.github.com>
Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>
MadsNyl added a commit that referenced this pull request Apr 17, 2024
* Feat(kontres)/add image to bookable item (#785)

* added optional image to bookable item model

* added update method in serializer to handle new images

* linting

* remove update method for images

* Feat(kontres)/add approved by (#786)

* added approved by field

* endpoint will now set approved by

* serializer will return full user object in approved_by_detail

* created test for approved by

* migration

* remove unnecessary code

* removed write-only field in approved-by context

* Create minutes for Codex (#787)

* init

* format

* Feat(minute)/viewset (#788)

* added richer reponse on post and put

* added to admin panel

* added filter for minute

* Feat(kontres)/add notification (#790)

* created methods for sending notification to admin and user

* endpoint will now send notification if needed

* add migrations for new notification types

* Memberships with fines activated (#791)

init

* Feat(user)/user bio (#758)

* Created model, serializer and view for user-bio

* Created user bio model and made migrations

* Created user bio serializer + viewsets + added new endpoint

* Tested create method + added bio serializer to user serializer

* Format

* Created update method and started testing

* Debugging test failures in user retrieve

* fixed model error

* Created user_bio_factory + started testing put method

* Created fixture for UserBio

* Created custom excpetion for duplicate user bio

* Added permissions and inherited from BaseModel

* Modularized serializer for bio

* Use correct serializers in viewset + added destroy method

* Finished testing bio viewset integration + format

* Changed environent file to .env to avoid pushing up keys

* Fix: Flipped assertion statement in test, since user bio should not be deleted

* skiped buggy test from kontres

* added mark to pytest.skip

* Moved keys to .env file and reverted docker variables

* Skip buggy kontres test

* format

* Added str method to user_bio

* Removed unused imports

* format

* Changed user relation to a OneToOne-field (same affect as ForeignKey(unique=True) + removed check for duplicate bio in serializer

* Migrations + changed assertion status code in duplicate bio test (could try catch in serializer to produce 400 status code)

* format

* format

* Changed limit for description 50 -> 500 + migrations

* Migrate

* added id to serializer

* merged leaf nodes in migrations

* format

---------

Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Mads Nylund <madsnyl@gmail.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>

* Update CHANGELOG.md

* added filter for allowed photos for user (#794)

added filter for allowed photos

* Upped payment time when coming from waiting list (#796)

* fixed paymenttime saved to db (#798)

* fixed bug (#800)

---------

Co-authored-by: Erik Skjellevik <98759397+eriskjel@users.noreply.github.com>
Co-authored-by: haruixu <114171733+haruixu@users.noreply.github.com>
Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>
MadsNyl added a commit that referenced this pull request May 1, 2024
* Feat(kontres)/add image to bookable item (#785)

* added optional image to bookable item model

* added update method in serializer to handle new images

* linting

* remove update method for images

* Feat(kontres)/add approved by (#786)

* added approved by field

* endpoint will now set approved by

* serializer will return full user object in approved_by_detail

* created test for approved by

* migration

* remove unnecessary code

* removed write-only field in approved-by context

* Create minutes for Codex (#787)

* init

* format

* Feat(minute)/viewset (#788)

* added richer reponse on post and put

* added to admin panel

* added filter for minute

* Feat(kontres)/add notification (#790)

* created methods for sending notification to admin and user

* endpoint will now send notification if needed

* add migrations for new notification types

* Memberships with fines activated (#791)

init

* Feat(user)/user bio (#758)

* Created model, serializer and view for user-bio

* Created user bio model and made migrations

* Created user bio serializer + viewsets + added new endpoint

* Tested create method + added bio serializer to user serializer

* Format

* Created update method and started testing

* Debugging test failures in user retrieve

* fixed model error

* Created user_bio_factory + started testing put method

* Created fixture for UserBio

* Created custom excpetion for duplicate user bio

* Added permissions and inherited from BaseModel

* Modularized serializer for bio

* Use correct serializers in viewset + added destroy method

* Finished testing bio viewset integration + format

* Changed environent file to .env to avoid pushing up keys

* Fix: Flipped assertion statement in test, since user bio should not be deleted

* skiped buggy test from kontres

* added mark to pytest.skip

* Moved keys to .env file and reverted docker variables

* Skip buggy kontres test

* format

* Added str method to user_bio

* Removed unused imports

* format

* Changed user relation to a OneToOne-field (same affect as ForeignKey(unique=True) + removed check for duplicate bio in serializer

* Migrations + changed assertion status code in duplicate bio test (could try catch in serializer to produce 400 status code)

* format

* format

* Changed limit for description 50 -> 500 + migrations

* Migrate

* added id to serializer

* merged leaf nodes in migrations

* format

---------

Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Mads Nylund <madsnyl@gmail.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>

* Update CHANGELOG.md

* added filter for allowed photos for user (#794)

added filter for allowed photos

* Upped payment time when coming from waiting list (#796)

* fixed paymenttime saved to db (#798)

* fixed bug (#800)

* Disallow users to unregister when payment is done (#802)

added 400 status code for deleting paid registration

* update changelog

---------

Co-authored-by: Erik Skjellevik <98759397+eriskjel@users.noreply.github.com>
Co-authored-by: haruixu <114171733+haruixu@users.noreply.github.com>
Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>
MadsNyl added a commit that referenced this pull request May 2, 2024
* Feat(kontres)/add image to bookable item (#785)

* added optional image to bookable item model

* added update method in serializer to handle new images

* linting

* remove update method for images

* Feat(kontres)/add approved by (#786)

* added approved by field

* endpoint will now set approved by

* serializer will return full user object in approved_by_detail

* created test for approved by

* migration

* remove unnecessary code

* removed write-only field in approved-by context

* Create minutes for Codex (#787)

* init

* format

* Feat(minute)/viewset (#788)

* added richer reponse on post and put

* added to admin panel

* added filter for minute

* Feat(kontres)/add notification (#790)

* created methods for sending notification to admin and user

* endpoint will now send notification if needed

* add migrations for new notification types

* Memberships with fines activated (#791)

init

* Feat(user)/user bio (#758)

* Created model, serializer and view for user-bio

* Created user bio model and made migrations

* Created user bio serializer + viewsets + added new endpoint

* Tested create method + added bio serializer to user serializer

* Format

* Created update method and started testing

* Debugging test failures in user retrieve

* fixed model error

* Created user_bio_factory + started testing put method

* Created fixture for UserBio

* Created custom excpetion for duplicate user bio

* Added permissions and inherited from BaseModel

* Modularized serializer for bio

* Use correct serializers in viewset + added destroy method

* Finished testing bio viewset integration + format

* Changed environent file to .env to avoid pushing up keys

* Fix: Flipped assertion statement in test, since user bio should not be deleted

* skiped buggy test from kontres

* added mark to pytest.skip

* Moved keys to .env file and reverted docker variables

* Skip buggy kontres test

* format

* Added str method to user_bio

* Removed unused imports

* format

* Changed user relation to a OneToOne-field (same affect as ForeignKey(unique=True) + removed check for duplicate bio in serializer

* Migrations + changed assertion status code in duplicate bio test (could try catch in serializer to produce 400 status code)

* format

* format

* Changed limit for description 50 -> 500 + migrations

* Migrate

* added id to serializer

* merged leaf nodes in migrations

* format

---------

Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Mads Nylund <madsnyl@gmail.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>

* Update CHANGELOG.md

* added filter for allowed photos for user (#794)

added filter for allowed photos

* Upped payment time when coming from waiting list (#796)

* fixed paymenttime saved to db (#798)

* fixed bug (#800)

* Disallow users to unregister when payment is done (#802)

added 400 status code for deleting paid registration

* update changelog

* Added serializer for category in  event (#804)

added serializer for category in  event

---------

Co-authored-by: Erik Skjellevik <98759397+eriskjel@users.noreply.github.com>
Co-authored-by: haruixu <114171733+haruixu@users.noreply.github.com>
Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Tam Le <tamle2107@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants