Commit Graph

878 Commits (c091e5fa36ac20fffbfb2f7f85ab6503d99b01a1)

Author SHA1 Message Date
voussoir ca8c642add Add "Are you sure you want to quit" to erepl. 2020-02-20 18:57:08 -08:00
voussoir 4a193d228c Add commit=True to frontend where necessary. 2020-02-20 00:34:28 -08:00
voussoir 854fa4db51 Rename PDB.register_user -> new_user.
I was treating User a little bit special here, but I prefer to
have the more consistent terminology.
2020-02-20 00:18:40 -08:00
voussoir 1fc2ed09f5 Remove commit argument from ALL methods. @transaction does it. 2020-02-19 23:56:09 -08:00
voussoir 0a984117c5 Add rollback queue, like commit queue. 2020-02-19 23:46:30 -08:00
voussoir 8c854f3b6a Improve this comment about Photo rename logic. 2020-02-19 23:22:08 -08:00
voussoir f99d3d03d9 Photo.rename new_path.assert_not_exists. 2020-02-19 23:12:29 -08:00
voussoir 00a443eec3 Always use the commit queue, don't bypass with commit=True. 2020-02-19 23:12:11 -08:00
voussoir 7f3602d673 Remove @transaction from mixin methods, apply it to object methods. 2020-02-19 23:10:49 -08:00
voussoir 953a85c998 Delete method Tag.leave_group, leftover from 1-parent days. 2020-02-19 23:05:55 -08:00
voussoir 8c797024e0 Remove calls to pdb.commit(). Let @transaction do it. 2020-02-19 22:58:21 -08:00
voussoir 203fb9e00f @transaction intercept commit argument; commit / release here. 2020-02-19 22:36:00 -08:00
voussoir 04f3f6f297 Remove commit=False from all method calls, it's default now. 2020-02-19 22:20:21 -08:00
voussoir 3a9d7fc2dc Set default commit=False for ALL methods.
I'm working on tightening up some of the transaction code. In the
past it was default commit=True because I would launch the repl, do
something, and quit, so it was nice to have auto commit. But really
it makes more sense to have it default False and be explicit when
to commit.
2020-02-19 20:08:24 -08:00
voussoir 108ba8bd95 Add PDB.release_savepoint. 2020-02-19 17:00:08 -08:00
voussoir bcd13b9ae4 Make the commit queue task popping a little more clear. 2020-02-19 16:26:23 -08:00
voussoir e7c90faf79 PhotoDB.rollback without savepoint should roll all, like real sql.
In sqlite3, rollback without a savepoint undoes the entire pending
transaction stack, whereas I was just popping the last save.
This change makes it match real sqlite. Also the only current call
for rollback is in the @transaction decorator which is already
explicit.
2020-02-19 16:26:02 -08:00
voussoir 9e0051ca9c Photo.move_file assert new path doesn't exist yet. 2020-02-19 16:23:31 -08:00
voussoir 1375d9fb26 Fix new_photo, data[extension] to use new pathclass.Extension. 2020-02-19 15:11:52 -08:00
voussoir 5da8d793d6 Return this None instead of assigning then returning. 2020-02-19 14:06:53 -08:00
voussoir e25c6e8697 Use code.interact instead of py -i. 2020-02-19 13:15:03 -08:00
voussoir 31517a41d2 Add missing period on exception message. 2020-02-19 13:11:57 -08:00
voussoir 851ab2d4cc main should return the args.func(args) value. 2020-02-08 17:24:57 -08:00
voussoir 92f3569971 Use of extract_table_column_map has moved to sqlhelpers. 2020-02-07 15:15:49 -08:00
voussoir b88d577ddd Use voussoirkit.imagetools for fit_into_bounds function. 2020-02-04 19:35:46 -08:00
voussoir 25ed427272 Wrap DB_INIT in a transaction. 2020-02-04 18:43:30 -08:00
voussoir d6d7521bce Assert table exists for any sql op involving argument tables.
At the moment, all of these functions are safe because they're
called with hardcoded tables determined by other code, not user input.
But while I was working in this area I felt it would be good to add
a safety check just in case.
2020-02-04 18:15:14 -08:00
voussoir 64f9eb5f2b Replace some % formatting with fstrings. 2020-02-04 18:12:41 -08:00
voussoir 4da331a3ab Fix entry_with_replacements unable to select text.
This hook had a bug where you couldn't select text because every
time you push a button, including ctrl+a or shift+left/right, the
cursor position gets reset and then deselects immediately.

