Skip to content

基于 Django 1.10 和 Python 3.5搭建的博客系统

License

Notifications You must be signed in to change notification settings

xxm-wu/blogproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

基于 Django 1.10 和 Python 3.5搭建的博客系统

功能

环境配置

安装

  1. 克隆项目到本地

    git clone https://github.com/JiamingWu233/blogproject.git
    
  2. 创建并激活虚拟环境 在命令行进入到保存虚拟环境的文件夹,输入如下命令创建并激活虚拟环境:

    virtualenv blogproject_env
    windows:
    blogproject_env\Scripts\activate
    linux:
    source blogproject_env/bin/activate
    
  3. 安装项目依赖 如果使用了虚拟环境,确保激活并进入了虚拟环境,在命令行进入项目所在的 django-blog-tutorial 文件夹,运行如下命令:

    pip install -r requirements.txt
    
  4. 迁移数据库

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

    python manage.py migrate
    
  5. 创建后台管理员账户

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

    python manage.py createsuperuser
    
  6. 运行开发服务器

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

    python manage.py runserver
    

    在浏览器输入:127.0.0.1:8000

  7. 进入后台发布文章

    在浏览器输入:127.0.0.1:8000/admin

    使用第 5 步创建的后台管理员账户登录

感谢

Copyright 2017 Kaming

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

基于 Django 1.10 和 Python 3.5搭建的博客系统

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published