Skip to content

Commit

Permalink
fixed jinja error; see #232
Browse files Browse the repository at this point in the history
  • Loading branch information
bhpayne committed Aug 29, 2021
1 parent 1dcd1e1 commit 14496f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions v7_pickle_web_interface/flask/common_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def create_sql_connection(db_file: str):
# logger.info("[trace end " + trace_id + "]")
return my_db
except sqlite3.Error:
logger.error("common_lib create_sql_connection sqlite3 connection:"+str(sqlite3.Error))
logger.error(
"common_lib create_sql_connection sqlite3 connection:"
+ str(sqlite3.Error)
)
raise Exception(str(sqlite3.Error))
else: # file does not exist
logger.info(db_file + " does not seem to exist; creating it")
Expand Down Expand Up @@ -178,14 +181,13 @@ def write_db(path_to_db: str, dat: dict) -> None:
else:
raise Exception("no connection to sql database")

try: # delete whatever is in SQL to prepare for overwriting with SQL
try: # delete whatever is in SQL to prepare for overwriting with SQL
cur.execute("""drop table data""")
logger.debug("deleted table from sql")
except sqlite3.OperationalError as err:
logger.error("common_lib write_db sqlite3.OperationalError")
logger.error('Unable to drop "data"; ' + str(err))


# table "data" with column "entry"
cur.execute("""CREATE TABLE data ("entry TEXT NOT NULL")""")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ <H3>Expressions Central to Physics</H3>
</UL>
</td> <!-- description -->
</tr><tr>
<td>\( \frac{\Delta p}{L} = f_\mathrm{D} \cdot \frac{\rho }{2} \cdot \frac{{\langle v \rangle}^2}{D} \)</td> <!-- expression -->
<td>\( \frac{\Delta p}{L} = f_{\mathrm{D}} \cdot \frac{\rho }{2} \cdot \frac{\langle v \rangle^2}{D} \)</td> <!-- expression -->
<td>
<a name="">
<a href="https://en.wikipedia.org/wiki/Darcy%E2%80%93Weisbach_equation" title="Darcy–Weisbach equation">Darcy–Weisbach equation</a>
Expand All @@ -310,7 +310,7 @@ <H3>Expressions Central to Physics</H3>
<UL>
<LI>\( \Delta p \) is PDG symbol<a href="{{ url_for('list_all_symbols') }}?referrer=central_expressions#"></a>, </LI>
<LI>\( L \) is PDG symbol<a href="{{ url_for('list_all_symbols') }}?referrer=central_expressions#"></a>, </LI>
<LI>\( f_\mathrm{D} \) is PDG symbol<a href="{{ url_for('list_all_symbols') }}?referrer=central_expressions#"></a>, </LI>
<LI>\( f_{\mathrm{D}} \) is PDG symbol<a href="{{ url_for('list_all_symbols') }}?referrer=central_expressions#"></a>, </LI>
<LI>\( \rho \) is PDG symbol<a href="{{ url_for('list_all_symbols') }}?referrer=central_expressions#"></a>, </LI>
<LI>\( v \) is PDG symbol<a href="{{ url_for('list_all_symbols') }}?referrer=central_expressions#"></a>, </LI>
<LI>\( D \) is PDG symbol<a href="{{ url_for('list_all_symbols') }}?referrer=central_expressions#"></a>, </LI>
Expand Down

0 comments on commit 14496f0

Please sign in to comment.