lazyflat: combined alert + apply behind authenticated web UI
Three isolated services (alert scraper, apply HTTP worker, web UI+DB) with argon2 auth, signed cookies, CSRF, rate-limited login, kill switch, apply circuit breaker, audit log, and strict CSP. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
69f2f1f635
46 changed files with 4183 additions and 0 deletions
33
apply/classes/application_result.py
Normal file
33
apply/classes/application_result.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
from language import _
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger("flat-apply")
|
||||
|
||||
class ApplicationResult:
|
||||
def __init__(self, success: bool, message: str=""):
|
||||
self.success = success
|
||||
self.message = message
|
||||
|
||||
def __str__(self):
|
||||
string = ""
|
||||
if self.success:
|
||||
string += _("application_success")
|
||||
else:
|
||||
string += _("application_failed")
|
||||
|
||||
if self.message:
|
||||
string += "\n"
|
||||
string += self.message
|
||||
return string
|
||||
|
||||
def __repr__(self):
|
||||
string = ""
|
||||
if self.success:
|
||||
string += "success"
|
||||
else:
|
||||
string += "failed"
|
||||
|
||||
if self.message:
|
||||
string += ": "
|
||||
string += self.message
|
||||
return string
|
||||
Loading…
Add table
Add a link
Reference in a new issue