Skip to content

Commit

Permalink
my todo app with crud operation is complete, now towords deploymennt …
Browse files Browse the repository at this point in the history
…stage
  • Loading branch information
Ctoic committed Oct 1, 2023
1 parent 6963b18 commit f314ce9
Show file tree
Hide file tree
Showing 7 changed files with 265 additions and 181 deletions.
4 changes: 4 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@

- Jinja2 ships with many of filters. Filters in Jinja2 are a way of transforming template expressions from one kind of data into another. They are similar to functions in that they take arguments and produce an output. Filters are separated from the variable by a pipe symbol (|) and may have optional arguments in parentheses. Multiple filters can be chained. The output of one filter is applied to the next.

# Template Inheritence in jinja2
- Jinja2 supports template inheritance. Template inheritance allows you to build a base “skeleton” template that contains all the common elements of your site and defines blocks that child templates can override.
- Jinja2 is a template engine for Python. It is a text-based template language and thus can be used to generate any markup as well as source code.
- Jinja2 is one of the most used template engines for Python. It is inspired by Django’s templating system but extends it with an expressive language that gives template authors a more powerful set of tools.

## A table which contain For prerequisite and installation of Flask and Flask-RESTful

Expand Down
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def delete(id):
@app.route('/about')
def about():
return render_template('about.html')




Expand Down
Binary file modified instance/todo.db
Binary file not shown.
14 changes: 14 additions & 0 deletions templates/Flask-Harry.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"folders": [
{
"path": ".."
},
{
"name": "Flask-Harry",
"path": "../Flask-Harry"
}
],
"settings": {
"liveServer.settings.multiRootWorkspaceName": "Flask-Harry"
}
}
102 changes: 102 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>

<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>

<title>
{%block title%}
{%endblock title%}- Mytodo
</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="/">Task Manager</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#"
>Home <span class="sr-only">(current)</span></a
>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
<li class="nav-item dropdown">
<a
class="nav-link dropdown-toggle"
href="#"
id="navbarDropdown"
role="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
Dropdown
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true"
>Disabled</a
>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input
class="form-control mr-sm-2"
type="search"
placeholder="Search"
aria-label="Search"
/>
<button class="btn btn-outline-dark my-2 my-sm-0" type="submit">
Search
</button>
</form>
</div>
</nav>

{%block body%}



{%endblock body%}



</body>


</div>
<!-- End of .container -->
</html>

Loading

0 comments on commit f314ce9

Please sign in to comment.