Add this in your ini file:
[alembic:exclude]
tables = spatial_ref_sys
In env.py
:
import re
Add this in your ini file:
[alembic:exclude]
tables = spatial_ref_sys
In env.py
:
import re
This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).
Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.
Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
named Scancode Map
.
import datetime, pytz | |
tz = pytz.timezone('Asia/Bangkok') | |
def now(): | |
now1 = datetime.datetime.now(tz) | |
month_name = 'x มกราคม กุมภาพันธ์ มีนาคม เมษายน พฤษภาคม มิถุนายน กรกฎาคม สิงหาคม กันยายน ตุลาคม พฤศจิกายน ธันวาคม'.split()[now1.month] | |
thai_year = now1.year + 543 | |
time_str = now1.strftime('%H:%M:%S') | |
return "%d %s %d %s"%(now1.day, month_name, thai_year, time_str) # 30 ตุลาคม 2560 20:45:30 |