Files
dog_training/controllers/dog/dog.py

48 lines
1.8 KiB
Python

"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: App Routing
Feature: Core - Contact Routes
Description:
Contact Page Controller.
"""
# IMPORTS
# internal
from business_objects.api import API
from business_objects.dog.command import Command
from business_objects.dog.dog_command_link import Dog_Command_Link
from datastores.datastore_dog import DataStore_Dog
from forms.dog.dog_command_link import Filters_Dog_Command_Link
from helpers.helper_app import Helper_App
from models.model_view_dog_base import Model_View_Dog_Base
from models.model_view_home import Model_View_Home
import lib.argument_validation as av
# external
from flask import Flask, render_template, jsonify, request, render_template_string, send_from_directory, redirect, url_for, session, Blueprint, current_app, flash, Response
from flask_mail import Mail, Message
from extensions import db, oauth, mail
from urllib.parse import quote_plus, urlencode
from authlib.integrations.flask_client import OAuth
from authlib.integrations.base_client import OAuthError
from urllib.parse import quote, urlparse, parse_qs
import json
import base64
import hmac
import hashlib
import datetime
from altcha import ChallengeOptions, create_challenge, verify_solution
routes_dog = Blueprint('routes_dog', __name__)
@routes_dog.route(Model_View_Dog_Base.HASH_GET_DOG_SCRIPTS_SHARED, methods=['GET'])
def scripts_section_dog():
hash_page_current = request.args.get('hash_page_current', default = Model_View_Dog_Base.HASH_GET_DOG_SCRIPTS_SHARED, type = str)
model = Model_View_Dog_Base(hash_page_current=hash_page_current)
template = render_template('js/sections/dog.js', model = model)
return Response(template, mimetype='application/javascript')