commit
892c27c63b
|
@ -10,3 +10,7 @@ ALLOWED_HOSTS=
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
DATABASE_URL=sqlite:///db.sqlite3
|
DATABASE_URL=sqlite:///db.sqlite3
|
||||||
|
|
||||||
|
# Mapbox
|
||||||
|
MAPBOX_TOKEN=
|
||||||
|
MAPBOX_MAP_ID=
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
|
# Contributing to SatNOGS Network
|
||||||
|
|
||||||
|
Thank you for your interest in contributing to SatNOGS!
|
||||||
|
|
||||||
Please read the `Contribution Guidelines` in [satnogs-network documentation](http://docs.satnogs.org/network/contribute.html).
|
Please read the `Contribution Guidelines` in [satnogs-network documentation](http://docs.satnogs.org/network/contribute.html).
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# SatNOGS Network
|
# SatNOGS Network
|
||||||
|
|
||||||
SatNOGS Network is a Django based application, implementing a global scheduling and monitoring network for ground station operations.
|
SatNOGS Network is a web application, implementing a global scheduling and monitoring network for ground station operations.
|
||||||
|
|
||||||
It features multiple observers to multiple intrumentation functionality and manages observation jobs and results.
|
It features multiple observers to multiple intrumentation functionality and manages observation jobs and results.
|
||||||
|
|
||||||
## Install and Contribute
|
## Install and Contribute
|
||||||
|
@ -9,4 +10,6 @@ See the [documentation](http://docs.satnogs.org/network/).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MPL-2.0](LICENSE)
|
© 2014-2015 [Libre Space Foundation](http://librespacefoundation.org).
|
||||||
|
|
||||||
|
Licensed under the [MPL-2.0](LICENSE).
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import ephem
|
import ephem
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.views.decorators.http import require_POST
|
from django.views.decorators.http import require_POST
|
||||||
from django.shortcuts import get_object_or_404, render, redirect
|
from django.shortcuts import get_object_or_404, render, redirect
|
||||||
|
@ -22,7 +23,9 @@ def index(request):
|
||||||
ctx = {
|
ctx = {
|
||||||
'latest_observations': observations.filter(end__lt=now()),
|
'latest_observations': observations.filter(end__lt=now()),
|
||||||
'scheduled_observations': observations.filter(end__gte=now()),
|
'scheduled_observations': observations.filter(end__gte=now()),
|
||||||
'featured_station': featured_station
|
'featured_station': featured_station,
|
||||||
|
'mapbox_id': settings.MAPBOX_MAP_ID,
|
||||||
|
'mapbox_token': settings.MAPBOX_TOKEN
|
||||||
}
|
}
|
||||||
|
|
||||||
return render(request, 'base/home.html', ctx)
|
return render(request, 'base/home.html', ctx)
|
||||||
|
@ -146,7 +149,9 @@ def station_view(request, id):
|
||||||
antennas = Antenna.objects.all()
|
antennas = Antenna.objects.all()
|
||||||
|
|
||||||
return render(request, 'base/station_view.html',
|
return render(request, 'base/station_view.html',
|
||||||
{'station': station, 'form': form, 'antennas': antennas})
|
{'station': station, 'form': form, 'antennas': antennas,
|
||||||
|
'mapbox_id': settings.MAPBOX_MAP_ID,
|
||||||
|
'mapbox_token': settings.MAPBOX_TOKEN})
|
||||||
|
|
||||||
|
|
||||||
@require_POST
|
@require_POST
|
||||||
|
|
|
@ -161,3 +161,8 @@ DATABASES = {'default': dj_database_url.parse(DATABASE_URL)}
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',)
|
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Mapbox API
|
||||||
|
MAPBOX_GEOCODE_URL = 'https://api.tiles.mapbox.com/v4/geocode/mapbox.places/'
|
||||||
|
MAPBOX_MAP_ID = getenv('MAPBOX_MAP_ID', '')
|
||||||
|
MAPBOX_TOKEN = getenv('MAPBOX_TOKEN', '')
|
||||||
|
|
|
@ -59,6 +59,10 @@ body {
|
||||||
font-family:'ClearSans';
|
font-family:'ClearSans';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
.alert-debug {
|
.alert-debug {
|
||||||
color: black;
|
color: black;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
@ -98,6 +102,14 @@ body {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-options {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
#main-navbar {
|
#main-navbar {
|
||||||
margin-top: 2%;
|
margin-top: 2%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
L.mapbox.accessToken = 'pk.eyJ1IjoicGllcnJvcyIsImEiOiJhTVZyWmE4In0.kl2j9fi24LDXfB3MNdN76w';
|
|
||||||
var map = L.mapbox.map('map', 'pierros.jbf6la1j',{
|
|
||||||
zoomControl: false
|
|
||||||
}).setView([40, 0], 3);
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var mapboxid = $('div#map').data('mapboxid');
|
||||||
|
var mapboxtoken = $('div#map').data('mapboxtoken');
|
||||||
|
|
||||||
|
L.mapbox.accessToken = mapboxtoken;
|
||||||
|
L.mapbox.config.FORCE_HTTPS = true;
|
||||||
|
var map = L.mapbox.map('map', mapboxid, {
|
||||||
|
zoomControl: false
|
||||||
|
}).setView([40, 0], 3);
|
||||||
|
var LocLayer = L.mapbox.featureLayer().addTo(map);
|
||||||
|
|
||||||
$('#successful a.toggle').click(function (e) {
|
$('#successful a.toggle').click(function (e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
$(this).tab('show')
|
$(this).tab('show')
|
||||||
|
|
|
@ -3,8 +3,14 @@ $(document).ready(function() {
|
||||||
var station_info = $('#station-info').data();
|
var station_info = $('#station-info').data();
|
||||||
|
|
||||||
// Init the map
|
// Init the map
|
||||||
L.mapbox.accessToken = 'pk.eyJ1IjoicGllcnJvcyIsImEiOiJhTVZyWmE4In0.kl2j9fi24LDXfB3MNdN76w';
|
'use strict';
|
||||||
var map = L.mapbox.map('map-station', 'pierros.jbf6la1j',{
|
|
||||||
|
var mapboxid = $('div#map-station').data('mapboxid');
|
||||||
|
var mapboxtoken = $('div#map-station').data('mapboxtoken');
|
||||||
|
|
||||||
|
L.mapbox.accessToken = mapboxtoken;
|
||||||
|
L.mapbox.config.FORCE_HTTPS = true;
|
||||||
|
var map = L.mapbox.map('map-station', mapboxid,{
|
||||||
zoomControl: false
|
zoomControl: false
|
||||||
}).setView([station_info.lat, station_info.lng], 6);
|
}).setView([station_info.lat, station_info.lng], 6);
|
||||||
|
|
||||||
|
|
|
@ -70,9 +70,18 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
{% if messages %}
|
{% if messages %}
|
||||||
{% for message in messages %}
|
<div class="row messages">
|
||||||
<div class="alert {% if message.tags %}alert-{{ message.tags }}"{% endif %}>{{ message }}</div>
|
<div class="col-md-12">
|
||||||
{% endfor %}
|
{% for notification in messages %}
|
||||||
|
<div class="alert alert-{{ notification.tags }}" role="alert">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
{{ notification.message }}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% block content %}{% endblock content %}
|
{% block content %}{% endblock content %}
|
||||||
|
@ -84,11 +93,19 @@
|
||||||
<footer>
|
<footer>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<hr>
|
<hr>
|
||||||
<p class="pull-right">
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<span class="glyphicon glyphicon-copyright-mark" aria-hidden="true"></span> 2014<script>document.write("-"+new Date().getFullYear());</script>
|
||||||
|
<a href="http://librespacefoundation.org/" target="_blank">Libre Space Foundation</a>.<br>
|
||||||
|
<span class="glyphicon glyphicon-cloud" aria-hidden="true"></span>
|
||||||
|
Observation data are freely distributed under the
|
||||||
|
<a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">CC BY-SA</a> license.
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 text-right footer-options">
|
||||||
<a href="https://github.com/satnogs/satnogs-network">Contribute</a> |
|
<a href="https://github.com/satnogs/satnogs-network">Contribute</a> |
|
||||||
<a href="#">Back to top</a>
|
<a href="#top">Back to top</a>
|
||||||
</p>
|
</div>
|
||||||
<p>© 2014 SatNOGS Team ·</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|
|
@ -6,18 +6,26 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<h1>About</h1>
|
<h1>About</h1>
|
||||||
SatNOGS network is under active development and not fully
|
SatNOGS network is a global management interface to facilitate multiple ground station
|
||||||
operational for Ground Station operators yet. Meanwhile you can join us by:
|
operations remotely. An observer is able to take advantage of the full network of
|
||||||
<h3>Building a ground station</h3>
|
SatNOGS ground stations around the world.
|
||||||
|
<h3>Observations</h3>
|
||||||
|
The network is open to anyone. Any observer is able to utilize all available Ground Stations
|
||||||
|
and communicate with Satellites. All observations results are public
|
||||||
|
and all data are distributed freely under the
|
||||||
|
<a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Atribution-Share Alike</a> license.
|
||||||
|
<h3>Ground Stations</h3>
|
||||||
Whether you own satellite ground station equipment or you want
|
Whether you own satellite ground station equipment or you want
|
||||||
to build one you can head to
|
to build one you can head to
|
||||||
<a href="https://satnogs.org" target="_blank">SatNOGS Project site</a>
|
<a href="https://satnogs.org" target="_blank">SatNOGS Project site</a>
|
||||||
to get up to date documentation and info on how to build a SatNOGS ground station (still under development).
|
to get up to date documentation and info on how to build a SatNOGS ground station (still under development).
|
||||||
<h3>Coding</h3>
|
<h3>Coding</h3>
|
||||||
Fluent in Python and/or JS? We need you to help with satnogs-network Django application. Visit
|
Fluent in Python and/or JS? We need you to help with satnogs-network web application. Take a look to our
|
||||||
<a href="https://github.com/satnogs/satnogs-network/issues" target="_blank">our Github issues page</a> to
|
<a href="https://github.com/satnogs/satnogs-network/issues" target="_blank">source code</a> or visit
|
||||||
start filling issues or code fixes for existing ones. Detailed contribution and development documentation
|
our <a href="https://github.com/satnogs/satnogs-network/issues" target="_blank">issues tracker</a>
|
||||||
is also availble <a href="https://github.com/satnogs/satnogs-network" target="_blank">here</a>.
|
to start filling bugs, feature requests or code fixes for existing ones.
|
||||||
|
Detailed contribution and development documentation is also availble at
|
||||||
|
<a href="http://docs.satnogs.org" target="_blank">docs.satnogs.org</a>.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -10,13 +10,12 @@
|
||||||
{% endblock css %}
|
{% endblock css %}
|
||||||
|
|
||||||
{% block prenav-content %}
|
{% block prenav-content %}
|
||||||
<div id="map"></div>
|
<div id="map" data-mapboxid="{{ mapbox_id }}" data-mapboxtoken="{{ mapbox_token }}"></div>
|
||||||
{% endblock prenav-content %}
|
{% endblock prenav-content %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row" id="call2action">
|
<div class="row" id="call2action">
|
||||||
{% if request.user.is_authenticated %}
|
{% if not request.user.is_authenticated %}
|
||||||
{% else %}
|
|
||||||
<div class="col-md-8 col-md-offset-2 panel panel-default">
|
<div class="col-md-8 col-md-offset-2 panel panel-default">
|
||||||
<h3 class="text-center">
|
<h3 class="text-center">
|
||||||
Ground stations swarm control, at your fingertips.
|
Ground stations swarm control, at your fingertips.
|
||||||
|
@ -72,6 +71,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
<div class="gs-front-line">
|
<div class="gs-front-line">
|
||||||
<span class="label label-info">Success Rate</span>
|
<span class="label label-info">Success Rate</span>
|
||||||
<span class="gs-front-data">
|
<span class="gs-front-data">
|
||||||
|
@ -85,12 +85,12 @@
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<!-- Nav tabs -->
|
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="#successful" class="toggle" role="tab" data-toggle="tab">Latest Observations</a>
|
<a href="#successful" class="toggle" role="tab" data-toggle="tab">Latest Observations</a>
|
||||||
|
@ -99,7 +99,6 @@
|
||||||
<a href="#scheduled" class="toggle" role="tab" data-toggle="tab">Scheduled Observations</a>
|
<a href="#scheduled" class="toggle" role="tab" data-toggle="tab">Scheduled Observations</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- Tab panes -->
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" id="successful">
|
<div class="tab-pane active" id="successful">
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
|
@ -129,7 +128,10 @@
|
||||||
<td>{{ observation.satellite.name }}</td>
|
<td>{{ observation.satellite.name }}</td>
|
||||||
<td>{% frq observation.transponder.downlink_low %}</td>
|
<td>{% frq observation.transponder.downlink_low %}</td>
|
||||||
<td>{{ observation.transponder.mode }}</td>
|
<td>{{ observation.transponder.mode }}</td>
|
||||||
<td>{{ observation.start|date:"Y-m-d H:i:s" }}</br>{{ observation.end|date:"Y-m-d H:i:s" }}</td>
|
<td>
|
||||||
|
{{ observation.start|date:"Y-m-d H:i:s" }}<br>
|
||||||
|
{{ observation.end|date:"Y-m-d H:i:s" }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'users:view_user' username=observation.author.username %}">
|
<a href="{% url 'users:view_user' username=observation.author.username %}">
|
||||||
{{ observation.author.get_full_name }}
|
{{ observation.author.get_full_name }}
|
||||||
|
@ -186,18 +188,26 @@
|
||||||
<h4 class="modal-title" id="myModalLabel">Join SatNGOS Network</h4>
|
<h4 class="modal-title" id="myModalLabel">Join SatNGOS Network</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
SatNOGS network is under active development and not fully
|
SatNOGS network is a global management interface to facilitate multiple ground station
|
||||||
operational for Ground Station operators yet. Meanwhile you can join us by:
|
operations remotely. An observer is able to take advantage of the full network of
|
||||||
<h3>Building a ground station</h3>
|
SatNOGS ground stations around the world.
|
||||||
|
<h3>Observations</h3>
|
||||||
|
The network is open to anyone. Any observer is able to utilize all available Ground Stations
|
||||||
|
and communicate with Satellites. All observations results are public
|
||||||
|
and all data are distributed freely under the
|
||||||
|
<a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Atribution-Share Alike</a> license.
|
||||||
|
<h3>Ground Stations</h3>
|
||||||
Whether you own satellite ground station equipment or you want
|
Whether you own satellite ground station equipment or you want
|
||||||
to build one you can head to
|
to build one you can head to
|
||||||
<a href="https://satnogs.org" target="_blank">SatNOGS Project site</a>
|
<a href="https://satnogs.org" target="_blank">SatNOGS Project site</a>
|
||||||
to get up to date documentation and info on how to build a SatNOGS ground station (still under development).
|
to get up to date documentation and info on how to build a SatNOGS ground station (still under development).
|
||||||
<h3>Coding</h3>
|
<h3>Coding</h3>
|
||||||
Fluent in Python and/or JS? We need you to help with satnogs-network Django application. Visit
|
Fluent in Python and/or JS? We need you to help with satnogs-network web application. Take a look to our
|
||||||
<a href="https://github.com/satnogs/satnogs-network/issues" target="_blank">our Github issues page</a> to
|
<a href="https://github.com/satnogs/satnogs-network/issues" target="_blank">source code</a> or visit
|
||||||
start filling issues or code fixes for existing ones. Detailed contribution and development documentation
|
our <a href="https://github.com/satnogs/satnogs-network/issues" target="_blank">issues tracker</a>
|
||||||
is also availble <a href="https://github.com/satnogs/satnogs-network" target="_blank">here</a>.
|
to start filling bugs, feature requests or code fixes for existing ones.
|
||||||
|
Detailed contribution and development documentation is also availble at
|
||||||
|
<a href="http://docs.satnogs.org" target="_blank">docs.satnogs.org</a>.
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||||
|
|
|
@ -18,10 +18,8 @@
|
||||||
{{ station.id }} - {{ station.name }}
|
{{ station.id }} - {{ station.name }}
|
||||||
{% if request.user == station.owner %}
|
{% if request.user == station.owner %}
|
||||||
<button class="btn btn-primary pull-right" data-toggle="modal" data-target="#StationModal">Edit Ground Station</button>
|
<button class="btn btn-primary pull-right" data-toggle="modal" data-target="#StationModal">Edit Ground Station</button>
|
||||||
<!-- Station Modal -->
|
|
||||||
{% include 'includes/station_edit.html' %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h2
|
</h2>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
@ -85,9 +83,14 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div id="map-station"></div>
|
<div id="map-station" data-mapboxid="{{ mapbox_id }}" data-mapboxtoken="{{ mapbox_token }}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if request.user == station.owner %}
|
||||||
|
<!-- Station Modal -->
|
||||||
|
{% include 'includes/station_edit.html' %}
|
||||||
|
{% endif %}
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
||||||
{% block javascript %}
|
{% block javascript %}
|
||||||
|
|
|
@ -27,12 +27,21 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'base:station_view' id=station.id %}">
|
<a href="{% url 'base:station_view' id=station.id %}">
|
||||||
<span class="label label-default">
|
<span class="label
|
||||||
|
{% if station.online %}
|
||||||
|
label-success
|
||||||
|
{% else %}
|
||||||
|
label-danger
|
||||||
|
{% endif %}">
|
||||||
{{ station.id }}
|
{{ station.id }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ station.name }}</td>
|
<td>
|
||||||
|
<a href="{% url 'base:station_view' id=station.id %}">
|
||||||
|
{{ station.name }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
{% if station.location %}
|
{% if station.location %}
|
||||||
<td title="{{ station.lat|floatformat:-3 }}, {{ station.lng|floatformat:-3 }}">
|
<td title="{{ station.lat|floatformat:-3 }}, {{ station.lng|floatformat:-3 }}">
|
||||||
{{ station.location }}
|
{{ station.location }}
|
||||||
|
@ -48,7 +57,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'users:view_user' username=station.owner.username %}">
|
<a href="{% url 'users:view_user' username=station.owner.username %}">
|
||||||
{{ station.owner.get_full_name }}
|
{{ station.owner.displayname }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<h2>{% avatar user 50 %} {{ user.get_full_name }} ({{ user.username }})
|
<h2>{% avatar user 50 %} {{ user.displayname }}
|
||||||
{% if user == request.user %}
|
{% if user == request.user %}
|
||||||
<div class="pull-right edit-profile-buttons">
|
<div class="pull-right edit-profile-buttons">
|
||||||
<a class="btn btn-primary" href="{% url 'users:update_user' %}">My Info</a>
|
<a class="btn btn-primary" href="{% url 'users:update_user' %}">My Info</a>
|
||||||
|
@ -43,13 +43,28 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'base:station_view' id=station.id %}">
|
<a href="{% url 'base:station_view' id=station.id %}">
|
||||||
<span class="label label-default">
|
<span class="label
|
||||||
|
{% if station.online %}
|
||||||
|
label-success
|
||||||
|
{% else %}
|
||||||
|
label-danger
|
||||||
|
{% endif %}">
|
||||||
{{ station.id }}
|
{{ station.id }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ station.name }}</td>
|
<td>
|
||||||
<td>{{ station.lat }}, {{ station.lng }}</td>
|
<a href="{% url 'base:station_view' id=station.id %}">
|
||||||
|
{{ station.name }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
{% if station.location %}
|
||||||
|
<td title="{{ station.lat|floatformat:-3 }}, {{ station.lng|floatformat:-3 }}">
|
||||||
|
{{ station.location }}
|
||||||
|
</td>
|
||||||
|
{% else %}
|
||||||
|
<td>{{ station.lat|floatformat:-3 }}, {{ station.lng|floatformat:-3 }}</td>
|
||||||
|
{% endif %}
|
||||||
<td>{{ station.alt}} m</td>
|
<td>{{ station.alt}} m</td>
|
||||||
<td>
|
<td>
|
||||||
{% for antenna in station.antenna.all %}
|
{% for antenna in station.antenna.all %}
|
||||||
|
|
|
@ -18,6 +18,13 @@ class User(AbstractUser):
|
||||||
|
|
||||||
bio = models.TextField(default='', validators=[MaxLengthValidator(1000)])
|
bio = models.TextField(default='', validators=[MaxLengthValidator(1000)])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def displayname(self):
|
||||||
|
if self.get_full_name():
|
||||||
|
return self.get_full_name()
|
||||||
|
else:
|
||||||
|
return self.username
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.username
|
return self.username
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue