1 |
cat /etc/*release |
install gradle sudo add-apt-repository ppa:cwchien/gradle sudo apt-get update sudo apt-get install gradle
static : relative : relatice to itself fixed: relatice to the browser window absoute:relative to its parent display: inline inline-block ?? box model: margin border padding box-sizing : border-box -moz-box-sizing float property overflow:auto ; if an element goes out of… Continue Reading →
selector { property:value ; } select element, class, id element h2,h3 { font-family:somefont ; color:red; } class i a m a div .classname { } div.classname {} applies only to div with class = “calssname” id #idname { } applying… Continue Reading →
reference: set dhcp client on ethernet 1 and ping inside mikrotik terminal set the ip for the lan set the wirelss ap bridge and name the ssid run the hotspot setup on lan, masquerade and … on the hot spot… Continue Reading →
reference: the modem is with IP 192.168.1.1 the bridge will be :192.168.10.1 the pool will be from .10.2 to .10.100 change the identity change time zone<h4< rename ethernet 1 and 2 ethernet 1 -> wan ethernet 2 -> lan activate… Continue Reading →
I am looking for solutions to this problem. Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error Details: The Jetpack server was unable to communicate with your site [HTTP 500]. Ask your web host if they allow… Continue Reading →
create a class for the form. the class can be in a seperate file. we will name it form.py
1 2 3 4 5 |
from flask_wtf import Form from wtforms import TextField class ContactForm(Form): name = TextField("Name Of Student") |
inside the main app: import the from create instance of the form render a template and passing the from to… Continue Reading →
to start the server
1 |
python manage.py runserver |
create the database
1 2 |
mysql-ctl start mysql-ctl cli |
1 2 |
show databases; create database whatever |
add the database info to the settings.py file
1 2 3 4 5 6 7 8 9 10 |
import os SECRET_KEY = "you-will-never-guess" DEBUG = True DB_USERNAME = 'abdullah12' DB_PASSWORD = '' BLOG_DATABASE_NAME = 'blog' DB_HOST = os.getenv('ip','0.0.0.0') DB_URI = "mysql+pymysql://%s:%s@%s/%s" %(DB_USERNAME,DB_PASSWORD,DB_HOST,BLOG_DATABASE_NAME) SQLALCHEMY_DATABASE_URI = DB_URI SQLALCHEMY_TRACK_MODIFICATIONS = True |
1 2 |
from flask.ext.sqlalchemy import SQLAlchemy db=SQLAlchemy(app) |
create a module = folder as in the course it is autor add it to the __init__.py
© 2018 CodingDOTNET — Powered by WordPress
Theme by Anders Noren — Up ↑
Recent Comments