diff --git a/md_rahaman/MEAN/fundamentals/build_some_functions.js b/md_rahaman/MEAN/fundamentals/build_some_functions.js new file mode 100644 index 0000000..248175d --- /dev/null +++ b/md_rahaman/MEAN/fundamentals/build_some_functions.js @@ -0,0 +1,59 @@ + +function runningLogger(){ + console.log("I am running"); +} + +function multiplyByTen(val){ + console.log(val*10) + return val*10; +} + +function stringReturnOne(){ + return "Md" +} + + +function stringReturnTow(){ + return "Rahaman" +} + +function caller(arg){ + console.log(arg) + if (typeof arg === "function"){ + console.log("typeof may be useful") + } + console.log(stringReturnTow()) +} + +function myDoubleConsoleLog(arg1,arg2){ + if(typeof(arg1) === "function" && typeof(arg2) === "function"){ + console.log(arg1()) + console.log(arg2()) + } +} + + +function caller2(param){ + console.log('starting'); + var x = setTimeout(function(){ + if (typeof(param)=='function'){ + // notice the passed parameters... + param(stringReturnOne, stringReturnTow); + } + }, 2000); + console.log('ending'); + return "interesting"; +} + + + + + +multiplyByTen(5) +console.log(stringReturnOne()) +console.log(stringReturnTow()) +caller(stringReturnTow) +myDoubleConsoleLog(stringReturnOne,stringReturnTow) +caller2(myDoubleConsoleLog) + + diff --git a/md_rahaman/MEAN/fundamentals/interpreter.js b/md_rahaman/MEAN/fundamentals/interpreter.js new file mode 100644 index 0000000..2e47791 --- /dev/null +++ b/md_rahaman/MEAN/fundamentals/interpreter.js @@ -0,0 +1,33 @@ + +//problem 1 + +console.log(first_variable); +var first_variable; + +function firstFunc() { + first_variable = "Not anymore!!!"; + console.log(first_variable); +} + +first_variable = "Yipee I was first!"; +console.log(first_variable); +firstFunc() + +//problem 2 +var food = "Chicken"; +function eat() { + food = "half-chicken"; + console.log(food); + food = "gone"; // CAREFUL! + console.log(food); +} +eat(); +console.log(food); + +//problem3 +new_word = "NEW!"; +function lastFunc() { + new_word = "old"; +} +lastFunc() +console.log(new_word); \ No newline at end of file diff --git a/md_rahaman/MEAN/fundamentals/js_fun_III.js b/md_rahaman/MEAN/fundamentals/js_fun_III.js new file mode 100644 index 0000000..ce177ca --- /dev/null +++ b/md_rahaman/MEAN/fundamentals/js_fun_III.js @@ -0,0 +1,54 @@ +function person(name){ + this.name = name; + this.distance_travel = 0; + + this.say_name = function(){ + console.log(this.name) + } + + this.say_something = function(arg){ + console.log(this.name+' says '+arg) + } + + this.walk = function(){ + console.log(this.name+' is walking.') + this.distance_travel += 3 + } + + this.running = function(){ + console.log(this.name+ ' is running.') + this.distance_travel += 10 + } + + this.crawling = function(){ + console.log(this.name+ ' is crawling.') + this.distance_travel += 1 + } +} + +function ninjaConstructor(name, cohort){ + this.name = name; + this.cohort = cohort; + this.belt = "yello"; + + this.levelUp = function(param){ + this.belt = param + } +} + +var ninja1 = new ninjaConstructor("Md Rahaman", "uptown Func") +ninja1.levelUp("black") +console.log(ninja1.belt) + + + +// var person1 = new person("Md Rahaman") +// person1.say_name() +// person1.say_something('i am cool') +// person1.walk() +// person1.running() +// person1.crawling() +// console.log(person1.distance_travel) + + + diff --git a/md_rahaman/MEAN/fundamentals/js_fundamental2.js b/md_rahaman/MEAN/fundamentals/js_fundamental2.js new file mode 100644 index 0000000..7586a25 --- /dev/null +++ b/md_rahaman/MEAN/fundamentals/js_fundamental2.js @@ -0,0 +1,153 @@ +//Create a simple for loop that sums all the integers between x and y (inclusive). Have it console log the final sum. +x = [1, 5, 90, 25, -3, 0] + +function sum(x,y){ + var sum=0; + for(var i=x;i<=y;i++){ + sum = sum + i; + } + return sum; +} + +//Write a loop that will go through an array, find the minimum value, and then return it + +function findMin(arr){ + min = arr[0] + for(var i=0;iarr[i]){ + min = arr[i] + } + } + return min; +} +//Write a loop that will go through an array, find the average of all of the values, and then return it + +function avg(array){ + var min = array[0]; + var avg = 0; + var sum = 0; + for(var i=0; iarr[i]){ + min = arr[i] + } + } + return min; +} + +var avg=function(array){ + var min = array[0]; + var avg = 0; + var sum = 0; + for(var i=0; iarr[i]){ + min = arr[i] + } + } + return min; + } + + this.avg=function(array){ + var min = array[0]; + var avg = 0; + var sum = 0; + for(var i=0; i + + + Javascript Fundamentals 1 + + + +

Javascript Fundamentals 1

+ + + + + \ No newline at end of file diff --git a/md_rahaman/MEAN/fundamentals/js_fundamentals_I/main.js b/md_rahaman/MEAN/fundamentals/js_fundamentals_I/main.js new file mode 100644 index 0000000..226e905 --- /dev/null +++ b/md_rahaman/MEAN/fundamentals/js_fundamentals_I/main.js @@ -0,0 +1,58 @@ +x = [3,5,"Dojo", "rocks", "Michael", "Sensei"]; +console.log(x) + +for(var i=0; i"); +} +document.write("\n"); +document.write("
"); +x.push(100); +document.write(x); +document.write("
"); +x = ["hello", "world", "JavaScript is Fun"]; +document.write(x); + +//sum 1 to 5000: +var sum = 0; +for(var i=1;i<=5000;i++){ + sum = sum+i; +} +document.write("

Sum between 1 to 5000:"+sum+""); + +//finding minumim +var array = [1, 5, 90, 25, -3, 0] +var min = array[0]; +// var avg = 0; +var sum = 0; +for(var i=0; iarray[i]){ + min = array[i] + } +} +document.write("

Minimum of this array [1,5,90,25,-3,0]: "+ min+""); + +document.write("

Average of this array [1,5,90,25,-3,0]: "+ sum/array.length+"") + +for (var key in newNinja){ + document.write("

"+key+":"+newNinja[key]+"

") + document.write("
") + // console.log(key); + // console.log(newNinja[key]) +} + + + + diff --git a/md_rahaman/MEAN/fundamentals/pokemon_battle/index.html b/md_rahaman/MEAN/fundamentals/pokemon_battle/index.html new file mode 100644 index 0000000..8b8557f --- /dev/null +++ b/md_rahaman/MEAN/fundamentals/pokemon_battle/index.html @@ -0,0 +1,16 @@ + + + + Pokemon Battle + + + + + +

Pokemon Battle

+ + + + \ No newline at end of file diff --git a/md_rahaman/MEAN/fundamentals/pokemon_battle/main.js b/md_rahaman/MEAN/fundamentals/pokemon_battle/main.js new file mode 100644 index 0000000..73fcb00 --- /dev/null +++ b/md_rahaman/MEAN/fundamentals/pokemon_battle/main.js @@ -0,0 +1,50 @@ + + + +var game = { + players: [], + addPlayer: function(player){ + this.players.push(player); + }, + playGame: function(){ + //randomly select 2 players to battle + $('body').append(this.players[0].name) + console.log(this.players[0].name, " it is your turn!") + console.log('Your pokemon is ', this.players[0].hand[0].name) + console.log('your opponent', this.players[1].name) + console.log('Your pokemon is ', this.players[1].hand[0].name) + } + +}; + + + +function playerConstructor(name){ + player = {}; + player.name = name; + player.hand = []; + player.addCard = function(card){ + // console.log('upper scope', this) + var self = this; + rand = Math.floor((Math.random() * 811) + 1); + url = "http://pokeapi.co/api/v2/pokemon/"+rand+"/"; + $.get( + url, + function(res){ + self.hand.push(res); + }, + 'json' + ) + }; + game.addPlayer(player) + return player; +}; + +var json = playerConstructor("json") +var md = playerConstructor("Md") +// game.addPlayer(json) +// game.addPlayer(md) + + + + diff --git a/md_rahaman/python/full_stack_django/sports_orm b/md_rahaman/python/full_stack_django/sports_orm new file mode 160000 index 0000000..0fc2460 --- /dev/null +++ b/md_rahaman/python/full_stack_django/sports_orm @@ -0,0 +1 @@ +Subproject commit 0fc2460d5c9c0cef89a340db7cbee46a9dd72eb5 diff --git a/md_rahaman/python/mysql_flask/email_validation_with_db/mysqlconnection.py b/md_rahaman/python/mysql_flask/email_validation_with_db/mysqlconnection.py new file mode 100644 index 0000000..a12daeb --- /dev/null +++ b/md_rahaman/python/mysql_flask/email_validation_with_db/mysqlconnection.py @@ -0,0 +1,40 @@ +""" import the necessary modules """ +from flask_sqlalchemy import SQLAlchemy +from sqlalchemy.sql import text +# Create a class that will give us an object that we can use to connect to a database +class MySQLConnection(object): + def __init__(self, app, db): + config = { + 'host': 'localhost', + 'database': db, # we got db as an argument + 'user': 'root', + 'password': 'root', + 'port': '3306' # change the port to match the port your SQL server is running on + } + # this will use the above values to generate the path to connect to your sql database + DATABASE_URI = "mysql://{}:{}@127.0.0.1:{}/{}".format(config['user'], config['password'], config['port'], config['database']) + app.config['SQLALCHEMY_DATABASE_URI'] = DATABASE_URI + app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True + # establish the connection to database + self.db = SQLAlchemy(app) + # this is the method we will use to query the database + def query_db(self, query, data=None): + result = self.db.session.execute(text(query), data) + if query[0:6].lower() == 'select': + # if the query was a select + # convert the result to a list of dictionaries + list_result = [dict(r) for r in result] + # return the results as a list of dictionaries + return list_result + elif query[0:6].lower() == 'insert': + # if the query was an insert, return the id of the + # commit changes + self.db.session.commit() + # row that was inserted + return result.lastrowid + else: + # if the query was an update or delete, return nothing and commit changes + self.db.session.commit() +# This is the module method to be called by the user in server.py. Make sure to provide the db name! +def MySQLConnector(app, db): + return MySQLConnection(app, db) diff --git a/md_rahaman/python/mysql_flask/email_validation_with_db/server.py b/md_rahaman/python/mysql_flask/email_validation_with_db/server.py new file mode 100644 index 0000000..43fcb38 --- /dev/null +++ b/md_rahaman/python/mysql_flask/email_validation_with_db/server.py @@ -0,0 +1,52 @@ +from flask import Flask, request, redirect, render_template, session, flash +import os +from mysqlconnection import MySQLConnector +import re +EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+$') +app = Flask(__name__) +app.secret_key = os.urandom(24) + +mysql = MySQLConnector(app,'email') +@app.route('/') +def index(): + # friends = mysql.query_db("SELECT * FROM friends") + # print friends + + # query = "SELECT * FROM friends" + # friends = mysql.query_db(query) + return render_template('index.html') +# @app.route('/friends/') +# def show(): +# # add a friend to the database! +# query = "SELECT * FROM friends WHERE id = :specific_id" +# data = {'specific_id': friend_id} +# friends = mysql.query_db(query, data) +# return render_template('index.html', one_friend=friends[0]) + +# @app.route('/success') +# def success(): + + +@app.route('/validation', methods=['POST']) +def validation(): + email = request.form['email'] + # print email + if not EMAIL_REGEX.match(email): + flash('email shoud be vaild email') + else: + query = "INSERT INTO users (email, created_at, updated_at)VALUES (:email, NOW(), NOW())" + data = { + + 'email': request.form['email'] + } + # Run query, with dictionary values injected into the query. + mysql.query_db(query, data) + flash('The email address you entered (--'+request.form['email']+'--) is a VALID email address! Thank you!') + emails = mysql.query_db("SELECT * FROM users") + print emails + return render_template('success.html', all_emails = emails) + + return redirect('/') + + +app.run(debug=True) \ No newline at end of file diff --git a/md_rahaman/python/mysql_flask/email_validation_with_db/static/css/style.css b/md_rahaman/python/mysql_flask/email_validation_with_db/static/css/style.css new file mode 100644 index 0000000..1e2b878 --- /dev/null +++ b/md_rahaman/python/mysql_flask/email_validation_with_db/static/css/style.css @@ -0,0 +1,18 @@ +*{ + background-color: orange; + text-align: center; + padding: 20px; +} + +form { + font-size: 30px; +} + +#messege{ + color: red; + +} + + + + diff --git a/md_rahaman/python/mysql_flask/email_validation_with_db/static/css/style1.css b/md_rahaman/python/mysql_flask/email_validation_with_db/static/css/style1.css new file mode 100644 index 0000000..08f0910 --- /dev/null +++ b/md_rahaman/python/mysql_flask/email_validation_with_db/static/css/style1.css @@ -0,0 +1,19 @@ +*{ + padding: 20px; +} + + +#email{ + width: 410px; + outline: 1px solid black; + +} + +#messege{ + color: green; +} + +ul li{ + list-style-type: none; + display: inline-block; +} \ No newline at end of file diff --git a/md_rahaman/python/mysql_flask/email_validation_with_db/templates/index.html b/md_rahaman/python/mysql_flask/email_validation_with_db/templates/index.html new file mode 100644 index 0000000..fb15325 --- /dev/null +++ b/md_rahaman/python/mysql_flask/email_validation_with_db/templates/index.html @@ -0,0 +1,29 @@ + + + + Friends + + + + +
+ {% with messages = get_flashed_messages() %} + {%if messages %} + {% for message in messages %} +

{{message}}

+ {% endfor %} + {%endif%} + {% endwith %} +
+ +
+
+ + +
+ +
+ + + + \ No newline at end of file diff --git a/md_rahaman/python/mysql_flask/email_validation_with_db/templates/success.html b/md_rahaman/python/mysql_flask/email_validation_with_db/templates/success.html new file mode 100644 index 0000000..5b0ca89 --- /dev/null +++ b/md_rahaman/python/mysql_flask/email_validation_with_db/templates/success.html @@ -0,0 +1,28 @@ + + + + Succss + + + +

Welcome

+
+ {% with messages = get_flashed_messages() %} + {%if messages %} + {% for message in messages %} +

{{message}}

+ {% endfor %} + {%endif%} + {% endwith %} +
+

Email Addresses Entered:

+
+
    + {% for email in all_emails%} +
  • {{email['email']}}
  • +
  • {{email['created_at']}}
  • + {% endfor %} +
+
+ + \ No newline at end of file diff --git a/md_rahaman/python/mysql_flask/friends/mysqlconnection.py b/md_rahaman/python/mysql_flask/friends/mysqlconnection.py new file mode 100644 index 0000000..a12daeb --- /dev/null +++ b/md_rahaman/python/mysql_flask/friends/mysqlconnection.py @@ -0,0 +1,40 @@ +""" import the necessary modules """ +from flask_sqlalchemy import SQLAlchemy +from sqlalchemy.sql import text +# Create a class that will give us an object that we can use to connect to a database +class MySQLConnection(object): + def __init__(self, app, db): + config = { + 'host': 'localhost', + 'database': db, # we got db as an argument + 'user': 'root', + 'password': 'root', + 'port': '3306' # change the port to match the port your SQL server is running on + } + # this will use the above values to generate the path to connect to your sql database + DATABASE_URI = "mysql://{}:{}@127.0.0.1:{}/{}".format(config['user'], config['password'], config['port'], config['database']) + app.config['SQLALCHEMY_DATABASE_URI'] = DATABASE_URI + app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True + # establish the connection to database + self.db = SQLAlchemy(app) + # this is the method we will use to query the database + def query_db(self, query, data=None): + result = self.db.session.execute(text(query), data) + if query[0:6].lower() == 'select': + # if the query was a select + # convert the result to a list of dictionaries + list_result = [dict(r) for r in result] + # return the results as a list of dictionaries + return list_result + elif query[0:6].lower() == 'insert': + # if the query was an insert, return the id of the + # commit changes + self.db.session.commit() + # row that was inserted + return result.lastrowid + else: + # if the query was an update or delete, return nothing and commit changes + self.db.session.commit() +# This is the module method to be called by the user in server.py. Make sure to provide the db name! +def MySQLConnector(app, db): + return MySQLConnection(app, db) diff --git a/md_rahaman/python/mysql_flask/friends/server.py b/md_rahaman/python/mysql_flask/friends/server.py new file mode 100644 index 0000000..260e009 --- /dev/null +++ b/md_rahaman/python/mysql_flask/friends/server.py @@ -0,0 +1,37 @@ +from flask import Flask, request, redirect, render_template, session, flash +from mysqlconnection import MySQLConnector +app = Flask(__name__) +mysql = MySQLConnector(app,'friendsdb') +@app.route('/') +def index(): + # friends = mysql.query_db("SELECT * FROM friends") + # print friends + + query = "SELECT * FROM friends" + friends = mysql.query_db(query) + return render_template('index.html', all_friends=friends) +@app.route('/friends/') +def show(): + # add a friend to the database! + query = "SELECT * FROM friends WHERE id = :specific_id" + data = {'specific_id': friend_id} + friends = mysql.query_db(query, data) + return render_template('index.html', one_friend=friends[0]) + +@app.route('/friends', methods=['POST']) +def create(): + # print request.form['first_name'] + # print request.form['last_name'] + # print request.form['occupation'] + # add a friend to the database! + query = "INSERT INTO friends (first_name, last_name, occupation, created_at, updated_at)VALUES (:first_name, :last_name, :occupation, NOW(), NOW())" + data = { + 'first_name': request.form['first_name'], + 'last_name': request.form['last_name'], + 'occupation': request.form['occupation'] + } + # Run query, with dictionary values injected into the query. + mysql.query_db(query, data) + + return redirect('/') +app.run(debug=True) \ No newline at end of file diff --git a/md_rahaman/python/mysql_flask/friends/templates/index.html b/md_rahaman/python/mysql_flask/friends/templates/index.html new file mode 100644 index 0000000..ee24f31 --- /dev/null +++ b/md_rahaman/python/mysql_flask/friends/templates/index.html @@ -0,0 +1,33 @@ + + + Friends + + + + +

These are all my friends!

+ +{% for friend in all_friends: %} +

ID: {{ friend['id'] }}

+

First Name: {{ friend['first_name'] }}

+

Last Name: {{ friend['last_name'] }}

+

Occupation: {{ friend['occupation'] }}

+
+{% endfor %} +
+ + + + +
+ + \ No newline at end of file diff --git a/md_rahaman/python/mysql_flask/login_registration/mysqlconnection.py b/md_rahaman/python/mysql_flask/login_registration/mysqlconnection.py new file mode 100644 index 0000000..a12daeb --- /dev/null +++ b/md_rahaman/python/mysql_flask/login_registration/mysqlconnection.py @@ -0,0 +1,40 @@ +""" import the necessary modules """ +from flask_sqlalchemy import SQLAlchemy +from sqlalchemy.sql import text +# Create a class that will give us an object that we can use to connect to a database +class MySQLConnection(object): + def __init__(self, app, db): + config = { + 'host': 'localhost', + 'database': db, # we got db as an argument + 'user': 'root', + 'password': 'root', + 'port': '3306' # change the port to match the port your SQL server is running on + } + # this will use the above values to generate the path to connect to your sql database + DATABASE_URI = "mysql://{}:{}@127.0.0.1:{}/{}".format(config['user'], config['password'], config['port'], config['database']) + app.config['SQLALCHEMY_DATABASE_URI'] = DATABASE_URI + app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True + # establish the connection to database + self.db = SQLAlchemy(app) + # this is the method we will use to query the database + def query_db(self, query, data=None): + result = self.db.session.execute(text(query), data) + if query[0:6].lower() == 'select': + # if the query was a select + # convert the result to a list of dictionaries + list_result = [dict(r) for r in result] + # return the results as a list of dictionaries + return list_result + elif query[0:6].lower() == 'insert': + # if the query was an insert, return the id of the + # commit changes + self.db.session.commit() + # row that was inserted + return result.lastrowid + else: + # if the query was an update or delete, return nothing and commit changes + self.db.session.commit() +# This is the module method to be called by the user in server.py. Make sure to provide the db name! +def MySQLConnector(app, db): + return MySQLConnection(app, db) diff --git a/md_rahaman/python/mysql_flask/login_registration/server.py b/md_rahaman/python/mysql_flask/login_registration/server.py new file mode 100644 index 0000000..c7bc16d --- /dev/null +++ b/md_rahaman/python/mysql_flask/login_registration/server.py @@ -0,0 +1,114 @@ +from flask import Flask, request, redirect, render_template, session, flash +import os, binascii +from mysqlconnection import MySQLConnector +import re +import md5 +EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+$') +app = Flask(__name__) +app.secret_key = os.urandom(24) + +mysql = MySQLConnector(app,'login_registration') +@app.route('/') + +def index(): + if 'user_id' not in session: + session['user_id'] = 0 + # user_query = "SELECT * FROM users WHERE users.email = :email LIMIT 1" + + # query = "SELECT * FROM users" + # friends = mysql.query_db(query) + # print friends + return render_template('index.html') + + +@app.route('/login', methods=['POST']) +def login(): + email = request.form['email'] + password = request.form['password'] + user_query = "SELECT * FROM users WHERE users.email = :email LIMIT 1" + query_data = {'email':email} + user = mysql.query_db(user_query, query_data) + session['user_id'] =user[0]['id'] + + if user[0]: + encrypted_password = md5.new(password + user[0]['salt']).hexdigest(); + # print 'new encrypted password', encrypted_password + if user[0]['password'] == encrypted_password: + print 'successful' + return render_template('success.html') + else: + flash('invalid password') + else: + flash('invalid email') + return redirect('/') + + +@app.route('/regestration', methods=['POST']) +def regestration(): + email = request.form['email'] + print 'email-',email + print len(email) + + first_name = request.form['first-name'] + print 'First name-',first_name + print len(first_name) + + last_name = request.form['last-name'] + print 'Last name-',last_name + print len(last_name) + + password = request.form['password'] + print 'password-',password + print len(password) + + confirm_password = request.form['passwordconfirm'] + print 'confirm password-',confirm_password + print len(confirm_password) + + error = True + #len(first_name) & len(last_name) & len(password) & len(confirm_password)<1 + if len(first_name)<2 or len(last_name)<2: + flash('letters only, at least 2 characters and that it was submitted') + error = False + elif not str.isalpha(str(first_name)) or not str.isalpha(str(last_name)): + flash('letters only, at least 2 characters and that it was submitted') + error = False + elif not EMAIL_REGEX.match(email): + flash('email shoud be vaild email') + error = False + elif len(password)<9: + flash('password should be more than 8 characters') + error = False + elif password != confirm_password: + flash('password not match') + error = False + + ############################## + # inserting to database # + ############################## + if error == True: + salt = binascii.b2a_hex(os.urandom(15)) + encrypted_pw = md5.new(password + salt).hexdigest() + # print encrypted_pw + # print salt + insert_query = "INSERT INTO users (first_name,last_name,email,password,salt,created_at,updated_at) VALUES (:first_name, :last_name,:email, :encrypted_pw, :salt, NOW(), NOW())" + query_data = { + 'first_name':first_name, + 'last_name':last_name, + 'email': email, + 'encrypted_pw': encrypted_pw, + 'salt': salt, + } + + session['user_id'] = mysql.query_db(insert_query, query_data) + + return render_template('success.html') + return redirect('/') + + # user_query = "SELECT * FROM users WHERE users.email = :email LIMIT 1" + + + + + +app.run(debug=True) \ No newline at end of file diff --git a/md_rahaman/python/mysql_flask/login_registration/static/css/style.css b/md_rahaman/python/mysql_flask/login_registration/static/css/style.css new file mode 100644 index 0000000..4279943 --- /dev/null +++ b/md_rahaman/python/mysql_flask/login_registration/static/css/style.css @@ -0,0 +1,29 @@ +body{ + font-family: helvetica sans-serif; + font-size: 130%; +} + +input{ + height: 40px; + padding: 5px 5px 12px 5px; + font-size: 25px; + border-radius: 5px; + border: 1px solid grey; + width: 320px; +} + +label{ + position: relative; + top: 12px; + width: 200px; + float: left; +} + +#wrapper{ + width: 550px; + margin: 0 auto; +} + +.form-element{ + margin-bottom: 10px; +} diff --git a/md_rahaman/python/mysql_flask/login_registration/templates/index.html b/md_rahaman/python/mysql_flask/login_registration/templates/index.html new file mode 100644 index 0000000..116dac2 --- /dev/null +++ b/md_rahaman/python/mysql_flask/login_registration/templates/index.html @@ -0,0 +1,79 @@ + + + + Login and Registration + + + + +
+ {% with messages = get_flashed_messages() %} + {%if messages %} + {% for message in messages %} +

{{message}}

+ {% endfor %} + {%endif%} + {% endwith %} +
+
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+ + +
+ + +
+ +
+
+ +
+ + + + + + + \ No newline at end of file diff --git a/md_rahaman/python/mysql_flask/login_registration/templates/success.html b/md_rahaman/python/mysql_flask/login_registration/templates/success.html new file mode 100644 index 0000000..bf40786 --- /dev/null +++ b/md_rahaman/python/mysql_flask/login_registration/templates/success.html @@ -0,0 +1,14 @@ + + + + Succss + + + +

Welcome

+{{session['user_id']}} + +Logout + + + \ No newline at end of file