chellow 1730296955.0.0__py3-none-any.whl → 1730306906.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of chellow might be problematic. Click here for more details.

chellow/__init__.py CHANGED
@@ -74,7 +74,6 @@ def create_app(testing=False, instance_path=None):
74
74
  app.register_blueprint(chellow.views.home)
75
75
  app.register_blueprint(chellow.e.views.e)
76
76
  app.register_blueprint(chellow.gas.views.gas)
77
- chellow.utils.root_path = app.root_path
78
77
 
79
78
  api = chellow.api.api
80
79
  api.init_app(app, endpoint="/api/v1")
@@ -90,6 +89,7 @@ def create_app(testing=False, instance_path=None):
90
89
  props = configuration.make_properties()
91
90
  api_props = props.get("api", {})
92
91
  api.description = api_props.get("description", "Access Chellow data")
92
+ chellow.utils.url_root = props.get("url_root", "")
93
93
 
94
94
  chellow.dloads.startup(Path(app.instance_path), run_deleter=(not testing))
95
95
 
@@ -116,20 +116,6 @@ def create_app(testing=False, instance_path=None):
116
116
  )
117
117
  print(msg)
118
118
 
119
- try:
120
- scheme = request.headers["X-Forwarded-Proto"]
121
- except KeyError:
122
- config_contract = Contract.get_non_core_by_name(g.sess, "configuration")
123
- props = config_contract.make_properties()
124
- scheme = props.get("redirect_scheme", "http")
125
-
126
- try:
127
- host = request.headers["X-Forwarded-Host"]
128
- except KeyError:
129
- host = request.host
130
-
131
- chellow.utils.url_root = scheme + "://" + host
132
-
133
119
  @app.before_request
134
120
  def check_permissions(*args, **kwargs):
135
121
  g.user = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chellow
3
- Version: 1730296955.0.0
3
+ Version: 1730306906.0.0
4
4
  Summary: Web Application for checking UK energy bills.
5
5
  Project-URL: Homepage, https://github.com/WessexWater/chellow
6
6
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
@@ -1,4 +1,4 @@
1
- chellow/__init__.py,sha256=hejB7bPYedSLGaDsHR0_g3UTF7gKfQkdE4zuzoB3A5A,10242
1
+ chellow/__init__.py,sha256=ML9TeTCsCbEEjXLwe9BjeSe9WDj9VVgfdfW-D74oxVU,9785
2
2
  chellow/api.py,sha256=mk17TfweR76DPFC8lX2SArTjai6y6YshASxqO1w-_-s,11036
3
3
  chellow/bank_holidays.py,sha256=T_utYMwe_g1dz5X-aOTdIPryg49SvB7QsWM1yphlqG8,4423
4
4
  chellow/commands.py,sha256=ESBe9ZWj1c3vdZgqMZ9gFvYAB3hRag2R1PzOwuw9yFo,1302
@@ -377,6 +377,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
377
377
  chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
378
378
  chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
379
379
  chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
380
- chellow-1730296955.0.0.dist-info/METADATA,sha256=EWZqlbrVtZnK0QYT9y6umoxEQNWbIAPMBYFWvnPr9WU,12204
381
- chellow-1730296955.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
382
- chellow-1730296955.0.0.dist-info/RECORD,,
380
+ chellow-1730306906.0.0.dist-info/METADATA,sha256=bhdp0UZlh1JYunlv3N7oBw4ggmLxl4bplW2oO7ftQlM,12204
381
+ chellow-1730306906.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
382
+ chellow-1730306906.0.0.dist-info/RECORD,,