stesh / porick-flask Goto Github PK
View Code? Open in Web Editor NEWPorting porick to flask
License: Apache License 2.0
Porting porick to flask
License: Apache License 2.0
The db setup instructions in the README are out of date. We need to update them to show a user how to create a database from scratch, and how to upgrade a chirpy database to a porick database.
For the latter, I used https://github.com/kopf/porick/blob/master/migrate_db.sh in the previous incarnation of porick.
For all db upgrades in the future, alembic should be used. We should look into the possibility of porting migrate_db.sh
to an alembic script.
mv requirements.txt requirements.in
pip-compile --no-index --upgrade --output-file requirements.txt requirements.in
22:03 < kopf> i'm wondering - it would probably make sense to have porick automatically cast an upvote on a quote that you submit
22:03 < kopf> like on reddit
22:03 <@johnl> Yeah, it would
copy of kopf/porick#48
When there are quotes, the interface should directly dump a user to /browse rather than telling them what chirpy is.
It seems as if the score
attribute of Quote
isn't used. It might well be a left-over from the chirpy times.
@stesh can you have a look at the qdb database and see if it's used at all?
If not, we can get rid of it here and create a db migration script to remove it from the db.
Copy of kopf/porick#46
Instead of having a link to a login page, place two text fields in a dropdown from the navbar for username and password.
key
length to 36
Similar to what was there on Chirpy.
Intended use-cases: removing line-breaks, harmonizing tags, retro-fitting tags
Access: probably only for 'admins'.
The auth tokens are vulnerable to a hash-extension attack as they don't use a real HMAC function. Simple hash based tokens containing a secret are not secure for authentication.
https://blog.skullsecurity.org/2012/everything-you-need-to-know-about-hash-length-extension-attacks
/browse/<id>
), as this breaks the pagination. this might be tricky to solve elegantlyCopy of kopf/porick#44
e.g. in the case of the following quote, with fields:
rating: 0
votes: 2
submitted: 2012-10-26 14:26:12
score: 1
status: 1
its # of upvotes is calculated as equal to votes
(2) and number of downvotes equal to votes - rating
(2). however we can see this isn't the case when we look at the actual votes for this quote:
+----------+---------+-----------+
| quote_id | user_id | direction |
+----------+---------+-----------+
| 1137 | 4 | up |
| 1137 | 6 | down |
+----------+---------+-----------+
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.