- Add file type validator
- Apply validator to user image
- Save validator class to variable
- Add image validator to news image model field
- Add file size validator
- Enable file size validator on news and user model image fields
- Fix test
These fields were just using the default max lengths of 50 and 200
respectively. Since `title`s can be up to 255 characters, adjusted
slug to be 300.
Increased external URL to be huge as it's not impactful to performance
really and avoids possible future creation issues.
Fixes#773
- Return the most recent 3 news articles on the main homepage and most recent 2 on the beta homepage, as I wasn't sure which one we were using
- Updated both homepage templates
- Updated tests
Part of #343. The news' notifications module was also changed to the user
preferences is honored when sending news emails.
Also exclude migrations from the black check.
Includes support for the news approve view and news details view to redirect
to a safe URL on approval, to allow moderators to stay in the moderation list.
More for #273: this branch provides a new form and view to create news (limited
to authenticated users). For now, every new entry, requires moderation. Approval
can be done via the web UI when visiting a news detail page and having the right
permissions.
Next branch would provide:
* moderator whitelisting
* news list needing moderation view
* email sending on news submission
Missing tests