diff --git a/news/news/settings.py b/news/news/settings.py index a642d39..951178c 100644 --- a/news/news/settings.py +++ b/news/news/settings.py @@ -54,7 +54,9 @@ ROOT_URLCONF = 'news.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [ + os.path.join(BASE_DIR, 'templates') + ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -103,9 +105,9 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/2.2/topics/i18n/ -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'de-de' -TIME_ZONE = 'UTC' +TIME_ZONE = 'Europe/Berlin' USE_I18N = True diff --git a/news/news/urls.py b/news/news/urls.py index a72b585..fc29896 100644 --- a/news/news/urls.py +++ b/news/news/urls.py @@ -17,6 +17,7 @@ from django.contrib import admin from django.urls import path, include urlpatterns = [ + path('', include('posts.urls')), path('posts/', include('posts.urls')), path('admin/', admin.site.urls), ] diff --git a/news/posts/urls.py b/news/posts/urls.py index 3c616ac..306c8bc 100644 --- a/news/posts/urls.py +++ b/news/posts/urls.py @@ -2,5 +2,5 @@ from django.urls import path from . import views urlpatterns = [ - path('', views.index, name='index',) + path('', views.index, name='index') ] \ No newline at end of file diff --git a/news/posts/views.py b/news/posts/views.py index 8b9d4ac..3a8276c 100644 --- a/news/posts/views.py +++ b/news/posts/views.py @@ -3,4 +3,5 @@ from django.http import HttpResponse # Create your views here. def index(request): - return HttpResponse("Posts Index") \ No newline at end of file + return render(request, 'posts/index.html') +#HttpResponse("Posts Index") \ No newline at end of file diff --git a/news/templates/base.html b/news/templates/base.html new file mode 100644 index 0000000..c40c56f --- /dev/null +++ b/news/templates/base.html @@ -0,0 +1,15 @@ + + +
+ +Some placeholder Text
+