BoxTitoli_Mysql/titoli/models.py

28 lines
1.1 KiB
Python

# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
from django.db import models
from django.urls import reverse
class Titolo(models.Model):
titolo = models.TextField()
id = models.TextField()
unico = models.AutoField(primary_key=True)
link_embedded = models.TextField(db_column='link embedded') # Field renamed to remove unsuitable characters.
foto = models.TextField()
def get_absolute_url(self):
return reverse('guarda_streaming',kwargs={"id":self.id})
def __str__(self):
return self.titolo
class Meta:
managed = False
db_table = 'tbl_episode'
verbose_name = "Boxtitolo"
verbose_name_plural = "Boxtitoli"