Add more items to to-do list; minor fixes.
This commit is contained in:
		
							parent
							
								
									ebe0fcee40
								
							
						
					
					
						commit
						13e8bc4a6f
					
				
					 5 changed files with 12 additions and 4 deletions
				
			
		|  | @ -80,6 +80,11 @@ If you are interested in helping, please raise an issue before making any pull r | ||||||
| - Perhaps instead of actually deleting objects, they should just have a `deleted` flag, to make easy restoration possible. Also consider regrouping the children of restored Groupables if those children haven't already been reassigned somewhere else. | - Perhaps instead of actually deleting objects, they should just have a `deleted` flag, to make easy restoration possible. Also consider regrouping the children of restored Groupables if those children haven't already been reassigned somewhere else. | ||||||
| - Add a new table to store permanent history of add/remove of tags on photos, so that accidents or trolling can be reversed. | - Add a new table to store permanent history of add/remove of tags on photos, so that accidents or trolling can be reversed. | ||||||
| - Improve transaction rollbacking. I'm not satisfied with the @transaction decorator because sometimes I want to use exceptions as control flow without them rolling things back. Context managers are good but it's a matter of how abstracted they should be. | - Improve transaction rollbacking. I'm not satisfied with the @transaction decorator because sometimes I want to use exceptions as control flow without them rolling things back. Context managers are good but it's a matter of how abstracted they should be. | ||||||
|  | - Photo thumbnail paths should be relative to the data_dir, they are currently one level up. Or maybe should remove the paths entirely and just recalculate it by the ID. Can't think of any reason to have a thumbnail point elsewhere. | ||||||
|  | - Fix album size cache when photo reload metadata and generally improve that validation. | ||||||
|  | - Better bookmark url validation. | ||||||
|  | - Create a textbox which gives autocomplete tag names. | ||||||
|  | - Allow any div to get the clipboard size. Update via classname instead of ID. | ||||||
| 
 | 
 | ||||||
| ### To do list: User permissions | ### To do list: User permissions | ||||||
| Here are some thoughts about the kinds of features that need to exist within the permission system. I don't know how I'll actually manage it just yet. Possibly a `permissions` table in the database with `user_id | permission` where `permission` is some reliably-formatted string. | Here are some thoughts about the kinds of features that need to exist within the permission system. I don't know how I'll actually manage it just yet. Possibly a `permissions` table in the database with `user_id | permission` where `permission` is some reliably-formatted string. | ||||||
|  |  | ||||||
|  | @ -69,7 +69,6 @@ def transaction(method): | ||||||
|             return ret |             return ret | ||||||
|         except Exception as e: |         except Exception as e: | ||||||
|             self.log.debug('Rolling back') |             self.log.debug('Rolling back') | ||||||
|             print(e) |  | ||||||
|             self.sql.rollback() |             self.sql.rollback() | ||||||
|             raise |             raise | ||||||
|     return wrapped |     return wrapped | ||||||
|  |  | ||||||
|  | @ -1183,7 +1183,7 @@ class PhotoDB(PDBAlbumMixin, PDBBookmarkMixin, PDBPhotoMixin, PDBTagMixin, PDBUs | ||||||
|                 item = self.get_tag(name=name) |                 item = self.get_tag(name=name) | ||||||
|                 note = ('existing_tag', item.qualified_name()) |                 note = ('existing_tag', item.qualified_name()) | ||||||
|             except exceptions.NoSuchTag: |             except exceptions.NoSuchTag: | ||||||
|                 item = self.new_tag(name) |                 item = self.new_tag(name, commit=False) | ||||||
|                 note = ('new_tag', item.qualified_name()) |                 note = ('new_tag', item.qualified_name()) | ||||||
|             output_notes.append(note) |             output_notes.append(note) | ||||||
|             return item |             return item | ||||||
|  | @ -1228,13 +1228,16 @@ class PhotoDB(PDBAlbumMixin, PDBBookmarkMixin, PDBPhotoMixin, PDBTagMixin, PDBUs | ||||||
|             tags = [create_or_get(t) for t in tag_parts] |             tags = [create_or_get(t) for t in tag_parts] | ||||||
|             for (higher, lower) in zip(tags, tags[1:]): |             for (higher, lower) in zip(tags, tags[1:]): | ||||||
|                 try: |                 try: | ||||||
|                     lower.join_group(higher) |                     lower.join_group(higher, commit=False) | ||||||
|                     note = ('join_group', '%s.%s' % (higher.name, lower.name)) |                     note = ('join_group', '%s.%s' % (higher.name, lower.name)) | ||||||
|                     output_notes.append(note) |                     output_notes.append(note) | ||||||
|                 except exceptions.GroupExists: |                 except exceptions.GroupExists: | ||||||
|                     pass |                     pass | ||||||
|             tag = tags[-1] |             tag = tags[-1] | ||||||
| 
 | 
 | ||||||
|  |         self.log.debug('Committing - easybake') | ||||||
|  |         self.commit() | ||||||
|  | 
 | ||||||
|         if synonym: |         if synonym: | ||||||
|             synonym = tag.add_synonym(synonym) |             synonym = tag.add_synonym(synonym) | ||||||
|             note = ('new_synonym', '%s+%s' % (tag.name, synonym)) |             note = ('new_synonym', '%s+%s' % (tag.name, synonym)) | ||||||
|  |  | ||||||
|  | @ -212,7 +212,7 @@ | ||||||
|         </ul> |         </ul> | ||||||
|         {% endif %} |         {% endif %} | ||||||
| 
 | 
 | ||||||
|         <a href="/search?created=-{{photo.created}}">←Before</a><span> | </span><a href="/search?created={{photo.created}}-">After→</a> |         <a href="/search?created=-{{photo.created}}">←Before</a><span> | </span><a href="/search?created={{photo.created}}-&orderby=created-asc">After→</a> | ||||||
|     </div> |     </div> | ||||||
|     <div id="message_area_bg"> |     <div id="message_area_bg"> | ||||||
|         <div id="message_area"> |         <div id="message_area"> | ||||||
|  |  | ||||||
|  | @ -21,6 +21,7 @@ body | ||||||
| #content_body | #content_body | ||||||
| { | { | ||||||
|     flex: 1; |     flex: 1; | ||||||
|  |     word-break: break-word; | ||||||
| } | } | ||||||
| #left | #left | ||||||
| { | { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue