add all apps, still blank

This commit is contained in:
erichhasl
2017-11-18 14:47:44 +01:00
parent 72135d654f
commit c5c35759e0
18 changed files with 71 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.
+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>Datenbank</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, "datenbank/index.html")
+3
View File
@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.
+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>Mein Goethopia!</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, "meingoethopia/index.html")
+5
View File
@@ -0,0 +1,5 @@
from django.core.urlresolvers import resolve
def appname(request):
return {'appname': resolve(request.path).app_name}
+3
View File
@@ -43,6 +43,8 @@ USE_X_FORWARDED_HOST = True
# Application definition # Application definition
INSTALLED_APPS = ( INSTALLED_APPS = (
'datenbank',
'meingoethopia',
'startpage', 'startpage',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
@@ -76,6 +78,7 @@ TEMPLATES = [
'django.template.context_processors.request', 'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth', 'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages', 'django.contrib.messages.context_processors.messages',
'sas_web.contexts.appname',
], ],
}, },
}, },
+6 -1
View File
@@ -17,6 +17,11 @@ from django.conf.urls import include, url
from django.contrib import admin from django.contrib import admin
urlpatterns = [ urlpatterns = [
url(r'^$', include('startpage.urls')), url(r'^$', include('startpage.urls', namespace='startpage', app_name='startpage')),
url(r'^meingoethopia', include('meingoethopia.urls',
namespace='meingoethopia',
app_name='meingoethopia')),
url(r'^datenbank', include('datenbank.urls', app_name='datenbank',
namespace='datenbank')),
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
] ]
+3 -3
View File
@@ -30,9 +30,9 @@
</table> </table>
<div id="navigation"> <div id="navigation">
<ul> <ul>
<li><a class="active" href="https://www.none.com">Gesetzesblatt</a></li> <li><a {% if appname == "startpage" %}class="active"{% endif %} href="/">Gesetzesblatt</a></li>
<li><a href="https://www.none.com">Datenbank</a></li> <li><a {% if appname == "datenbank" %}class="active"{% endif %} href="{% url "datenbank:index" %}">Datenbank</a></li>
<li><a href="https://www.none.com">Mein Goethopia</a></li> <li><a {% if appname == "meingoethopia" %}class="active"{% endif %} href="{% url "meingoethopia:index" %}">Mein Goethopia</a></li>
</ul> </ul>
</div> </div>
</div> </div>