Commit graph

703 commits

Author SHA1 Message Date
rr-
0320a0b55b server/general: improve versioning effectiveness
...by integrating it with sqlalchemy that adds WHERE conditions for each
UPDATE and DELETE statement.
2016-08-16 17:22:33 +02:00
rr-
ef4af697c4 server/tags: fix tag sorting
Brainfart from d6942121e5
2016-08-14 17:54:15 +02:00
rr-
023ec9a976 client/password-reset: fix event binding
Every time the password reset form was loaded, the form submit event
listener was attached to a non-disposable DOM node rather than the DOM
node whose life scope was bound to the viewed page. As such, submitting
the form, leaving the page, returning back to it and sending the request
again caused the 'submit' event to fire twice - one time from the
non-disposed event handler and one from the current handler. This
resulted in the request being sent twice, and getting two confirmation
messages on the screen.

Fortunately, since the password reset requests are GET requests, they're
intercepted by the internal cache of the client API facade, so the
client just saw duplicate messages without the requests being actually
sent to the backend - meaning no extra mails were sent.
2016-08-14 16:57:46 +02:00
rr-
663aacdf82 server/tools: add lint script
Integrated both pylint and pycodestyle.
2016-08-14 16:46:50 +02:00
rr-
9aea55e3d1 server/general: embrace most of PEP8
Ignored only the rules about continuing / hanging indentation.

Also, added __init__.py to tests so that pylint discovers them. (I don't
buy pytest's BS about installing your package.)
2016-08-14 16:44:03 +02:00
rr-
af62f8c45a server/general: ditch falcon for in-house WSGI app
For quite some time, I hated Falcon's class maps approach that caused
more chaos than good for Szurubooru. I've taken a look at the other
frameworks (hug, flask, etc) again, but they all looked too
bloated/over-engineered. I decided to just talk to WSGI myself.

Regex-based routing may not be the fastest in the world, but I'm fine
with response time of 10 ms for cached /posts.
2016-08-14 16:43:35 +02:00
rr-
d102c9bdba server/tests: update func.posts tests 2016-08-14 16:43:35 +02:00
rr-
264f9ee70b server/tests: update func.mime tests 2016-08-14 16:43:35 +02:00
rr-
c23c401c4d server/tests: add func.tags tests 2016-08-14 16:43:35 +02:00
rr-
53e96ba41f server/tests: add func.tag_categories tests 2016-08-14 16:43:35 +02:00
rr-
81dfbaec98 server/tests: add func.users tests 2016-08-14 16:43:35 +02:00
rr-
03c74cb5a3 server/tests: add func.comments tests 2016-08-14 16:43:35 +02:00
rr-
65efc309a8 server/comments: catch bad IDs 2016-08-14 16:43:31 +02:00
rr-
56b3eb9674 server/util: fix case conversion 2016-08-14 16:43:04 +02:00
rr-
86452019a3 server/util: improve catching bad field names
KeyError could catch exceptions that happened inside the serializer
routine and mistakenly report them as an error with user input.
2016-08-14 16:43:04 +02:00
rr-
f6f07a35df server/general: authenticated_user->auth_user 2016-08-14 16:43:04 +02:00
rr-
c2bbf7b62c server/general: add assertions 2016-08-14 16:43:04 +02:00
rr-
bb86e9bf56 server/posts: add more safety checks for notes 2016-08-14 16:43:04 +02:00
rr-
7cd4a1a530 server/tags: verify description size 2016-08-14 16:43:01 +02:00
rr-
3db4f39545 server/tag-categories: correct exception type 2016-08-14 12:31:46 +02:00
rr-
92075bb455 server/tags: don't verify tag names while getting 2016-08-14 12:31:46 +02:00
rr-
d6942121e5 server/tags: change tags sort order 2016-08-14 12:31:21 +02:00
rr-
07237bc2bc server/tags: fix changing name case 2016-08-14 11:39:04 +02:00
rr-
7e5deee76b server/tags: fix tag merging 2016-08-14 11:39:04 +02:00
rr-
2b3d193b7c server/tags: don't auto-create tag categories 2016-08-14 11:38:59 +02:00
rr-
6b77404ecf client/tags: fix handling malformed tag export 2016-08-13 13:38:37 +02:00
rr-
cef3ad8e48 client/models: fix changing avatar 2016-08-13 11:57:27 +02:00
rr-
aac0ce6ee4 client/css: improve error messages under comments 2016-08-08 18:00:02 +02:00
rr-
5200f834f7 client/models: fix modifying lists in post model
The lists in the post model (current state and original state) referred
to the same objects, so that making changes to current state was seen as
if no change has been made. This broke mass tag - it always thought
there were no changes to post tags.
2016-08-08 17:59:49 +02:00
rr-
059bac877b client/models: fix notifying about list changes 2016-08-08 17:45:57 +02:00
rr-
46435182f6 client/posts: fix mass tag not sending version 2016-08-08 17:45:49 +02:00
rr-
79b3973f9e client/general: use resource versioning 2016-08-07 09:55:51 +02:00
rr-
8d04df38fd server/general: add entity versions 2016-08-07 09:55:51 +02:00
rr-
f4ea0d84ad docs/api: realign examples 2016-08-06 22:21:10 +02:00
rr-
3e77738c93 docs/api: fix typos 2016-08-06 21:58:43 +02:00
rr-
d23300645f client/tags: fix tag category template 2016-08-05 23:12:42 +02:00
rr-
70a65cc0a3 client/notes: fix saving post breaking selection
The problem was with dangling references - the saved post has been
replacing the note collection with entirely new class instances, whereas
the notes control clung onto old references. Now the control detects
such reloads and acts accordingly.
2016-08-05 23:04:29 +02:00
rr-
8e9ddf796f client/notes: add exit prompt for polygon changes 2016-08-05 23:04:29 +02:00
rr-
3235d70b1b client/notes: make content appear at centroids
Previously it used the centroid of polygon's bounding box, not the
polygon's centroid.
2016-08-05 23:04:21 +02:00
rr-
b7149ba7d6 client/notes: make keyboard scaling use centroids
Previously it used first polygon point.
2016-08-05 23:04:11 +02:00
rr-
9013f15c1a client/notes: add scaling notes with shift key 2016-08-05 23:03:43 +02:00
rr-
1b62daed9a client/general: clean up, refactor 2016-08-05 23:02:41 +02:00
rr-
9304e309f6 client/settings: add posts per page option 2016-08-05 23:02:41 +02:00
rr-
9383fd2b27 client/settings: rearrange the form, add hints 2016-08-05 23:02:41 +02:00
rr-
d5a00fe4b9 client/posts: add note editing 2016-08-05 23:02:41 +02:00
rr-
9e2dace73f server/posts: improve errors for bad note points 2016-08-05 23:02:34 +02:00
rr-
721900ee2f client/css: fix wrapping long tags 2016-08-04 00:30:24 +02:00
rr-
7f53abb498 client/tags: remove unused cruft 2016-08-04 00:30:24 +02:00
rr-
5092c2c587 server/posts: respect tag creating privilege 2016-08-02 12:44:38 +02:00
rr-
67f803a2f2 client/general: fix support for deleted users 2016-08-02 12:27:02 +02:00