Explorar el Código

add news app

master
erichhasl hace 8 años
padre
commit
424c99053a
Se han modificado 12 ficheros con 38 adiciones y 1 borrados
  1. +0
    -0
      web_dev/sas_web/news/__init__.py
  2. +3
    -0
      web_dev/sas_web/news/admin.py
  3. +5
    -0
      web_dev/sas_web/news/apps.py
  4. +3
    -0
      web_dev/sas_web/news/models.py
  5. +5
    -0
      web_dev/sas_web/news/templates/news/index.html
  6. +3
    -0
      web_dev/sas_web/news/tests.py
  7. +7
    -0
      web_dev/sas_web/news/urls.py
  8. +6
    -0
      web_dev/sas_web/news/views.py
  9. +1
    -0
      web_dev/sas_web/sas_web/settings.py
  10. +3
    -0
      web_dev/sas_web/sas_web/urls.py
  11. +1
    -1
      web_dev/sas_web/static/public/css/header.css
  12. +1
    -0
      web_dev/sas_web/templates/public/header.html

+ 0
- 0
web_dev/sas_web/news/__init__.py Ver fichero


+ 3
- 0
web_dev/sas_web/news/admin.py Ver fichero

@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.

+ 5
- 0
web_dev/sas_web/news/apps.py Ver fichero

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


class NewsConfig(AppConfig):
name = 'news'

+ 3
- 0
web_dev/sas_web/news/models.py Ver fichero

@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.

+ 5
- 0
web_dev/sas_web/news/templates/news/index.html Ver fichero

@@ -0,0 +1,5 @@
{% extends "public/default.html" %}

{% block content %}
<p>Hi!</p>
{% endblock %}

+ 3
- 0
web_dev/sas_web/news/tests.py Ver fichero

@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.

+ 7
- 0
web_dev/sas_web/news/urls.py Ver fichero

@@ -0,0 +1,7 @@
from django.conf.urls import url

from . import views

urlpatterns = [
url(r'^$', views.index, name='index')
]

+ 6
- 0
web_dev/sas_web/news/views.py Ver fichero

@@ -0,0 +1,6 @@
from django.shortcuts import render


# Create your views here.
def index(request):
return render(request, 'news/index.html')

+ 1
- 0
web_dev/sas_web/sas_web/settings.py Ver fichero

@@ -49,6 +49,7 @@ USE_X_FORWARDED_HOST = True
# Application definition

INSTALLED_APPS = (
'news',
'captcha',
'datenbank',
'meingoethopia',


+ 3
- 0
web_dev/sas_web/sas_web/urls.py Ver fichero

@@ -23,6 +23,9 @@ from .views import error_400, error_403, error_404, error_500
urlpatterns = static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns += [
url(r'^news/', include('news.urls',
namespace='news',
app_name='news')),
url(r'^meingoethopia/', include('meingoethopia.urls',
namespace='meingoethopia',
app_name='meingoethopia')),


+ 1
- 1
web_dev/sas_web/static/public/css/header.css Ver fichero

@@ -81,7 +81,7 @@ ul.navbar {

li.navbar {
float: left;
width: 30%;
width: 21%;
margin-top: 0.5%;
margin-bottom: 0.5%;
vertical-align: middle;


+ 1
- 0
web_dev/sas_web/templates/public/header.html Ver fichero

@@ -34,6 +34,7 @@
<div id="navigation">
<ul class="navbar">
<li class ="navbar"><a {% if appname == "startpage" %}class="active"{% endif %} href="/">Information</a></li>
<li class ="navbar"><a {% if appname == "news" %}class="active"{% endif %} href="{% url "news:index" %}">News</a></li>
<li class="navbar"><a {% if appname == "datenbank" %}class="active"{% endif %} href="{% url "datenbank:index" %}">Datenbank</a></li>
<li class="navbar"><a {% if appname == "meingoethopia" %}class="active"{% endif %} href="{% url "meingoethopia:index" %}">Mein Goethopia</a></li>
</ul>


Cargando…
Cancelar
Guardar