implementing nested blueprint for api calls
This commit is contained in:
parent
fbdc6b4ee4
commit
d0908cf65d
4 changed files with 43 additions and 4 deletions
9
app/campaigns/campaign_api/__init__.py
Normal file
9
app/campaigns/campaign_api/__init__.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from flask import Blueprint
|
||||
|
||||
campaign_api = Blueprint('campaign_api',
|
||||
__name__,
|
||||
template_folder='templates',
|
||||
static_folder='static',
|
||||
url_prefix='/campaign_api')
|
||||
|
||||
from app.campaigns.campaign_api import routes
|
||||
7
app/campaigns/campaign_api/routes.py
Normal file
7
app/campaigns/campaign_api/routes.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
from flask import render_template
|
||||
from app.campaigns.campaign_api import campaign_api
|
||||
|
||||
|
||||
@campaign_api.route('testing')
|
||||
def testing():
|
||||
return render_template('testing.html')
|
||||
22
app/campaigns/campaign_api/templates/testing.html
Normal file
22
app/campaigns/campaign_api/templates/testing.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{% extends 'base.html' %}
|
||||
{% block title %}testing{% endblock title %}
|
||||
|
||||
{% block stylesheet %}
|
||||
<style>
|
||||
.custom-table {
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
overflow: hidden; /* Ensures rounded corners apply to the entire table */
|
||||
}
|
||||
</style>
|
||||
{% endblock stylesheet %}
|
||||
{% block content %}
|
||||
<main>
|
||||
<div class="container my-4 px-5">
|
||||
<h2 class="text-center">Testing Page</h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% endblock content %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue