Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cicekhayri committed Dec 14, 2023
1 parent a7ece0f commit f2da76b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions pyblaze/helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from .responses import HttpResponse


template = """
<!DOCTYPE html>
<html>
Expand Down Expand Up @@ -54,15 +53,14 @@
def format_server_exception():
msg = template.format(
message="Internal Server Error"
"<br><br>We are currently trying to fix the problem.",
status_code=500
"<br><br>We are currently trying to fix the problem.",
status_code=500,
)
return HttpResponse(content=msg, status_code=500, content_type="text/html")


def format_not_found_exception():
msg = template.format(
message="Ooops!!! The page you are looking for is not found",
status_code=404
message="Ooops!!! The page you are looking for is not found", status_code=404
)
return HttpResponse(content=msg, status_code=404, content_type="text/html")
return HttpResponse(content=msg, status_code=404, content_type="text/html")
2 changes: 1 addition & 1 deletion pyblaze/pyblaze.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from pyblaze.config import Config
from pyblaze.enums import HttpMethod
from pyblaze.helpers import format_server_exception, format_not_found_exception
from pyblaze.helpers import format_not_found_exception, format_server_exception
from pyblaze.requests import Request, RequestContext
from pyblaze.responses import TemplateResponse
from pyblaze.sessions import encode_session_data, get_or_create_session
Expand Down

0 comments on commit f2da76b

Please sign in to comment.