Browse Source

fixed global variables config, added lxml as a dependency

master
Vašek Šraier 6 years ago
parent
commit
d9ffa725e4
  1. 1
      Pipfile
  2. 36
      Pipfile.lock
  3. 6
      register.py

1
Pipfile

@ -11,6 +11,7 @@ click = "*"
beautifulsoup4 = "*"
six = "*"
termcolor = "*"
lxml = "*"
[requires]
python_version = "3"

36
Pipfile.lock

@ -1,11 +1,11 @@
{
"_meta": {
"hash": {
"sha256": "20373be879178f1bb02ee758f0f2d2d3b9a471d92c583b09a1896b833125c1c2"
"sha256": "b3919507bc0b38aec128ddc5d3e67bfa4ddce8ebfbee114635c50d1b0143b90d"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.5"
"python_version": "3"
},
"sources": [
{
@ -54,6 +54,38 @@
],
"version": "==2.8"
},
"lxml": {
"hashes": [
"sha256:0358b9e9642bc7d39aac5cffe9884a99a5ca68e5e2c1b89e570ed60da9139908",
"sha256:091a359c4dafebbecd3959d9013f1b896b5371859165e4e50b01607a98d9e3e2",
"sha256:1998e4e60603c64bcc35af61b4331ab3af087457900d3980e18d190e17c3a697",
"sha256:2000b4088dee9a41f459fddaf6609bba48a435ce6374bb254c5ccdaa8928c5ba",
"sha256:2afb0064780d8aaf165875be5898c1866766e56175714fa5f9d055433e92d41d",
"sha256:2d8f1d9334a4e3ff176d096c14ded3100547d73440683567d85b8842a53180bb",
"sha256:2e38db22f6a3199fd63675e1b4bd795d676d906869047398f29f38ca55cb453a",
"sha256:3181f84649c1a1ca62b19ddf28436b1b2cb05ae6c7d2628f33872e713994c364",
"sha256:37462170dfd88af8431d04de6b236e6e9c06cda71e2ca26d88ef2332fd2a5237",
"sha256:3a9d8521c89bf6f2a929c3d12ad3ad7392c774c327ea809fd08a13be6b3bc05f",
"sha256:3d0bbd2e1a28b4429f24fd63a122a450ce9edb7a8063d070790092d7343a1aa4",
"sha256:483d60585ce3ee71929cea70949059f83850fa5e12deb9c094ed1c8c2ec73cbd",
"sha256:4888be27d5cba55ce94209baef5bcd7bbd7314a3d17021a5fc10000b3a5f737d",
"sha256:64b0d62e4209170a2a0c404c446ab83b941a0003e96604d2e4f4cb735f8a2254",
"sha256:68010900898fdf139ac08549c4dba8206c584070a960ffc530aebf0c6f2794ef",
"sha256:872ecb066de602a0099db98bd9e57f4cfc1d62f6093d94460c787737aa08f39e",
"sha256:88a32b03f2e4cd0e63f154cac76724709f40b3fc2f30139eb5d6f900521b44ed",
"sha256:b1dc7683da4e67ab2bebf266afa68098d681ae02ce570f0d1117312273d2b2ac",
"sha256:b29e27ce9371810250cb1528a771d047a9c7b0f79630dc7dc5815ff828f4273b",
"sha256:ce197559596370d985f1ce6b7051b52126849d8159040293bf8b98cb2b3e1f78",
"sha256:d45cf6daaf22584eff2175f48f82c4aa24d8e72a44913c5aff801819bb73d11f",
"sha256:e2ff9496322b2ce947ba4a7a5eb048158de9d6f3fe9efce29f1e8dd6878561e6",
"sha256:f7b979518ec1f294a41a707c007d54d0f3b3e1fd15d5b26b7e99b62b10d9a72e",
"sha256:f9c7268e9d16e34e50f8246c4f24cf7353764affd2bc971f0379514c246e3f6b",
"sha256:f9c839806089d79de588ee1dde2dae05dc1156d3355dfeb2b51fde84d9c960ad",
"sha256:ff962953e2389226adc4d355e34a98b0b800984399153c6678f2367b11b4d4b8"
],
"index": "pypi",
"version": "==4.3.2"
},
"requests": {
"hashes": [
"sha256:502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e",

6
register.py

@ -142,6 +142,12 @@ def register(username: str, seminar: str, fullname: str, email: str, host, admin
V souboru config.py je mozne nastavit token a URL perzistentne.
"""
global HOST
HOST = host if host is not None else HOST
global ADMIN_TOKEN
ADMIN_TOKEN = admin_token if admin_token is not None else ADMIN_TOKEN
api_client = ApiClient()
api_client.configuration.host = host if host is not None else HOST
api_client.configuration.api_key = {'token': admin_token if admin_token is not None else ADMIN_TOKEN}

Loading…
Cancel
Save