Commit 14a51b90 authored by Rafal's avatar Rafal

push

parent c0d40359
{{ project_data }}
{{ beacon }}
<div class="box"> <div class="box">
<table class="table borderless"> <table class="table borderless">
<tbody> <tbody>
<tr> <tr>
<td class="col-md-2">{{ beacon.name }}</td>
<td>Link
<td class="col-md-2">{{ beacon_data.beacon.name }}</td>
<td>
{% for site in beacon_data.sites %}
<p> <a href="site.link_url">{{ site.link_url }} </a></p>
{% endfor %}
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</thead> </thead>
</table> </table>
{% for beacon in project_data.beacons %} {% for beacon_data in beacon_display %}
{% include 'user_panel/content/beacon_detail.html' %} {% include 'user_panel/content/beacon_detail.html' %}
{% endfor %} {% endfor %}
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
<div class="row"> <div class="row">
<div class="col-md-10 col-md-offset-1"> <div class="col-md-10 col-md-offset-1">
......
...@@ -139,6 +139,6 @@ def project(request, project_id): ...@@ -139,6 +139,6 @@ def project(request, project_id):
my_sites = beacon_manager.sites.filter(author=request.user.pk) my_sites = beacon_manager.sites.filter(author=request.user.pk)
site_serializer = SiteSerializer(my_sites, many=True, context={'request': request}) site_serializer = SiteSerializer(my_sites, many=True, context={'request': request})
sites_data = site_serializer.data sites_data = site_serializer.data
data['beacon_display'].append([beacon_data, sites_data]) data['beacon_display'].append({'beacon':beacon_data,'sites' :sites_data})
return render_to_response('user_panel/content/project.html', data, context) return render_to_response('user_panel/content/project.html', data, context)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment