Skip to content

Commit

Permalink
Added post app
Browse files Browse the repository at this point in the history
  • Loading branch information
rensequitin committed Feb 19, 2018
1 parent 677ea9c commit 46423f5
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 1 deletion.
Binary file modified forum/forum/__pycache__/urls.cpython-35.pyc
Binary file not shown.
3 changes: 2 additions & 1 deletion forum/forum/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include

urlpatterns = [
path('admin/', admin.site.urls),
path('', include('post.urls')),
]
Empty file added forum/post/__init__.py
Empty file.
Binary file added forum/post/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file added forum/post/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file added forum/post/__pycache__/views.cpython-35.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions forum/post/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 forum/post/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class PostConfig(AppConfig):
name = 'post'
Empty file.
3 changes: 3 additions & 0 deletions forum/post/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 forum/post/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.
7 changes: 7 additions & 0 deletions forum/post/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.urls import path

from . import views

urlpatterns = [
path('',views.index, name ='index'),
]
5 changes: 5 additions & 0 deletions forum/post/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.shortcuts import render
from django.http import HttpResponse

def index(request):
return HttpResponse("Hello world")

0 comments on commit 46423f5

Please sign in to comment.