Add unicoding of input string (wordentries)
This commit is contained in:
parent
14118e4b0d
commit
9e72041d04
@ -59,7 +59,7 @@ _Внимание_! Только Python 2.7, только PostgreSQL, тольк
|
|||||||
postgres=# GRANT ALL privileges ON DATABASE fias_db TO phias;
|
postgres=# GRANT ALL privileges ON DATABASE fias_db TO phias;
|
||||||
postgres=# ALTER USER phias WITH SUPERUSER;
|
postgres=# ALTER USER phias WITH SUPERUSER;
|
||||||
postgres=# \q
|
postgres=# \q
|
||||||
postgres=# sudo -u phias psql -d fias_db -U phias
|
sudo -u phias psql -d fias_db -U phias
|
||||||
postgres=# CREATE EXTENSION pg_trgm SCHEMA public;
|
postgres=# CREATE EXTENSION pg_trgm SCHEMA public;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -16,3 +16,5 @@ db_conf.password = "postgres"
|
|||||||
|
|
||||||
unrar_config.path = "unrar"
|
unrar_config.path = "unrar"
|
||||||
folders.temp = "/tmp/py-fias"
|
folders.temp = "/tmp/py-fias"
|
||||||
|
|
||||||
|
basic.logging = True
|
@ -44,7 +44,7 @@ class WordEntry:
|
|||||||
|
|
||||||
def __init__(self, db, word):
|
def __init__(self, db, word):
|
||||||
self.db = db
|
self.db = db
|
||||||
self.word = str(word)
|
self.word = unicode(word)
|
||||||
self.word_len = len(unicode(self.word))
|
self.word_len = len(unicode(self.word))
|
||||||
self.variations = []
|
self.variations = []
|
||||||
self.scname = None
|
self.scname = None
|
||||||
|
@ -5,4 +5,4 @@ from aore import phias
|
|||||||
application = phias.app
|
application = phias.app
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
application.run(host='0.0.0.0', port=55001, debug=True)
|
application.run(host='0.0.0.0', port=8087, debug=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user