Commit Graph

909 Commits (8f2f48d6d1a1ab1e4e9f233e03fd3ac6cba1e282)

Author SHA1 Message Date
justcool393 8f2f48d6d1
[DO NOT MERGE] import detanglation (#442)
* move Base definition to files.classes.__init__.py

* fix ImportError

* move userpage listing to users.py

* don't import the app from classes

* consts: set default values to avoid crashes
consts: warn if the secret key is the default config value

* card view: sneed (user db schema)

* cloudflare: use DEFAULT_CONFIG_VALUE

* const: set default values

* decouple media.py from __main__

* pass database to avoid imports

* import cleanup and import request not in const, but in the requests mega import

* move asset_submissions site check to __init__

* asset submissions feature flag

* flag

* g.is_tor

* don't import request where it's not needed

* i think this is fine

* mail: move to own routes and helper

* wrappers

* required wrappers move

* unfuck wrappers a bit

* move snappy quotes and marseys to stateful consts

* marsify

* :pepodrool:

* fix missing import

* import cache

* ...and settings.py

* and static.py

* static needs cache

* route

* lmao all of the jinja shit was in feeds.py amazing

* classes should only import what they need from flask

* import Response

* hdjbjdhbhjf

* ...

* dfdfdfdf

* make get a non-required import

* isort imports (mostly)

* but actually

* configs

* reload config on import

* fgfgfgfg

* config

* config

* initialize snappy and test

* cookie of doom debug

* edfjnkf

* xikscdfd

* debug config

* set session cookie domain, i think this fixes the can't login bug

* sdfbgnhvfdsghbnjfbdvvfghnn

* hrsfxgf

* dump the entire config on a request

* kyskyskyskyskyskyskyskyskys

* duifhdskfjdfd

* dfdfdfdfdfdfdfdfdfdfdfdf

* dfdfdfdf

* imoprt all of the consts beacuse fuck it

* 😭

* dfdfdfdfdfdfsdasdf

* print the entire session

* rffdfdfjkfksj

* fgbhffh

* not the secret keys

* minor bug fixes

* be helpful in the warning

* gfgfgfg

* move warning lower

* isort main imports (i hope this doesn't fuck something up)

* test

* session cookie domain redux

* dfdfdfd

* try only importing Flask

* formkeys fix

* y

* :pepodrool:

* route helper

* remove before flight

* dfdfdfdfdf

* isort classes

* isort helpers

* move check_for_alts to routehelpers and also sort imports and get rid of unused ones

* that previous commit but actkally

* readd the cache in a dozen places they were implicitly imported

* use g.is_tor instead of request.headers. bla bla bla

* upgrade streamers to their own route file

* get rid of unused imports in __main__

* fgfgf

* don't pull in the entire ORM where we don't need it

* features

* explicit imports for the get helper

* explicit imports for the get helper redux

* testing allroutes

* remove unused import

* decouple flask from classes

* syntax fix also remember these have side fx for some reason (why?)

* move side effects out of the class

* posts

* testing on devrama

* settings

* reloading

* settingssdsdsds

* streamer features

* site settings

* testing settings on devrama

* import

* fix modlog

* remove debug stuff

* revert commit 67275b21ab6e2f2520819e84d10bfc1c746a15b6

* archiveorg to _archiveorg

* skhudkfkjfd

* fix cron for PCM

* fix bugs that snekky wants me to

* Fix call to realbody passing db, standardize kwarg

* test

* import check_for_alts from the right place

* cloudflare

* testing on devrama

* fix cron i think

* shadow properly

* tasks

* Remove print which will surely be annoying in prod.

* v and create new session

* use files.classes

* make errors import little and fix rare 500 in /allow_nsfw

* Revert "use files.classes"

This reverts commit 98c10b876cf86ce058b7fb955cf1ec0bfb9996c6.

* pass v to media functions rather than using g

* fix

* dfdfdfdfd

* cleanup, py type checking is dumb so don't use it where it causes issues

* Fix some merge bugs, add DEFAULT_RATELIMIT to main.

* Fix imports on sqlalchemy expressions.

* `from random import random` is an error.

* Fix replies db param.

* errors: fix missing import

* fix rare 500: only send to GIFT_NOTIF_ID if it exists, and send them the right text

* Fix signup formkey.

* fix 2 500s

* propagate db to submissions

* fix replies

* dfdfdfdf

* Fix verifiedcolor.

* is_manual

* can't use getters outside of an app context

* don't attempt to do gumroad on sites where it's not enabled

* don't attempt to do gumraod on sites's where it's unnecessary

* Revert "don't attempt to do gumroad on sites where it's not enabled"

This reverts commit 6f8a6331878655492dfaf1907b27f8be513c14d3.

* fix 500

* validate media type

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-15 03:19:08 -06:00
Snakes 4afa60dc81
Use database to filter hidevotedon directly.
We no longer need to build a list of potentially tens of thousands
of submission_ids in Python from the database to then pass back to
the database.
2022-11-09 09:57:51 -05:00
Snakes ebb3957f41
Eager load submission listing relationships. 2022-11-09 09:16:22 -05:00
justcool393 26549a6e66
remove logged out routes (#433)
* remove /logged_out/ routes

* update sitemap, remove users route, and update header

* cloudflare cookie

* only mess with the cookie whenever we desire auth

* sitemap: (small) improvements
sitemap: fix little bug i introduced
sitemap: fix login redirects for /id/ routes

* sitemap: remove duplicate entry

* contact is auth desired

* imports: don't import what we don't need and bind late to the db

* praying to god this works

* keep yourself safe

* oh i actually need to commit and push lol

* import Sub

* t

* refix cache purger
2022-11-09 00:35:24 -05:00
justcool393 ddbe3de33b remove catalog feature no one uses 2022-11-07 18:59:28 -06:00
Snakes cb3d92c479
WPD: fix auto-login token validation call params. 2022-11-07 19:41:25 -05:00
Aevann1 5111eb7ca4 exclude /h/changelog from hole filter 2022-11-07 03:18:54 +02:00
Aevann1 5a61907268 Revert "extend the holes filter to pinned posts"
This reverts commit ba031b09be.
2022-11-07 03:15:42 +02:00
Aevann1 ba031b09be extend the holes filter to pinned posts 2022-11-07 02:59:17 +02:00
Aevann1 2fe10e9644 replace cc toggle with holes toggle 2022-11-07 02:44:31 +02:00
Aevann1 0aa27a926b small fix to /h/social and /h/music logic 2022-11-07 01:43:50 +02:00
justcool393 8f1700a3c5 WPD: front: partially fix next page bug (increase counter to 101 so that we know about any next pages)
- the next page but still is there but this may fix it in some cases
WPD: front: fix bug that makes posts not show up when viewing a hole
2022-11-06 02:31:28 -06:00
Aevann1 a6f79e78d2 remove the "if True" 2022-11-06 08:33:29 +02:00
Aevann1 ba144f026e last-ditch attempt, killing myself if this one fails 2022-11-06 08:30:53 +02:00
Aevann1 12ceae5677 stop spamming console 2022-11-06 08:21:58 +02:00
Aevann1 9a1d88b22a time for print-debugging 2022-11-06 08:20:45 +02:00
Aevann1 842b971602 trying to fix /h/social limit 2022-11-06 08:18:58 +02:00
Aevann1 1ec5de2fcf Revert "WPD: remove vestigial social and music filer code"
This reverts commit bb1658e0a0.
2022-11-06 07:18:28 +02:00
justcool393 3a6dfdf2de listings: constantify PAGE_SIZE as 25
magic numbers are bad, do better next time
2022-10-28 22:20:48 -05:00
Aevann1 ad358650e1 remove retarded bullshit I wasn't consulted about 2022-10-27 19:53:08 +02:00
justcool393 e248295880 lawlzposts: fix a couple of bugs 2022-10-23 13:28:51 -05:00
justcool393 ec1affcf85 posts: add MasterLawlz specific actions 2022-10-23 12:01:00 -05:00
Snakes e9b648dcb5
Support for multiple WPD sites on one master. 2022-10-21 19:33:43 -04:00
justcool393 347a751481 WPD: redirect unlogged users to new site 2022-10-21 16:10:06 -05:00
Aevann1 360aa99fe1 small adjustments 2022-10-21 17:11:12 +02:00
justcool393 174bce037f WPD migration: don't include AutoJanny, Snappy, or other bots 2022-10-18 06:42:43 -05:00
justcool393 33c6edba58 import error i think also make graceful 2022-10-17 20:49:13 -05:00
justcool393 1446bf582f user validation logic fix 2022-10-17 20:37:09 -05:00
justcool393 39545e556f WPD: disable /logged_out on .co, fixing infinite loop
WPD: fix bad asset link
WPD: redirect on migration login and failed migration login
2022-10-17 19:11:50 -05:00
Snakes 41fd13602f
Fix broken import in WPD migration. 2022-10-17 19:47:28 -04:00
justcool393 be6fa59e13 fix host bug, do a absolute redirect instead of a relative one, and make wpdco page essentially static 2022-10-17 18:40:09 -05:00
justcool393 96d63ed5de banner text and also rename variable 2022-10-17 18:40:09 -05:00
justcool393 6d538e2cd3 WPD migration code 2022-10-17 18:40:09 -05:00
justcool393 aa508fc076 remove discord 2022-10-16 05:42:52 -07:00
justcool393 39aa59a37a add g.is_api_or_xhr so we can use it where we want to give API output
* also use v.client for strict API clients
2022-10-15 02:11:36 -07:00
Aevann1 7a6b4406ef remove redundant shadoban filters 2022-10-13 12:47:55 +02:00
Snakes 2edeb48751
Refactor /comments to use single query. 2022-10-13 01:52:54 -04:00
Snakes e5af46c4ae
Fix shadow visibility logic. 2022-10-13 00:10:34 -04:00
Snakes 166e33dc38
Clarify architecture of sort_objects. 2022-10-12 04:05:26 -04:00
Aevann1 d18e247513 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-12 09:03:30 +02:00
Aevann1 2aa281e8c8 refactor sorting again (untested) 2022-10-12 09:03:28 +02:00
justcool393 bb1658e0a0 WPD: remove vestigial social and music filer code 2022-10-12 00:03:08 -07:00
Aevann1 b1abd33835 refactor sorting 2022-10-12 08:10:11 +02:00
Aevann1 e3a3cbd358 add "hot" comment sorting 2022-10-11 18:41:09 +02:00
justcool393 7025cbe983 don't include sbed users in songs 2022-10-08 10:14:17 -07:00
justcool393 2fc3044d5b shadowban perms and stuff 2022-10-05 19:24:37 -07:00
justcool393 9575e11b8b add get_sub_by_name function 2022-10-05 03:37:29 -07:00
Aevann1 04895e1fac remove my effortpost algo (cant have shit in detroit) 2022-10-01 19:17:58 +02:00
Aevann1 09cc43060d
add hole mod logs (#380) 2022-09-29 11:39:37 +02:00
Snakes 4a54c6219a
Add trailing final newlines to source files.
Touched a ton of files to finally standardize on having trailing
final newlines, as best practice recommends and so our devs stop
accidentally fighting each other over it.

This was performed automatically with the following:
git ls-files -z '*.py' | while IFS= read -rd '' f; \
    do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
git ls-files -z '*.css' | while IFS= read -rd '' f; \
    do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2022-09-29 01:43:29 -04:00