Skip to content

Commit f70fdbc

Browse files
committed
repo in repo///flask application
1 parent a3a6057 commit f70fdbc

File tree

318 files changed

+39989
-412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+39989
-412
lines changed

Project1-Dictionary/README.md

-4
This file was deleted.

Project2-Maps/Map1.html

+391-391
Large diffs are not rendered by default.

Project2-Maps/README.md

-7
This file was deleted.

Project3-Flask/script.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from flask import Flask ,render_template
2+
3+
app=Flask(__name__)
4+
@app.route('/')
5+
def home():
6+
return render_template("homepage.html")
7+
8+
@app.route('/about/')
9+
def about():
10+
return render_template("about.html")
11+
if __name__=="__main__":
12+
print(__name__)
13+
app.run(debug=True)
14+

Project3-Flask/static/css/main.css

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
body {
2+
margin: 0;
3+
padding: 0;
4+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
5+
color: #060;
6+
}
7+
8+
/*
9+
* Formatting the header area
10+
*/
11+
12+
header {
13+
background-color: #DFB887;
14+
height: 35px;
15+
width: 100%;
16+
opacity: .9;
17+
margin-bottom: 10px;
18+
}
19+
20+
header h1.logo {
21+
margin: 0;
22+
font-size: 1.7em;
23+
color: #fff;
24+
text-transform: uppercase;
25+
float: left;
26+
}
27+
28+
header h1.logo:hover {
29+
color: #fff;
30+
text-decoration: none;
31+
}
32+
33+
/*
34+
* Center the body content
35+
*/
36+
37+
.container {
38+
width: 1200px;
39+
margin: 0 auto;
40+
}
41+
42+
div.homepage {
43+
padding: 10px 0 30px 0;
44+
background-color: #E6E6FA;
45+
-webkit-border-radius: 6px;
46+
-moz-border-radius: 6px;
47+
border-radius: 6px;
48+
}
49+
50+
div.about {
51+
padding: 10px 0 30px 0;
52+
background-color: #E6E6FA;
53+
-webkit-border-radius: 6px;
54+
-moz-border-radius: 6px;
55+
border-radius: 6px;
56+
}
57+
58+
h2 {
59+
font-size: 3em;
60+
margin-top: 40px;
61+
text-align: center;
62+
letter-spacing: -2px;
63+
}
64+
65+
h3 {
66+
font-size: 1.7em;
67+
font-weight: 100;
68+
margin-top: 30px;
69+
text-align: center;
70+
letter-spacing: -1px;
71+
color: #999;
72+
}
73+
74+
.menu {
75+
float: right;
76+
margin-top: 8px;
77+
}
78+
79+
.menu li {
80+
display: inline;
81+
}
82+
83+
.menu li + li {
84+
margin-left: 35px;
85+
}
86+
87+
.menu li a {
88+
color: #444;
89+
text-decoration: none;
90+
}

Project3-Flask/templates/about.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{%extends "layout.html"%}
2+
{%block content%}
3+
<div class="about">
4+
<h1>About Page</h1>
5+
<p>I know JSP as well..</p>
6+
</div>
7+
{%endblock%}
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{%extends "layout.html"%}
2+
{%block content%}
3+
<div class="homepage">
4+
<h1>Home Page</h1>
5+
<p>This is my First Try in Python</p>
6+
</div>
7+
{%endblock%}

Project3-Flask/templates/layout.html

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Flask Application</title>
5+
<link rel="stylesheet" href="{{url_for('static',filename='css/main.css')}}">
6+
</head>
7+
<body>
8+
<header>
9+
<div class="container">
10+
<h1 class="logo">saharsh Web Page</h1>
11+
<strong><nav>
12+
<ul class="menu">
13+
<li><a href="{{url_for("home")}}">Home</a></li>
14+
<li><a href="{{url_for("about")}}">About</a></li>
15+
</ul>
16+
</nav></strong>
17+
</div>
18+
</header>
19+
<div class="container">
20+
{%block content%}
21+
{%endblock%}
22+
</div>
23+
</body>
24+
</html>
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 1c6fe300837e1262779c3291161e5a27a2d48a80

