roundabout,
                
                    created on Sunday,  8 September 2024, 06:17:04 (1725776224),
                    received on Sunday,  8 September 2024, 10:58:33 (1725793113)
                
                
                Author identity: vlad <vlad.muntoiu@gmail.com>
            
6ed0b4d01389a79f122b1c32b023c50991ab539b
            app.py
@@ -13,6 +13,7 @@ from jinja2_fragments.flask import render_block
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            from sqlalchemy.orm import backref 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            import sqlalchemy.dialects.postgresql 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            from os import path 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        import os
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            from urllib.parse import urlencode 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            import mimetypes 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            import ruamel.yaml as yaml 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                         
                                    
                                    
                                    
                                    
                                    
                                    @@ -627,6 +628,33 @@ def edit_picture_post(id):
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                return flask.redirect("/picture/" + str(resource.id)) 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @app.route("/query-pictures", methods=["POST"])      # sadly GET can't have a body 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            def query_pictures(): 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                offset = int(flask.request.args.get("offset", 0)) 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                 
                            
                        templates/upload.html
@@ -3,7 +3,7 @@
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            {% block content %} 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                <x-frame style="--width: 768px"> 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    <form method="POST" class="vbox" enctype="multipart/form-data"> 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    <h2>Upload</h2>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    <h1>Upload a picture</h1>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        <label> 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            <span class="required-asterisk">Title</span> 
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            <input type="text" name="title" required>