Git Product home page Git Product logo

blogproject's Introduction

blogproject

William的个人博客项目

功能简介

基于python-3.5,django-1.10搭建,实现博客文章分页,用户评论,文章分类等功能

在本地运行项目

克隆项目到本地

打开命令行,进入到保存项目的文件夹,输入如下命令:

git clone https://github.com/zmrenwu/django-blog-tutorial.git

创建并激活虚拟环境 在命令行进入到保存虚拟环境的文件夹,输入如下命令创建并激活虚拟环境:

virtualenv blogproject_env

# windows
blogproject_env\Scripts\activate

# linux
source blogproject_env/bin/activate

如果不想使用虚拟环境,可以跳过这一步。

安装项目依赖

如果使用了虚拟环境,确保激活并进入了虚拟环境,在命令行进入项目所在的 django-blog-tutorial 文件夹,运行如下命令:

pip install -r requirements.txt

迁移数据库

在上一步所在的位置运行如下命令迁移数据库:

python manage.py migrate

创建后台管理员账户

在上一步所在的位置运行如下命令创建后台管理员账户

python manage.py createsuperuser

运行开发服务器

在上一步所在的位置运行如下命令开启开发服务器:

python manage.py runserver

在浏览器输入:127.0.0.1:8000 进入后台发布文章 在浏览器输入:127.0.0.1:8000/admin 使用第 5 步创建的后台管理员账户登录

blogproject's People

Contributors

williamgwj 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.