_try. Internal helper function. This docstring was expanded to make future maintenance easier. Args: p: Parameter. Returns: Varies.
(p)
| 16812 | d: Parameter. |
| 16813 | |
| 16814 | Returns: |
| 16815 | Varies. |
| 16816 | """ |
| 16817 | self.__dict__.update(d) |
| 16818 | return render_template("profiler.html", title="Profiler", entries=[Obj(e) for e in entries], q=q) |
| 16819 | |
| 16820 | @app.route("/profiler/export", methods=["POST"]) |
| 16821 | @login_required |
| 16822 | def profiler_export(): |
| 16823 | """profiler_export. |
| 16824 | |
| 16825 | Route handler or application helper. |
| 16826 | |
| 16827 | This docstring was expanded to make future maintenance easier. |
| 16828 | |
| 16829 | Returns: |
| 16830 | Varies. |
| 16831 | """ |
| 16832 | owner = current_user() |
| 16833 | # Export all of *your* encrypted profiles into a zip in Downloads |
| 16834 | try: |
| 16835 | conn = db_connect() |
| 16836 | entries = conn.execute("SELECT id, first_enc, last_enc, info_enc, optional_enc, created_at, updated_at FROM profiler_entries WHERE owner=? ORDER BY id ASC", (owner,)).fetchall() |
| 16837 | att_rows = conn.execute("SELECT entry_id, filename_enc, mime_enc, stored_path, created_at FROM profiler_attachments WHERE entry_id IN (SELECT id FROM profiler_entries WHERE owner=?) ORDER BY id ASC", (owner,)).fetchall() |
| 16838 | conn.close() |
| 16839 | |
| 16840 | # Build export structure |