diff options
| author | Andrew <saintruler@gmail.com> | 2019-05-25 19:48:03 +0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2019-05-25 19:48:03 +0400 |
| commit | d83efe142c1d95ac04a52b03498b32b2df33c53e (patch) | |
| tree | 80d1e2228c378a243c542651a894d27cba92cb32 | |
| parent | 3b7f288c424bc12caf431fe2ab336bff2de86af9 (diff) | |
Исправлены ошибки в шаблоне и обработчике аргументов командной строки.
| -rw-r--r-- | day7/main.py | 4 | ||||
| -rw-r--r-- | day7/templates/form.html | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/day7/main.py b/day7/main.py index 7365d05..627706b 100644 --- a/day7/main.py +++ b/day7/main.py @@ -39,7 +39,7 @@ parser.add_argument( args = parser.parse_known_args(argv[1:])[0] -with (shelve.open(CONFIG_DB_PATH), shelve.open(args.cookies_db)) as (config, cookies): +with shelve.open(CONFIG_DB_PATH) as config: config['chunk'] = args.chunk_size config['short_log'] = args.short_log config['log_path'] = args.log @@ -48,7 +48,9 @@ with (shelve.open(CONFIG_DB_PATH), shelve.open(args.cookies_db)) as (config, coo config['host'] = args.host config['port'] = args.port + cookies = shelve.open(args.cookies_db) cookies['bg_color'] = args.bg_color + cookies.close() import http_handler diff --git a/day7/templates/form.html b/day7/templates/form.html index bff5030..781e448 100644 --- a/day7/templates/form.html +++ b/day7/templates/form.html @@ -48,7 +48,7 @@ </div> <div> - <form action="/" method="POST"> + <form action="/short_log" method="POST"> <input type="checkbox" name="short_log" value="1">Short log<br/> <input class="submit_btn" type="submit" value="Send"><br/> </form> |