Git Product home page Git Product logo

my_blog's Introduction

My_blog

Day01

1. 在github上创建一个My_blog的项目

2. 在笔记本电脑任意目录上,打开终端

git clone [email protected]:liyuan3970/My_blog.git

3. 进入这个文件夹

cd My_blog

4. 创建一个虚拟环境 

python -m venv env

5. 启动虚拟环境 source env/bin/active && 终止虚拟环境 deactivate

6. 安装django--->

pip install django==1.11.8

7. 创建一个django项目--->

django-admin startproject My_blog

8. 创建生产开发环境

  1. 在My_blog/My_blog下创建settings文件夹

  2. 在settings文件夹下创建product.py(实际上就是settings.py)

  3. 修改wsgi.py 和 manage.py两个文件

    profile = os.environ.get('MY_BLOG_PROFILE', 'product')
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "My_blog.settings.%s" % profile)
    #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "My_blog.settings")

    以上的步骤的作用是修改默认启动的settings文件 

9. 创建app

python manage.py startapp blog
python manage.py startapp config
python manage.py startapp comment

Day02~04

my_blog's People

Contributors

liyuan3970 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.