Feat: \n 1. Contact Us page form submission success page created. \n 2. Contact Us page styling and CAPTCHA text content. \n 3. Removal of ERP, Google CAPTCHA, and ALTCHA API code and left over comments in JavaScript, Python.
This commit is contained in:
@@ -74,7 +74,6 @@ class Access_Level(db.Model, Base):
|
||||
}
|
||||
@classmethod
|
||||
def from_json(cls, json):
|
||||
Helper_App.console_log(f'Access Level.from_json: {json}')
|
||||
access_level = cls()
|
||||
access_level.id_access_level = json[cls.ATTR_ID_ACCESS_LEVEL],
|
||||
access_level.code = json[cls.FLAG_CODE],
|
||||
|
||||
@@ -94,7 +94,6 @@ class Address(db.Model, Base):
|
||||
return jsonify(self.to_json())
|
||||
@classmethod
|
||||
def from_json(cls, json):
|
||||
Helper_App.console_log(f'{cls.__name__}.from_json: {json}')
|
||||
address = cls()
|
||||
address.id_address = json[cls.ATTR_ID_ADDRESS],
|
||||
address.region = Region.from_json(json[cls.FLAG_REGION]),
|
||||
|
||||
32
business_objects/api.py
Normal file
32
business_objects/api.py
Normal file
@@ -0,0 +1,32 @@
|
||||
"""
|
||||
Project: PARTS Website
|
||||
Author: Edward Middleton-Smith
|
||||
Precision And Research Technology Systems Limited
|
||||
|
||||
Technology: Business Objects
|
||||
Feature: Base Business Object
|
||||
|
||||
Description:
|
||||
Abstract business object
|
||||
"""
|
||||
|
||||
# internal
|
||||
from extensions import db
|
||||
import lib.argument_validation as av
|
||||
# external
|
||||
from typing import ClassVar
|
||||
from flask import jsonify
|
||||
|
||||
|
||||
class API():
|
||||
|
||||
@staticmethod
|
||||
def get_standard_response(success: bool, status_code: int, message: str, data: any, errors: list, meta: dict):
|
||||
return jsonify({
|
||||
"success": success,
|
||||
"status_code": status_code,
|
||||
"message": message,
|
||||
"data": data,
|
||||
"errors": errors,
|
||||
"meta": meta
|
||||
})
|
||||
@@ -62,7 +62,6 @@ class Region(db.Model, Base):
|
||||
}
|
||||
@classmethod
|
||||
def from_json(cls, json):
|
||||
Helper_App.console_log(f'{cls.__name__}.from_json: {json}')
|
||||
plant = cls()
|
||||
plant.id_region = json[cls.ATTR_ID_REGION]
|
||||
plant.code = json[cls.FLAG_CODE]
|
||||
|
||||
@@ -79,7 +79,6 @@ class Unit_Measurement(SQLAlchemy_ABC, Base):
|
||||
}
|
||||
@classmethod
|
||||
def from_json(cls, json):
|
||||
Helper_App.console_log(f' Unit_Measurement.from_json: {json}')
|
||||
unit = cls()
|
||||
unit.id_unit_measurement = json[cls.ATTR_ID_UNIT_MEASUREMENT]
|
||||
unit.name_singular = json[cls.FLAG_NAME_SINGULAR]
|
||||
|
||||
Reference in New Issue
Block a user