Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 00d0ef943d |
@ -1,12 +1,10 @@
|
|||||||
# MOVED PERMANENTLY TO GITHUB
|
|
||||||
https://github.com/michigg/codimd_note_overview
|
|
||||||
# CodiMD note overview
|
# CodiMD note overview
|
||||||
|
|
||||||
|
|
||||||
a searchable list of existing hackmd pads – [https://padlist.wiai.de/](https://padlist.wiai.de/)
|
a searchable list of existing hackmd pads – [https://padlist.wiai.de/](https://padlist.wiai.de/)
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Testing locally
|
## Testing locally
|
||||||
|
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
import os
|
|
||||||
import psycopg2
|
|
||||||
|
|
||||||
DB_HOST = os.environ.get('DB_HOST')
|
|
||||||
DB_NAME = os.environ.get('POSTGRES_DB')
|
|
||||||
DB_USER = os.environ.get('POSTGRES_USER')
|
|
||||||
DB_PASSWORD = os.environ.get('POSTGRES_PASSWORD')
|
|
||||||
|
|
||||||
deletion_statement = 'DELETE FROM "Notes" WHERE "content" = \'\';'
|
|
||||||
|
|
||||||
try:
|
|
||||||
conn = psycopg2.connect(host=DB_HOST, database=DB_NAME, user=DB_USER, password=DB_PASSWORD)
|
|
||||||
cur = conn.cursor()
|
|
||||||
cur.execute(deletion_statement)
|
|
||||||
conn.commit()
|
|
||||||
cur.close()
|
|
||||||
conn.close()
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
Reference in New Issue
Block a user