Browse Source

vanessa

master
parent
commit
1e6304653d

+ 1
- 0
news1/news1/settings.py View File

@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'posts'
]

MIDDLEWARE = [

+ 0
- 1
news1/posts/apps.py View File

@@ -1,5 +1,4 @@
from django.apps import AppConfig


class PostsConfig(AppConfig):
name = 'posts'

+ 0
- 0
news1/posts/migrations/__init__.py View File


+ 2
- 4
news1/posts/views.py View File

@@ -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")
return render(request, 'posts/index.html')

+ 63
- 0
news1/templates/posts/base.html View File

@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="fr">
<head>

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">


<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>


<link rel="stylesheet" href="/media/css/style.css" />
<title>{% block posts %}posts{% endblock %}</title>
</head>
<body>
<header>news1</header>
<nav>
{% block nav %}


<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="http://www.google.de">google</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="http://www.outlook.de">Outlook <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="http://www.th-nuernberg.de">TH-Nuernberg</a>
</li>
<li class="nav-item Dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Action</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
{% endblock %}
<section id="content">
{% block content %}{% endblock %}
</section>
<footer>&copy; posts news1</footer>
</body>
</html>

+ 14
- 0
news1/templates/posts/index.html View File

@@ -0,0 +1,14 @@
{% extends 'posts/base.html'%}
{% block content %}



<div class="jumbotron">
<h2 class="display-4">mein Webseite</h2>
<p class="lead">Hier ist meine Internet Seite Aufgrung mein Projektarbeit für der Winter Semester 2019.</p>
<hr class="my-4">
<p>Und der Bericht wird am ende der Semester abgegeben werden und danach vorgetragen.</p>
<a class="btn btn-primary btn-lg" href="#" role="button">Return</a>
</div>
<h1>Index der posts Applikation</h1>
{% endblock %}

Loading…
Cancel
Save