Merge branch 'master' of ssh://git.wiai.de:22222/mgoetz/roofis2
This commit is contained in:
commit
06f63cc0c3
@ -181,6 +181,11 @@ LOGGING = {
|
|||||||
# 'handlers': ['console'],
|
# 'handlers': ['console'],
|
||||||
# 'level': 'INFO',
|
# 'level': 'INFO',
|
||||||
# },
|
# },
|
||||||
|
|
||||||
|
'roomservice': {
|
||||||
|
'handlers': ['console'],
|
||||||
|
'level': 'INFO',
|
||||||
|
},
|
||||||
'roomservice.management.sample_data_creation': {
|
'roomservice.management.sample_data_creation': {
|
||||||
'handlers': ['console'],
|
'handlers': ['console'],
|
||||||
'level': 'DEBUG'
|
'level': 'DEBUG'
|
||||||
|
|||||||
@ -4,6 +4,7 @@ from . import views
|
|||||||
app_name = 'roomservice'
|
app_name = 'roomservice'
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', views.home, name='home'),
|
path('', views.home, name='home'),
|
||||||
path('admin', views.admin, name='admin'),
|
path('adminpage', views.admin, name='admin'),
|
||||||
path('booking', views.booking, name='booking'),
|
path('booking', views.booking, name='booking'),
|
||||||
|
path('favorites', views.favorites, name='favorites'),
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,15 +1,25 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
from roomservice.models import Room
|
||||||
|
import logging
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
def home(request):
|
def home(request):
|
||||||
return render(request, 'search.jinja', {"title":"rooF(i)S is love rooF(i)S is live!!"})
|
rooms = Room.objects.all()
|
||||||
|
return render(request, 'search.jinja', {"title":"rooF(i)S is love rooF(i)S is live!!", "rooms":rooms})
|
||||||
|
|
||||||
|
|
||||||
def booking(request):
|
def booking(request):
|
||||||
return render(request, 'booking.jinja', {"title": "rooF(i)S is love rooF(i)S is live!!"})
|
room_id = request.POST["room"]
|
||||||
|
room = Room.objects.get(id=room_id)
|
||||||
|
logger.info(room_id)
|
||||||
|
logger.info(room)
|
||||||
|
return render(request, 'booking.jinja', {"title": "rooF(i)S is love rooF(i)S is live!!","room":room})
|
||||||
|
|
||||||
|
|
||||||
def admin(request):
|
def admin(request):
|
||||||
return render(request, 'admin.jinja', {"title": "rooF(i)S is love rooF(i)S is live!!"})
|
return render(request, 'admin.jinja', {"title": "rooF(i)S is love rooF(i)S is live!!"})
|
||||||
|
|
||||||
|
|
||||||
|
def favorites(request):
|
||||||
|
return render(request, 'favorites.jinja', {"title": "rooF(i)S is love rooF(i)S is live!!"})
|
||||||
@ -1,10 +1,169 @@
|
|||||||
{% extends 'base.jinja' %}
|
{% extends 'base.jinja' %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Ressourcenpool Bamberg</h1>
|
<table class="table table-hover table-light">
|
||||||
<p><strong>Impressum</strong></p>
|
<thead>
|
||||||
<p>Anbieter:<br />Max Mustermann<br />Musterstraße 1<br />96049 Bamberg</p>
|
<tr>
|
||||||
<p>Kontakt:<br />Telefon: 0951/12345678<br />Telefax: 0951/1234567<br />E-Mail: mail@mustermann.de<br />Website: www.mustermann.de</p>
|
<th scope="col">Time</th>
|
||||||
<p> </p>
|
<th scope="col">Monday</th>
|
||||||
<p>Bei redaktionellen Inhalten:</p>
|
<th scope="col">Tuesday</th>
|
||||||
<p>Verantwortlich nach § 55 Abs.2 RStV<br />Moritz Schreiberling<br />Musterstraße 2<br />96049 Bamberg</p>
|
<th scope="col">Wednesday</th>
|
||||||
|
<th scope="col">Thursday</th>
|
||||||
|
<th scope="col">Friday</th>
|
||||||
|
<th scope="col">Saturday</th>
|
||||||
|
<th scope="col">Sunday</th>
|
||||||
|
</tr>
|
||||||
|
</head>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">6:00 - 7:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">7:00 - 8:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">8:00 - 9:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">9:00 - 10:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">10:00 - 11:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">11:00 - 12:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">12:00 - 13:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">13:00 - 14:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">14:00 - 15:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">15:00 - 16:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">16:00 - 17:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">17:00 - 18:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">18:00 - 19:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">19:00 - 20:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">20:00 - 6:00</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
10
roofis2/templates/favorites.jinja
Normal file
10
roofis2/templates/favorites.jinja
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{% extends 'base.jinja' %}
|
||||||
|
{% block content %}
|
||||||
|
<h1>Ressourcenpool Bamberg</h1>
|
||||||
|
<p><strong>Impressum</strong></p>
|
||||||
|
<p>Anbieter:<br />Max Mustermann<br />Musterstraße 1<br />96049 Bamberg</p>
|
||||||
|
<p>Kontakt:<br />Telefon: 0951/12345678<br />Telefax: 0951/1234567<br />E-Mail: mail@mustermann.de<br />Website: www.mustermann.de</p>
|
||||||
|
<p> </p>
|
||||||
|
<p>Bei redaktionellen Inhalten:</p>
|
||||||
|
<p>Verantwortlich nach § 55 Abs.2 RStV<br />Moritz Schreiberling<br />Musterstraße 2<br />96049 Bamberg</p>
|
||||||
|
{% endblock %}
|
||||||
@ -1,9 +1,39 @@
|
|||||||
{% extends "base.jinja" %}
|
{% extends "base.jinja" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col"></div>
|
||||||
|
<div class="col-8">
|
||||||
<form class="form-inline my-2 my-lg-0">
|
<form class="form-inline my-2 my-lg-0">
|
||||||
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
|
<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>
|
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col"></div>
|
||||||
|
<div class="col-8">
|
||||||
|
<form action="{{ url("roomservice:booking") }}" method="POST" id="form">
|
||||||
|
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="sel1">Select list:</label>
|
||||||
|
<select multiple name="room" class="form-control" form="form" id="sel1">
|
||||||
|
{% for room in rooms %}
|
||||||
|
<option value="{{room.id}}">{{room.room_number}}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button type="submit" method="POST" value=" Send" class="btn btn-success" id="submit"> Submit </button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="col"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user