admin page
This commit is contained in:
parent
b94ae89e2a
commit
aa51e403a0
3 changed files with 33 additions and 4 deletions
21
rxmap/rxmapp/migrations/0003_auto_20200307_1922.py
Normal file
21
rxmap/rxmapp/migrations/0003_auto_20200307_1922.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Generated by Django 2.2 on 2020-03-07 18:22
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('rxmapp', '0002_auto_20200307_1843'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='rapportoricezione',
|
||||
options={'verbose_name': 'rapporto ricezione', 'verbose_name_plural': 'rapporti ricezione'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='tiporadio',
|
||||
options={'verbose_name': 'tipo radio', 'verbose_name_plural': 'tipi radio'},
|
||||
),
|
||||
]
|
|
@ -8,17 +8,20 @@ class User(AbstractUser):
|
|||
|
||||
|
||||
class TipoRadio(models.Model):
|
||||
# tid = db.Column(db.Integer, primary_key=True, nullable=False)
|
||||
class Meta:
|
||||
verbose_name = 'tipo radio'
|
||||
verbose_name_plural = 'tipi radio'
|
||||
nome = models.CharField(max_length=64, unique=True)
|
||||
descrizione = models.CharField(max_length=1000)
|
||||
|
||||
# rapporti = db.relationship("RapportoRicezione")
|
||||
def __str__(self):
|
||||
return self.nome
|
||||
|
||||
|
||||
class RapportoRicezione(models.Model):
|
||||
class Meta:
|
||||
verbose_name = "rapporto ricezione"
|
||||
# verbose_plural_name = 'rapporti ricezione'
|
||||
verbose_name_plural = 'rapporti ricezione'
|
||||
|
||||
author = models.ForeignKey(User, related_name="rapporti", on_delete=models.PROTECT)
|
||||
tipo_radio = models.ForeignKey(
|
||||
|
|
|
@ -64,7 +64,12 @@ footer {
|
|||
{% endblock extra_scripts %}
|
||||
{% endblock %}
|
||||
<footer>
|
||||
<a href="https://git.lattuga.net/boyska/mappa-ricezione-radio">Talk is cheap</a>
|
||||
<span style="float:left;">
|
||||
<a href="{% url 'admin:index' %}">Admin</a>
|
||||
</span>
|
||||
<span>
|
||||
<a title="Show us the code" href="https://git.lattuga.net/boyska/mappa-ricezione-radio">Talk is cheap</a>
|
||||
</span>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue