-
Notifications
You must be signed in to change notification settings - Fork 33
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: Add avatars #331
base: master
Are you sure you want to change the base?
feat: Add avatars #331
Conversation
orronai
commented
Oct 10, 2021
- Added avatars to users tables
- Added a template in order to change or delete avatar
- Added the form and validators for the picture file
- Added tests
- Added translations
- Added to the navbar near the username the avatar (if the user has one)
- Added to gitignore the avatars
- Added avatars to users tables - Added a template in order to change or delete avatar - Added the form and validators for the picture file - Added tests - Added translations - Added to the navbar near the username the avatar (if the user has one) - Added to gitignore the avatars
Co-authored-by: Sourcery AI <>
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
==========================================
+ Coverage 84.18% 84.34% +0.15%
==========================================
Files 63 64 +1
Lines 2953 3027 +74
==========================================
+ Hits 2486 2553 +67
- Misses 467 474 +7
Continue to review full report at Codecov.
|
return render_template('update-avatar.html', form=form) | ||
|
||
|
||
@webapp.route('/avatar/delete') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can make it work with the DELETE http verb it'll be awesome. If not, that's also good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for delete http verb
we can't just use html - we need also JS functions so I think it'd be more complicated. In addition - because of the implementation of this delete function - we redirect to the users page which is a get
method according to my opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's PITA. Agree
|
||
@staticmethod | ||
def open_file(filename: str) -> BufferedReader: | ||
return open(Path(conftest.SAMPLES_DIR) / filename, 'br') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do it with fixture: use file_handler = open(...)
, then yield file_handler
and finally file_handler.close
it
- Fixed translations - Changed avatars directory - Added constant of MB conversion
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 0.20%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |