This code runs https://www.themotte.org. Forked from https://github.com/Aevann1/rDrama
![]() Fixes minor UI bug when removing self-upvote on a comment. Previous behavior, starting from a new comment: - Initial state: score 1 from self-upvote, upvote button shows highlighted as `color: var(--primary)`. - Click on upvote button to remove self-upvote → button unhighlights, score displays as 0. - [reload page] - Score displays as 0, but button is highlighted. - Click on upvote button → button unhighlights, score displays as -1. [If you reload the page now, state is score 0 & highlighted; no change in serverside votes.] - Click on upvote again → button highlights, score displays as 0. - [reload page] - Score displays as 1, button is highlighted. Direct cause is `templates/comments.html @ L115-117`. I checked `api_comment`, though, and it adds a vote on new comments, and that state change propagates to the template's parameters before it renders, so I believe the only time this triggers is specifically when a user has removed their self-upvote. Bug is fixed when testing with L115-117 removed. Is there some other edge case it was meant to solve? Secondary bugfix: Removing a self-upvote _costs_ you a coin & a truescore point. I think this is one of the few ways to get negative dramacoin. I chose to fix it by having self-votes and self-unvotes not change coins/truecoins. The alternative of having new comments & posts give the user +1 coin/truecoin would modify site behavior, and you'd retroactively owe some powerusers thousands of DC & truescore. |
||
---|---|---|
.github | ||
files | ||
.gitattributes | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
dependabot.yml | ||
docker-compose.yml | ||
Dockerfile | ||
env | ||
imei.sh | ||
LICENSE | ||
pg_hba.conf | ||
push.sh | ||
pushforce.sh | ||
readme.md | ||
redis.conf | ||
requirements.txt | ||
schema.sql | ||
seed-db.sql | ||
site_settings.json | ||
snappy_PCM.txt | ||
snappy_rDrama.txt | ||
supervisord.conf | ||
ubuntu_setup |
This code runs https://rdrama.net and https://pcmemes.net
Installation (Windows/Linux/MacOS)
1- Install Docker on your machine.
2 - If hosting on localhost and/or without HTTPS, change"SESSION_COOKIE_SECURE"
in __main__.py
to "False"
3- Run the following commands in the terminal:
git clone https://github.com/Aevann1/rDrama/
cd rDrama
docker-compose up
4- That's it! Visit localhost
in your browser.
5- Optional: to change the domain from "localhost" to something else and configure the site settings, as well as integrate it with the external services the website uses, please edit the variables in the env
file and then restart the docker container.