Skip to content

Commit

Permalink
Create a blog app
Browse files Browse the repository at this point in the history
Ref #16
  • Loading branch information
Martolivna committed Sep 8, 2023
1 parent c1ce6b3 commit 825bb1a
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# VS Code
.vscode

### Django ###
*.log
*.pot
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exclude: '^blog/migrations/'
repos:
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
Expand Down
1 change: 1 addition & 0 deletions blog/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""A Django app for blog."""
1 change: 1 addition & 0 deletions blog/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Django admin panel for the blog app."""
10 changes: 10 additions & 0 deletions blog/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Configuration file of the blog app."""

from django.apps import AppConfig


class BlogConfig(AppConfig):
"""A class for the blog app configuration."""

default_auto_field = 'django.db.models.BigAutoField'
name = 'blog'
1 change: 1 addition & 0 deletions blog/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Models for the blog app."""
1 change: 1 addition & 0 deletions blog/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Tests for the blog app."""
1 change: 1 addition & 0 deletions blog/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Views of the blog app."""
3 changes: 2 additions & 1 deletion mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['127.0.0.1']
ALLOWED_HOSTS = ['127.0.0.1', 'localhost']


# Application definition
Expand All @@ -32,6 +32,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog',
]

MIDDLEWARE = [
Expand Down

0 comments on commit 825bb1a

Please sign in to comment.