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

Deployment #361

Merged
merged 54 commits into from
May 11, 2021
Merged

Deployment #361

merged 54 commits into from
May 11, 2021

Conversation

ddabble
Copy link
Member

@ddabble ddabble commented May 11, 2021

Brings in the changes from the following PRs:

sigridge and others added 30 commits March 12, 2021 13:54
…urse

# Conflicts:
#	locale/nb/LC_MESSAGES/django.mo
#	locale/nb/LC_MESSAGES/django.po
...specifically images that sorl-thumbnail / Pillow doesn't support making thumbnails for (i.e. resizing).
The most popular convention is to end all paths with a forward slash. Also, it's more RESTful to place the action (e.g. edit/update/delete) after the object (id/pk).
Also removed the unused translations that were added manually (in 2318b40).
Updating Fomantic-UI in the last commit involved overwriting the translations that were added manually to Fomantic-UI's source files (in 2318b40). This was instead replaced with overriding the `months` and `monthsShort` attributes of Fomantic-UI's calendar. The mentioned manually added translations that were not related to month names, were not replaced, as I could not find any usages of them.
* [dependabot.yml] Fixed error on too long commit message prefix by replacing the prefixes with emojis
Also added and improved translations to the (usage) rule pages.
Removing the `href` attribute from the `<a>` buttons also fixes the bug / unintended function of being able to e.g. (accidentally) middle-click one of these delete buttons, which would open a new tab with the URL of the delete form, which would crash the server, as no template is registered in these delete views. This latter issue can be fixed by returning 404 when trying to make a GET request to the delete URLs.
This was caused by the delete views not defining a template, as they relied on a dedicated delete confirmation page, instead of a delete modal - which is what we use.
This also fixes sorting removing/ignoring filtering, and that clicking on rows that had not been filtered did not show the detailed member information modal.
A page won't have translations if defined within a normal `urlpatterns` list, instead of withing an `i18n_patterns()` method.
This is a more fitting name, as `email` could lead to some confusion, e.g. if it's referring to the `mail` app or other email functions, instead of just a list of email addresses.

Also made the path of `contact` be prefixed by `/about/`, so that the full path is now `/about/contact/`.

Note: This rename will require manually renaming the previous `email` ContentBox. I could have added a migration for this, but it seemed a bit unnecessary.
The URLs added were thought to have a high potential of being referenced other places on the internet, like in articles, posts on the Facebook page, and old course contracts.

