Ajout du header, modif de la view pour prendre une requete plus complete en compte.
This commit is contained in:
parent
85d5436712
commit
75db1afa32
|
@ -31,7 +31,21 @@ def query(request):
|
|||
else:
|
||||
terms = request.GET['q']
|
||||
|
||||
context = { 'cards_list' : None, 'title' : 'Recherche sur les termes : ' + terms }
|
||||
from django.db import connection
|
||||
|
||||
cursor = connection.cursor()
|
||||
|
||||
for term in terms.split(' '):
|
||||
pass
|
||||
|
||||
raw_sql = '%s shalalal %s'
|
||||
|
||||
for row in cursor.execute(raw_sql, ['%'+term+'%']):
|
||||
print row.id
|
||||
|
||||
cards_list = query_set
|
||||
|
||||
context = { 'cards_list' : cards_list, 'title' : 'Recherche sur les termes : ' + terms }
|
||||
|
||||
return render_to_response('cards/list.html', RequestContext(request, context))
|
||||
|
||||
|
|
|
@ -8,4 +8,10 @@
|
|||
{
|
||||
width: 95%;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
header img
|
||||
{
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
|
@ -11,7 +11,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<header class="jumbotron subhead" id="overview">
|
||||
<p><a href="{% url index %}">No header</a></p>
|
||||
<img src="{{STATIC_URL}}/img/header.png" alt="Ma collection de télécartes" />
|
||||
</header>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
|
@ -35,4 +35,4 @@
|
|||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue