diff --git a/news1/news1/settings.py b/news1/news1/settings.py index d4a4045..bd1ffa4 100644 --- a/news1/news1/settings.py +++ b/news1/news1/settings.py @@ -37,6 +37,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'posts' ] MIDDLEWARE = [ diff --git a/news1/posts/apps.py b/news1/posts/apps.py index 2c2b982..dad91b3 100644 --- a/news1/posts/apps.py +++ b/news1/posts/apps.py @@ -1,5 +1,4 @@ from django.apps import AppConfig - class PostsConfig(AppConfig): name = 'posts' diff --git a/news1/posts/migrations/__init__.py b/news1/posts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/news1/posts/views.py b/news1/posts/views.py index 3236774..a9cbc02 100644 --- a/news1/posts/views.py +++ b/news1/posts/views.py @@ -1,7 +1,5 @@ - from django.shortcuts import render -from django.http import HttpResponse -# Create your views here. +#create your views here. def index(request): - return HttpResponse("Posts Index") \ No newline at end of file + return render(request, 'posts/index.html') \ No newline at end of file diff --git a/news1/templates/posts/base.html b/news1/templates/posts/base.html new file mode 100644 index 0000000..def9524 --- /dev/null +++ b/news1/templates/posts/base.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + {% block posts %}posts{% endblock %} + + +
news1
+