I realized that users wouldn't be able to understand why their username
was invalid, so rather than getting rid of it, I added message hints
and split it up into two different validators. If the first one fails,
the second one will show as well.
Not perfect, but better than before by a longshot.
- Also adjusted some User methods and added ones I believe may be wanted
or needed in time.
- Adjusted online time delta back to 3 minutes.
- Started looking into how to sum 'likes' efficiently on a user's posts.
Not sure why Form.populate_obj() wasn't working - looking at the source
and the description as well as relevant StackOverflow answers, that
method would apparently work just fine. Looking again, Form.process()
was recommended instead.
Also, I finally changed PyCharm to show me proper commit message
standards - so, be happy that things will look nice now. :)
- Fix new post form not including a CSRF token
- Removed some old leftover comment profanity validation, changed to validate_on_submit() for first time
- Include rest of pluralize macro work with this commit + used pluralizing logic where there once was none
- Only some plural edits are included here - some are locked behind commits coming soon™️
- Also made index template statistics variables read better
- Fixed spelling error in CSRF Error template rendering (hadn't hit the page yet)
- Use TextAreaField instead of StringField on forms.NewPostForm
- Fixed incorrect remember_me field and redirect in login
- Added placeholder usage to field rendering macro
I never ran into this error myself, but I think if we did, it's possible it could have caused some kind of infinite loop. Or it would just error because the form is mapped to POST requests only - unless the browser would take the redirect and send the POST request there - but that wouldn't make sense given it's normal purpose.
I'm not sure why this isn't installed automatically, but I guess in order to make sure tons of unused dependencies aren't installed on machines that don't need them as well as all the errors that crop up, it wasn't added.
As a user who's simply using it for deployment and didn't need it for local development, I suppose this is what happens.