Py_web---GitHub code base using

Source: Internet
Author: User

1.install pip

###############################################

# yum-y Install Epel-release

# yum-y Install Python-pip

# pip Install--upgrade pip

# pip--version

Pip 9.0.1 from/usr/lib/python2.7/site-packages (Python 2.7)

#


2.install Flask

###############################################

# pip Install flask

Collecting flask

Downloading FLASK-0.12.2-PY2.PY3-NONE-ANY.WHL (83kB)

100% |████████████████████████████████| 92kB 264kb/s

Collecting click>=2.0 (from flask)

Downloading CLICK-6.7-PY2.PY3-NONE-ANY.WHL (71kB)

100% |████████████████████████████████| 71kB 1.6mb/s

Collecting jinja2>=2.4 (from flask)

Downloading JINJA2-2.9.6-PY2.PY3-NONE-ANY.WHL (340kB)

100% |████████████████████████████████| 348kB 3.2mb/s

Collecting werkzeug>=0.7 (from flask)

Downloading WERKZEUG-0.12.2-PY2.PY3-NONE-ANY.WHL (312kB)

100% |████████████████████████████████| 317kB 1.0mb/s

Collecting itsdangerous>=0.21 (from flask)

Downloading itsdangerous-0.24.tar.gz (46kB)

100% |████████████████████████████████| 51kB 2.0mb/s

Collecting markupsafe>=0.23 (from Jinja2>=2.4->flask)

Downloading markupsafe-1.0.tar.gz

Installing collected Packages:click, Markupsafe, JINJA2, Werkzeug, itsdangerous, flask

Running setup.py Install for markupsafe ... done

Running setup.py Install for itsdangerous ... done

Successfully installed jinja2-2.9.6 MarkupSafe-1.0 Werkzeug-0.12.2 click-6.7 flask-0.12.2 itsdangerous-0.24

#



3. Git repository usage



# yum install-y git

1). Initialize git repository

First, GitHub builds a code warehouse.

# # # initial Git

Local code base/opt/firstapp/py_web, remote code base address Https://github.com/longtian001/py_web

# Cd/opt/firstapp (Code Inventory put directory)

# # DEF remote origin

# git remote add Origin https://github.com/longtian001/py_web

# # # Get remote repository to local

# git clone https://github.com/longtian001/py_web


# # Watch Remote git

# git Remote-v

Origin Https://github.com/longtian001/py_web (Fetch)

Origin Https://github.com/longtian001/py_web (push)


2). All files are first submitted by remote Git repository)

# CD Py_web

# git Add. (Add changes to staging area)

# git commit-m "init prog"

# Git push Origin master pushes local changes to the remote master branch.


3). Add a new file

New code file added to the Py_web folder

# git Add newfile_name (add changes to staging area)

# git commit-m "Add new File"

# Git push Origin master pushes local changes to the remote master branch.


4). Submit after modifying files with the same name


If you already have a file on GitHub remote, an error will occur.

At this point, you should pull the first, namely:

# git Add.

# git commit-m "Modify add Flask"

# Git Pull Origin Master

And then proceed:

# Git push Origin Master



5). deleting files


# git RM *.py-r

RM ' hello.py '

RM ' hello02.py '

# git commit-m "rm py Files"

[Master 9f6ea78] RM py Files

committer:longtian001 <[email protected]>

Your name and email address were configured automatically based

On your username and hostname. Please check the that they is accurate.

You can suppress this message by setting them explicitly:


git config--global user.name "Your name"

git config--global user.email [email protected]


After doing this, your may fix the identity used for this commit with:


git commit--amend--reset-author


2 files changed, deletions (-)

Delete Mode 100644 hello.py

Delete Mode 100644 hello02.py

# Git push Origin Master

Username for ' https://github.com ': Enter user name

Password for ' https://[email protected] ': Enter password

Counting Objects:3, done.

Compressing objects:100% (1/1), done.

Writing objects:100% (2/2), 238 bytes | 0 bytes/s, done.

Total 2 (delta 0), reused 0 (Delta 0)

To Https://github.com/longtian001/py_web

E71FC04. 9f6ea78 Master, Master

#


This article is from the "Yiyi" blog, make sure to keep this source http://heyiyi.blog.51cto.com/205455/1958603

Py_web---GitHub code base using

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.