The change from "/email/" to "/about/contact/" in the last commit was not added, as the "/email/" path is generic enough to possibly be used for other purposes in the future.
* [member_list.html] Made it so that only people who can change the committee membership of other members, can see the reason they quit, for better privacy
* [make_queue/forms.py] Increased `special_text`'s `max_length`, to account for the length of real data
* [make_queue/forms.py] Replaced `BaseMachineForm`'s `SemanticSearchableChoiceInput` widget for the `status` field with `SemanticChoiceInput`, because there is not really any need to search for a value, as there are always only 3 values to choose from
* [equipment_list.css] Fixed hiding the top and bottom parts of the equipment title text when on mobile
* [admin_equipment_edit.html] Added a link to the equipment admin page (ignore whitespace changes for easier viewing)
* [admin_event_detail.html] Replaced the `i.icons` tag with just an `i.time.icon` tag, as the `i.noshadow.bottom.right.corner.add.icon` was practically invisible
* [admin_timeplace_listing.html] Replaced the `color` filter with manually inserting the colors, as it makes the code more transparent / easier to read
* [event_detail.html] Removed the unnecessary `<span>` tag
* [news_tags.py] Removed the (now) unused `color` filter
* [style.css] Removed the (now) unused `.noshadow` selector
* [header.html] Made the "Profile" link only visible to MAKE members, as it has no use for non-members, which gives it potential for creating confusion
...which ensures that all members only have one SystemAccess with a certain name.
* [make_queue/forms.py] Checking `self.errors` is roughly equivalent to checking whether any required fields are not present in the posted form data
ddabble and others added 24 commits April 22, 2021 19:41
Also removed changing data through GET requests - as was done previously - because GET requests should only retrieve data, not modify it (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET).
The "EM" prefix should be rendered outside of the `<input>` tag (which it currently is) and not be a part of its value by default.
Also added `RestrictedEditMemberForm`, instead of removing fields manually through `EditMemberForm`'s `__init__()` method, as handling permission control should be done by the view.
Also removed the import of `datetime` from `datetime_safe`, as it's only useful if we had cared about dates before the year 1000. Also, replaced importing `ugettext` with `gettext`, which has been an alias since Django 2.0.
* Split `general.css` into multiple files - one for each template with only the styles they use (there was minimal style duplication between each template's CSS file)
* [reservation_list.html] Removed the `make-my-reservation-blue-link` CSS class (also from `general.css), and replaced it with just `ui`, which makes Fomantic-UI not replace the link's blue color
The following was changed from the generated version:
* `db.sqlite3` (and `-journal`) changed to `*.sqlite3`
* `*.mo` removed
* Removed everything related to profile photo, as it was not being used
* Removed manually setting `fullname` from `name`, when the same is achieved by changing the relevant tuple in `EXTRA_DATA` to `('name', 'fullname')`
...that were not part of any group or had any permission manually set.

This also fixes the admin panel link not displaying in the user dropdown in the header, as it was using the `has_any_permissions()` template tag.
* Set the `max_length` back to 4 and changed the value of `TAKEN_ADVANCED_3D_PRINTER_COURSE` to `A3DP`, as the code value doesn't need to be more than 4 characters to be both unique and legible
* Updated the `choices` argument of `usage_requirement` in `0015_machinetype.py`, as it should contain the same choice values as are referenced in the `default_machine_types` tuple - and because it doesn't make any difference to a DB that has already applied the migration
* Made the `verbose_name` of `Printer3DCourse.advanced_course` start with a lowercase letter, because of the reasons stated in fac6b9f
…urse

# Conflicts:
#	locale/nb/LC_MESSAGES/django.mo
#	locale/nb/LC_MESSAGES/django.po
#	make_queue/models/course.py
#	make_queue/models/models.py
#	make_queue/templates/make_queue/course/course_registration_edit.html
#	make_queue/templates/make_queue/course/course_registration_list.html
#	make_queue/tests/models/test_reservation.py
When calling `logging.getLogger('django.request').exception()` without any explicit request data, the logged message also didn't contain any request data.
Using the created `log_request_exception()` function, or raising a new exception from the caught exception, the request data is now logged.
…ixes

# Conflicts:
#	locale/nb/LC_MESSAGES/django.mo
#	locale/nb/LC_MESSAGES/django.po
@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #361 (841cd53) into master (3b38eb8) will increase coverage by 0.78%.
The diff coverage is 72.20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #361      +/-   ##
==========================================
+ Coverage   73.02%   73.81%   +0.78%     
==========================================
  Files         114      116       +2     
  Lines        3474     3609     +135     
==========================================
+ Hits         2537     2664     +127     
- Misses        937      945       +8     
Impacted Files Coverage Δ
dataporten/social.py 64.51% <ø> (+13.23%) ⬆️
docs/forms.py 0.00% <0.00%> (ø)
docs/views.py 0.00% <0.00%> (ø)
groups/urls.py 100.00% <ø> (ø)
internal/urls.py 100.00% <ø> (ø)
news/forms.py 78.78% <0.00%> (-2.47%) ⬇️
news/templatetags/news_tags.py 77.77% <ø> (+2.77%) ⬆️
make_queue/templatetags/reservation_extra.py 73.33% <28.57%> (-1.38%) ⬇️
mail/email.py 34.09% <33.33%> (ø)
make_queue/views/reservation/rules.py 68.49% <46.66%> (-6.92%) ⬇️
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b38eb8...841cd53. Read the comment docs.

@ddabble ddabble merged commit 28b9ae7 into master May 11, 2021
@mahoyen mahoyen added the deployment Pull requests from another branch (usually `dev`) into the `main` branch label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Pull requests from another branch (usually `dev`) into the `main` branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants