add news app

This commit is contained in:
erichhasl
2017-12-06 15:17:08 +01:00
parent 4e445b1c1b
commit 424c99053a
12 changed files with 38 additions and 1 deletions
View File
+3
View File
@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.
+5
View File
@@ -0,0 +1,5 @@
from django.apps import AppConfig
class NewsConfig(AppConfig):
name = 'news'
+3
View File
@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.
@@ -0,0 +1,5 @@
{% extends "public/default.html" %}
{% block content %}
<p>Hi!</p>
{% endblock %}
+3
View File
@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.
+7
View File
@@ -0,0 +1,7 @@
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index')
]
+6
View File
@@ -0,0 +1,6 @@
from django.shortcuts import render
# Create your views here.
def index(request):
return render(request, 'news/index.html')