Project3-WebDevelopment/runtime.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.6.4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This file must be used with "source bin/activate" *from bash*
2+
# you cannot run it directly
3+
4+
deactivate () {
5+
# reset old environment variables
6+
if [ -n "$_OLD_VIRTUAL_PATH" ] ; then
7+
PATH="$_OLD_VIRTUAL_PATH"
8+
export PATH
9+
unset _OLD_VIRTUAL_PATH
10+
fi
11+
if [ -n "$_OLD_VIRTUAL_PYTHONHOME" ] ; then
12+
PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
13+
export PYTHONHOME
14+
unset _OLD_VIRTUAL_PYTHONHOME
15+
fi
16+
17+
# This should detect bash and zsh, which have a hash command that must
18+
# be called to get it to forget past commands. Without forgetting
19+
# past commands the $PATH changes we made may not be respected
20+
if [ -n "$BASH" -o -n "$ZSH_VERSION" ] ; then
21+
hash -r
22+
fi
23+
24+
if [ -n "$_OLD_VIRTUAL_PS1" ] ; then
25+
PS1="$_OLD_VIRTUAL_PS1"
26+
export PS1
27+
unset _OLD_VIRTUAL_PS1
28+
fi
29+
30+
unset VIRTUAL_ENV
31+
if [ ! "$1" = "nondestructive" ] ; then
32+
# Self destruct!
33+
unset -f deactivate
34+
fi
35+
}
36+
37+
# unset irrelevant variables
38+
deactivate nondestructive
39+
40+
VIRTUAL_ENV="/home/iknownothing/Documents/Projects-in-Python/Project3-WebDevelopment/virtualEnv"
41+
export VIRTUAL_ENV
42+
43+
_OLD_VIRTUAL_PATH="$PATH"
44+
PATH="$VIRTUAL_ENV/bin:$PATH"
45+
export PATH
46+
47+
# unset PYTHONHOME if set
48+
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
49+
# could use `if (set -u; : $PYTHONHOME) ;` in bash
50+
if [ -n "$PYTHONHOME" ] ; then
51+
_OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
52+
unset PYTHONHOME
53+
fi
54+
55+
if [ -z "$VIRTUAL_ENV_DISABLE_PROMPT" ] ; then
56+
_OLD_VIRTUAL_PS1="$PS1"
57+
if [ "x(virtualEnv) " != x ] ; then
58+
PS1="(virtualEnv) $PS1"
59+
else
60+
if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
61+
# special case for Aspen magic directories
62+
# see http://www.zetadev.com/software/aspen/
63+
PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
64+
else
65+
PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
66+
fi
67+
fi
68+
export PS1
69+
fi
70+
71+
# This should detect bash and zsh, which have a hash command that must
72+
# be called to get it to forget past commands. Without forgetting
73+
# past commands the $PATH changes we made may not be respected
74+
if [ -n "$BASH" -o -n "$ZSH_VERSION" ] ; then
75+
hash -r
76+
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This file must be used with "source bin/activate.csh" *from csh*.
2+
# You cannot run it directly.
3+
# Created by Davide Di Blasi <[email protected]>.
4+
# Ported to Python 3.3 venv by Andrew Svetlov <[email protected]>
5+
6+
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate'
7+
8+
# Unset irrelevant variables.
9+
deactivate nondestructive
10+
11+
setenv VIRTUAL_ENV "/home/iknownothing/Documents/Projects-in-Python/Project3-WebDevelopment/virtualEnv"
12+
13+
set _OLD_VIRTUAL_PATH="$PATH"
14+
setenv PATH "$VIRTUAL_ENV/bin:$PATH"
15+
16+
17+
set _OLD_VIRTUAL_PROMPT="$prompt"
18+
19+
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
20+
if ("virtualEnv" != "") then
21+
set env_name = "virtualEnv"
22+
else
23+
if (`basename "VIRTUAL_ENV"` == "__") then
24+
# special case for Aspen magic directories
25+
# see http://www.zetadev.com/software/aspen/
26+
set env_name = `basename \`dirname "$VIRTUAL_ENV"\``
27+
else
28+
set env_name = `basename "$VIRTUAL_ENV"`
29+
endif
30+
endif
31+
set prompt = "[$env_name] $prompt"
32+
unset env_name
33+
endif
34+
35+
alias pydoc python -m pydoc
36+
37+
rehash
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This file must be used with ". bin/activate.fish" *from fish* (http://fishshell.org)
2+
# you cannot run it directly
3+
4+
function deactivate -d "Exit virtualenv and return to normal shell environment"
5+
# reset old environment variables
6+
if test -n "$_OLD_VIRTUAL_PATH"
7+
set -gx PATH $_OLD_VIRTUAL_PATH
8+
set -e _OLD_VIRTUAL_PATH
9+
end
10+
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
11+
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
12+
set -e _OLD_VIRTUAL_PYTHONHOME
13+
end
14+
15+
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
16+
functions -e fish_prompt
17+
set -e _OLD_FISH_PROMPT_OVERRIDE
18+
functions -c _old_fish_prompt fish_prompt
19+
functions -e _old_fish_prompt
20+
end
21+
22+
set -e VIRTUAL_ENV
23+
if test "$argv[1]" != "nondestructive"
24+
# Self destruct!
25+
functions -e deactivate
26+
end
27+
end
28+
29+
# unset irrelevant variables
30+
deactivate nondestructive
31+
32+
set -gx VIRTUAL_ENV "/home/iknownothing/Documents/Projects-in-Python/Project3-WebDevelopment/virtualEnv"
33+
34+
set -gx _OLD_VIRTUAL_PATH $PATH
35+
set -gx PATH "$VIRTUAL_ENV/bin" $PATH
36+
37+
# unset PYTHONHOME if set
38+
if set -q PYTHONHOME
39+
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
40+
set -e PYTHONHOME
41+
end
42+
43+
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
44+
# fish uses a function instead of an env var to generate the prompt.
45+
46+
# save the current fish_prompt function as the function _old_fish_prompt
47+
functions -c fish_prompt _old_fish_prompt
48+
49+
# with the original prompt function renamed, we can override with our own.
50+
function fish_prompt
51+
# Save the return status of the last command
52+
set -l old_status $status
53+
54+
# Prompt override?
55+
if test -n "(virtualEnv) "
56+
printf "%s%s" "(virtualEnv) " (set_color normal)
57+
else
58+
# ...Otherwise, prepend env
59+
set -l _checkbase (basename "$VIRTUAL_ENV")
60+
if test $_checkbase = "__"
61+
# special case for Aspen magic directories
62+
# see http://www.zetadev.com/software/aspen/
63+
printf "%s[%s]%s " (set_color -b blue white) (basename (dirname "$VIRTUAL_ENV")) (set_color normal)
64+
else
65+
printf "%s(%s)%s" (set_color -b blue white) (basename "$VIRTUAL_ENV") (set_color normal)
66+
end
67+
end
68+
69+
# Restore the return status of the previous command.
70+
echo "exit $old_status" | .
71+
_old_fish_prompt
72+
end
73+
74+
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
75+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/home/iknownothing/Documents/Projects-in-Python/Project3-WebDevelopment/virtualEnv/bin/python3
2+
3+
# -*- coding: utf-8 -*-
4+
import re
5+
import sys
6+
7+
from setuptools.command.easy_install import main
8+
9+
if __name__ == '__main__':
10+
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11+
sys.exit(main())
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/home/iknownothing/Documents/Projects-in-Python/Project3-WebDevelopment/virtualEnv/bin/python3
2+
3+
# -*- coding: utf-8 -*-
4+
import re
5+
import sys
6+
7+
from setuptools.command.easy_install import main
8+
9+
if __name__ == '__main__':
10+
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11+
sys.exit(main())
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/home/iknownothing/Documents/Projects-in-Python/Project3-WebDevelopment/virtualEnv/bin/python3
2+
3+
# -*- coding: utf-8 -*-
4+
import re
5+
import sys
6+
7+
from pip import main
8+
9+
if __name__ == '__main__':
10+
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11+
sys.exit(main())

0 commit comments

Comments
 (0)