Commit Graph

112 Commits

Author SHA1 Message Date
Xevion
6b4d5acfb9 Move highly-static routes in separate blueprint 2022-03-29 23:34:31 -05:00
Xevion
cf8a754caf Implement inefficient like summation methods 2022-03-29 23:23:48 -05:00
Xevion
1a323a8349 Add PostLike and CommentLike models
- 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.
2022-03-29 22:45:59 -05:00
Xevion
58861acd3d Change minimum comment length to 1 character
Comments like "yes", "no" or 😈 wouldn't be available to post either.
2022-03-29 21:16:12 -05:00
Xevion
66715ecc72 Improve edit profile and add comment styling 2022-03-29 21:14:42 -05:00
Xevion
2cb42bbc8b Fix profile editing form not coming pre-populated with data
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. :)
2022-03-29 20:57:13 -05:00
Xevion
987e4f3256 Remove unused Post.likes
- As well as related methods
- In preparation for PostLikes and CommentLikes model implementations
2022-03-29 20:49:12 -05:00
Xevion
4d986d2c52 Remove unnecessary braces on pluralization filter
I should amend this, but nobody will notice if I make the commit subject line sound complex enough.
2022-03-29 18:14:55 -05:00
Xevion
fd35443a9a Revamp all model relationships to use backref attributes properly
- 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
2022-03-29 18:12:07 -05:00
Xevion
db560b7c41 Add pluralizing macro filter to templating engine
- 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)
2022-03-29 18:07:39 -05:00
Xevion
49547e582c Improve License/TOS/Privacy statements 2022-03-29 17:06:56 -05:00
Xevion
839ef370be Create proper edit profile form w/ CSRF & refactor User.about_me null/empty string handling 2022-03-29 16:37:12 -05:00
Xevion
bad80cf483 Add force login method for development, add CSRF tokens to login & signup forms 2022-03-29 16:35:26 -05:00
Xevion
311f061b10 Implement CSRF protection & error page 2022-03-29 16:25:30 -05:00
Xevion
f41b83a15f Apply new form validation features to New Post form
- Use TextAreaField instead of StringField on forms.NewPostForm
- Fixed incorrect remember_me field and redirect in login
- Added placeholder usage to field rendering macro
2022-03-29 15:13:00 -05:00
Xevion
8cf2f02772 Implement new Profanity Checker on Form Validation
Why am I still up doing this at 3am
2022-03-29 03:00:12 -05:00
Xevion
820ecf3d74 Improve form field rendering macro to fix login/signup pages
It now looks less "dogshit" as one might say. Still quite dogshit, but acceptable 'dogshit'.
2022-03-29 02:51:47 -05:00
Xevion
862f58153e Test commit for GPG signing verificiation 2022-03-29 02:33:51 -05:00
Xevion
3b5307ab47 Migrate app to use WTForms for auth form validation
- Not finished yet, major styling breakage in this commit
- Also encapsulated GET & POST requests of /login and /signup routes into one route.
2022-03-29 02:30:19 -05:00
Xevion
2e8688f59b Revamp all form submissions with Flask-WTF forms
- Rename blueprint route 'main.user' to 'main.view_user' for clarity
- Rename 'forms.py' to 'route_forms.py'
2022-03-29 02:00:43 -05:00
Xevion
4968868d3a Add field rendering Macro for new form validation & add Flask-WTF to Pipfile 2022-03-29 01:30:26 -05:00
Xevion
040e505561 Improve/add error messages to look better visually
- Have not tested everywhere, but should work okayish
2022-03-28 18:54:17 -05:00
Xevion
2973f3ca81 Add profanity filter to comment and post creation
- For Heroku, I worry someone might add a racial slur or something. This isn't perfect, but it's good enough.
2022-03-28 18:29:47 -05:00
Xevion
208b9ba674 Fix new post form length filters not redirecting correctly
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.
2022-03-28 18:17:52 -05:00
Xevion
c4b22b8632 Attempt to fix database not creating tables 2022-03-28 18:04:45 -05:00
Xevion
2d014628e4 Fix circular imports issue by separating SQLAlchemy db instance into database.py 2022-03-28 17:57:52 -05:00
Xevion
3ea945b99f Add psycopg2 to Pipfile for SQLAlchemy Postgresql support
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.
2022-03-28 17:41:54 -05:00
Xevion
f5f6f13756 Fix Heroku using now deprecated Postgres DB URI for SQLAlchemy 2022-03-28 17:36:21 -05:00
Xevion
6c4b952004 Change all relative imports to standard imports 2022-03-28 17:30:31 -05:00
Xevion
e6db061500 Fix Gunicorn not finding app in app.py due to __name__ check 2022-03-28 17:27:16 -05:00
Xevion
6dfed98ba3 Rename create_app.py to app.py for Gunicorn command 2022-03-28 17:19:11 -05:00
Xevion
e997d4f67e Re-add gunicorn to Pipfile for Heroku deployment 2022-03-28 17:06:20 -05:00
Xevion
2cd2830d60 Update Pipfile.lock 2022-03-28 17:00:40 -05:00
Xevion
ab7641b43e Prepare for Heroku deployment 2022-03-28 16:57:34 -05:00
Xevion
7753ef4488 Fix werkzeug 2.1.0 breaking flask-login with deprecated feature removal 2022-03-28 16:56:55 -05:00
Xevion
28a9dd4a76 Comment out unused pages
+ Slight formatting changes
2022-03-28 13:23:34 -05:00
Xevion
87f6c53987 Reduce online timer span, reduce letter spacing in image banner 2022-03-27 13:49:07 -05:00
Xevion
4c330ccedf Add roadrunner PSD header 2022-03-27 13:21:03 -05:00
Xevion
678dab307f Add quick-edit font-awesome button on user profile
- Available to admins and the user themselves
2022-03-27 13:20:36 -05:00
Xevion
8188ce5484 Fix administrator override 2022-03-27 13:19:10 -05:00
Xevion
4704bd5c6e Switch text-based logo in header to image with RoadRunner 2022-03-27 13:05:24 -05:00
Xevion
4bf568c0fe Add rowdy-hacks project submission image to about 2022-03-27 13:04:49 -05:00
Xevion
83b72ae292 Fix different margin-top on stats/new users in index 2022-03-27 13:04:27 -05:00
Xevion
46960bcadc Add About and Tech Stack sections to README 2022-03-27 12:19:17 -05:00
Xevion
9e4f99a264 Add setup details to README.md 2022-03-27 12:09:25 -05:00
Xevion
b30050df98 Add PSD & Banner 2022-03-27 12:07:08 -05:00
Xevion
8d369932d5 Add statistics to front page 2022-03-27 12:06:50 -05:00
Xevion
39f7425cc9 Add administrative bypass to user properties 2022-03-27 11:51:17 -05:00
Xevion
96b4dba73c Add comment posting form 2022-03-27 11:50:53 -05:00
Xevion
9be4cc3f79 Modify filler footer text to link to about page and static LICENSE.txt, add LICENSE 2022-03-27 11:50:05 -05:00