Skip to content

Commit

Permalink
Step2: create blog app
Browse files Browse the repository at this point in the history
  • Loading branch information
yangxg committed Jul 24, 2019
1 parent b32dd80 commit 6930fdc
Show file tree
Hide file tree
Showing 11 changed files with 739 additions and 11 deletions.
14 changes: 14 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,42 @@


免费带你学 django 全栈!HelloDjango全栈系列教程 Step1。
<p align="center">
<img src="https://raw.githubusercontent.com/521xueweihan/img/master/hellogithub/logo/readme.gif"/>
<br><strong>HelloDjango-blog-tutorial</strong><br>
<strong>完全免费、开源的 HelloDjango 系列教程之博客开发</strong>。<br>
基于 django 2.2,带你从零开始一步步创建属于自己的博客网站。
</p>

django-blog-tutorial 全新升级!基于最新版 **Django 2.2**。带你从零开始一步步开发属于自己的博客网站,帮助你以最快的速度掌握 Django 开发的技巧。
<p align="center">
<a href="https://raw.githubusercontent.com/521xueweihan/img/master/hellogithub/logo/weixin.png"><img src="https://img.shields.io/badge/Talk-%E5%BE%AE%E4%BF%A1%E7%BE%A4-brightgreen.svg?style=popout-square" alt="WeiXin"></a>
<a href="https://github.com/HelloGitHub-Team/HelloDjango-blog-tutorial/stargazers"><img src="https://img.shields.io/github/stars/HelloGitHub-Team/HelloDjango-blog-tutorial.svg?style=popout-square" alt="GitHub stars"></a>
<a href="https://weibo.com/hellogithub"><img src="https://img.shields.io/badge/%E6%96%B0%E6%B5%AA-Weibo-red.svg?style=popout-square" alt="Sina Weibo"></a>
</p>

## 分支说明

tutorial 分支为项目的主分支,每一篇教程的代码都和历史提交以及标签一一对应。

例如第一篇教程对应第一个 commit,对应标签为 step1,依次类推。

## 资源列表

- [在线演示](https://django-blog-tutorial-v2-demo.zmrenwu.com/)
- 教程首发 HelloGitHub 微信公众号,博客同步更新:[HelloDjango - Django博客教程(第二版)](https://zmrenwu.com/courses/django-blog-tutorial-v2/)
- 首发 HelloGitHub 微信公众号,博客同步更新:[HelloDjango - Django博客教程(第二版)](https://zmrenwu.com/courses/django-blog-tutorial-v2/)
- 项目前端模板:[Blog templates](https://github.com/zmrenwu/django-blog-tutorial-templates)

## 教程目录索引
## 目录索引

**基础**

[1. 开始进入 django 开发之旅](https://www.zmrenwu.com/courses/HelloDjango-blog-tutorial/materials/59/)

## 公众号
<p align="center">
<img src="https://raw.githubusercontent.com/521xueweihan/img/master/hellogithub/logo/weixin.png" style="max-width:70%;"><br>
欢迎关注 HelloGitHub 公众号,获取更多开源项目的资料和内容。
</p>


comming soon~
## 声明
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">知识共享署名-相同方式共享 4.0 国际许可协议</a>进行许可。
Empty file added blog/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions blog/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
5 changes: 5 additions & 0 deletions blog/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class BlogConfig(AppConfig):
name = 'blog'
Empty file added blog/migrations/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions blog/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions blog/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions blog/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
8 changes: 2 additions & 6 deletions blogproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/

Expand All @@ -27,7 +26,6 @@

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
Expand All @@ -37,6 +35,8 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

'blog', # 注册 blog 应用
]

MIDDLEWARE = [
Expand Down Expand Up @@ -69,7 +69,6 @@

WSGI_APPLICATION = 'blogproject.wsgi.application'


# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases

Expand All @@ -80,7 +79,6 @@
}
}


# Password validation
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators

Expand All @@ -99,7 +97,6 @@
},
]


# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/

Expand All @@ -113,7 +110,6 @@

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/

Expand Down

0 comments on commit 6930fdc

Please sign in to comment.