summaryrefslogtreecommitdiff
path: root/nop
diff options
context:
space:
mode:
Diffstat (limited to 'nop')
-rw-r--r--nop/templates/nop/nop_form.html25
-rw-r--r--nop/urls.py5
-rw-r--r--nop/views.py7
3 files changed, 35 insertions, 2 deletions
diff --git a/nop/templates/nop/nop_form.html b/nop/templates/nop/nop_form.html
new file mode 100644
index 0000000..94d1b3b
--- /dev/null
+++ b/nop/templates/nop/nop_form.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+ <title>Now Playing &mdash; Radio Helsinki - Freies Radio Graz</title>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
+ <script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/form/jquery.tools.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="http://static.flowplayer.org/tools/demos/dateinput/css/skin1.css"/>
+ <script type="text/javascript"><!--
+ $(document).ready(function() {
+ $(":date").dateinput({
+ format: 'yyyy-mm-dd',
+ firstDay: 1
+ });
+ });
+ --></script>
+</head>
+<body>
+
+ <div id="content-main" class="show-detail">
+ <input type="date" id="date" class="date" value="" />
+ <input type="text" id="time" class="date" value="" />
+ </div>
+
+</body>
+</html>
+
diff --git a/nop/urls.py b/nop/urls.py
index a4700cf..0521a74 100644
--- a/nop/urls.py
+++ b/nop/urls.py
@@ -1,7 +1,8 @@
from django.conf.urls.defaults import patterns, url
-from views import get, get_current
+from views import get, get_current, nop_form
urlpatterns = patterns('',
- url(r'^$', get_current),
+ url(r'^get_current/?$', get_current),
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<hour>\d{1,2})/(?P<minute>\d{1,2})/?$', get),
+ url(r'^$', nop_form),
)
diff --git a/nop/views.py b/nop/views.py
index c485beb..b633422 100644
--- a/nop/views.py
+++ b/nop/views.py
@@ -1,3 +1,4 @@
+from django.views.generic import simple
from django.http import HttpResponse
from models import Master
import json
@@ -38,3 +39,9 @@ def get(request, year=None, month=None, day=None, hour=None, minute=None):
#return HttpResponse(response, mimetype='application/json')
return HttpResponse(response, mimetype='text/plain')
+
+def nop_form(request):
+ extra_context = {'year':None, 'month':None, 'day':None, 'hour':None, 'minute': None}
+ if 'year' in request.GET:
+ pass
+ return simple.direct_to_template(request, extra_context=extra_context, template='nop/nop_form.html')