Skip to content

Commit ebfc8c8

Browse files
author
yangxg
committed
Step2: create blog app
1 parent 1302094 commit ebfc8c8

File tree

8 files changed

+18
-6
lines changed

8 files changed

+18
-6
lines changed

blog/__init__.py

Whitespace-only changes.

blog/admin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.

blog/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class BlogConfig(AppConfig):
5+
name = 'blog'

blog/migrations/__init__.py

Whitespace-only changes.

blog/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.db import models
2+
3+
# Create your models here.

blog/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

blog/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.shortcuts import render
2+
3+
# Create your views here.

blogproject/settings.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
1616
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1717

18-
1918
# Quick-start development settings - unsuitable for production
2019
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
2120

@@ -27,7 +26,6 @@
2726

2827
ALLOWED_HOSTS = []
2928

30-
3129
# Application definition
3230

3331
INSTALLED_APPS = [
@@ -37,6 +35,7 @@
3735
'django.contrib.sessions',
3836
'django.contrib.messages',
3937
'django.contrib.staticfiles',
38+
'blog',
4039
]
4140

4241
MIDDLEWARE = [
@@ -69,7 +68,6 @@
6968

7069
WSGI_APPLICATION = 'blogproject.wsgi.application'
7170

72-
7371
# Database
7472
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
7573

@@ -80,7 +78,6 @@
8078
}
8179
}
8280

83-
8481
# Password validation
8582
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
8683

@@ -99,7 +96,6 @@
9996
},
10097
]
10198

102-
10399
# Internationalization
104100
# https://docs.djangoproject.com/en/1.10/topics/i18n/
105101

@@ -113,7 +109,6 @@
113109

114110
USE_TZ = True
115111

116-
117112
# Static files (CSS, JavaScript, Images)
118113
# https://docs.djangoproject.com/en/1.10/howto/static-files/
119114

0 commit comments

Comments
 (0)