So let's only reset the content and cursor only when text changes,
so arrow keys and ctrl don't have any negative effects.
2020-01-30 12:28:28 -08:00
voussoir eff0efdf40 Indicate required feature in exception message. 2020-01-29 23:52:25 -08:00
voussoir 77be61f4c6 Update What Am I Looking At with more detail. 2020-01-29 23:09:44 -08:00
voussoir 2ffe3940e6 Update OutOfDate message to show actual argument. 2020-01-28 10:52:19 -08:00
voussoir 93eb693bee Separate version_pragma from other pragmas!
This was a dumb bug. Because the version was included in the pragmas
that get set on every load, the database was receiving the new
user_version simply by setting skip_version_check=False and letting
the regular pragmas load, so all future checks passed without
having to run the db upgrader.
2020-01-27 20:46:32 -08:00
voussoir 222d63857e Replace which with winwhich. 2020-01-21 23:50:11 -08:00
voussoir 317b03dd9f Add etiquette_logo.svg and etiquette_logo_full.svg. 2020-01-19 10:59:57 -08:00
voussoir 10b674e8d8 Add entry_with_tagname_replacements for use on tagname inputs.
Unfortunately, when adjusting the box's value, it causes the datalist
to disappear, and it only comes back after you press another key.
I can't figure out how to make the datalist reappear automatically
with js.
2020-01-15 20:29:56 -08:00
voussoir 53888a1787 Fix #photoviewer <a> from being expanded to fill the whole pane. 2020-01-15 20:18:40 -08:00
voussoir 56e34bd245 Rename vars box, button -> add_tag_textbox, add_tag_button. 2020-01-15 18:48:12 -08:00
voussoir fa7f5b7b17 Don't use (+) for the syns anymore, looks like the must button. 2020-01-15 18:12:12 -08:00
voussoir cdf6ee2038 Use <span> for tag objects with no link or onclick.
To suppress the pointy <a> tags, you know.
2020-01-15 18:11:48 -08:00
voussoir b22516cf01 Remove the 'void' option from tag_object link.
Now that all <a> tags are pointy, there is no need for this fake link.
Its only purpose was to make <a>s that had an onclick but no
url get the ol' pointy.
2020-01-14 23:12:43 -08:00
voussoir 47c0a7221c Prototype of album drag-and-drop moving.
I'm not entirely happy with the way that native drag-and-drop looks,
the transparent bit that you hold while dragging looks dumb.
Will have to look into control / shift clicking to multiselect.
Also just using browser confirm() for now since I haven't made my
own dialog for that kind of thing yet.
2020-01-14 23:04:22 -08:00
voussoir 0ef3c7d6bf Tags on this page: add separate buttons for must, may, forbid. 2020-01-14 16:44:12 -08:00
voussoir 491e58ecdd Replace <div id="header"> with <nav id="header>. 2020-01-14 16:43:43 -08:00
voussoir e7ac27962f Make <a> tags always have pointer cursor.
At the moment, tag_objects have an option for a javascript void
link for the purpose of getting a pointer cursor without a real link.
Well I want to phase those javascript void links out so let's just
make a tags always pointy.
2020-01-14 16:17:59 -08:00
voussoir 723c96c4f2 Greatly simplify the jinja code for tag_object. 2020-01-14 15:11:07 -08:00
voussoir ae6ab72536 Add jinja_filters.make_attributes.
Actually it's a function but not a filter. For creating html
attributes out of a dict.
2020-01-14 15:10:47 -08:00
voussoir c185ca6bf7 Oops, replace wrongly used variable search -> link. 2020-01-13 23:18:48 -08:00
voussoir 89bfca8f9f Add endpoint for photo generate thumbnail. 2020-01-12 14:52:03 -08:00
voussoir ffe0be1c37 Rearrange these arguments to be in the same order as next line. 2020-01-12 14:42:17 -08:00