Ahora si pylint es feliz con todos los modulos :3
This commit is contained in:
5
lint.sh
Executable file
5
lint.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
(
|
||||||
|
. venv/bin/activate
|
||||||
|
pylint --load-plugins pylint_django fetcher lists musiclist users utils welcome
|
||||||
|
)
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
from django.contrib import admin
|
|
||||||
|
|
||||||
# Register your models here.
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
|
"""Definición de la aplicación"""
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class ListsConfig(AppConfig):
|
class ListsConfig(AppConfig):
|
||||||
|
"""Configuración de la aplicación Lists"""
|
||||||
name = 'lists'
|
name = 'lists'
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
"""Definición de los modelos que utilizara la aplicación Lists"""
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.db.models import CharField, TextField, IntegerField
|
from django.db.models import CharField, TextField, IntegerField
|
||||||
from django.db.models import ForeignKey, ManyToManyField
|
from django.db.models import ForeignKey, ManyToManyField
|
||||||
@@ -6,6 +7,10 @@ from django.db.models import Model
|
|||||||
|
|
||||||
|
|
||||||
class Entity(Model):
|
class Entity(Model):
|
||||||
|
"""Entidad la cual representa una entidad de musicbrainz
|
||||||
|
|
||||||
|
Pueden ser: artist, release-group, release o recording
|
||||||
|
"""
|
||||||
ENTITY_TYPES = [
|
ENTITY_TYPES = [
|
||||||
('artist', 'Artista'),
|
('artist', 'Artista'),
|
||||||
('release-group', 'Grupo de Lanzamientos'),
|
('release-group', 'Grupo de Lanzamientos'),
|
||||||
@@ -17,29 +22,34 @@ class Entity(Model):
|
|||||||
|
|
||||||
|
|
||||||
class Tag(Model):
|
class Tag(Model):
|
||||||
|
"""Tag creada por un usuario"""
|
||||||
user = ForeignKey(User, on_delete=CASCADE)
|
user = ForeignKey(User, on_delete=CASCADE)
|
||||||
name = CharField(max_length=50)
|
name = CharField(max_length=50)
|
||||||
|
|
||||||
|
|
||||||
class ListItem(Model):
|
class ListItem(Model):
|
||||||
|
"""Item de la lista de un usuario"""
|
||||||
user = ForeignKey(User, on_delete=CASCADE)
|
user = ForeignKey(User, on_delete=CASCADE)
|
||||||
entity = ForeignKey(Entity, on_delete=CASCADE)
|
entity = ForeignKey(Entity, on_delete=CASCADE)
|
||||||
tags = ManyToManyField(Tag, on_delete=CASCADE)
|
tags = ManyToManyField(Tag, on_delete=CASCADE)
|
||||||
|
|
||||||
|
|
||||||
class Stars(Model):
|
class Stars(Model):
|
||||||
|
"""Estrellas que un usuario le asigno a una entidad"""
|
||||||
user = ForeignKey(User, on_delete=CASCADE)
|
user = ForeignKey(User, on_delete=CASCADE)
|
||||||
entity = ForeignKey(ListItem, on_delete=CASCADE)
|
entity = ForeignKey(ListItem, on_delete=CASCADE)
|
||||||
quantity = IntegerField()
|
quantity = IntegerField()
|
||||||
|
|
||||||
|
|
||||||
class Opinion(Model):
|
class Opinion(Model):
|
||||||
|
"""Opinion de un usuario sobre una entidad"""
|
||||||
user = ForeignKey(User, on_delete=CASCADE)
|
user = ForeignKey(User, on_delete=CASCADE)
|
||||||
entity = ForeignKey(ListItem, on_delete=CASCADE)
|
entity = ForeignKey(ListItem, on_delete=CASCADE)
|
||||||
opinion_text = TextField()
|
opinion_text = TextField()
|
||||||
|
|
||||||
|
|
||||||
class OpinionHelpful(Model):
|
class OpinionHelpful(Model):
|
||||||
|
"""Voto sobre una opinion"""
|
||||||
VOTES = [
|
VOTES = [
|
||||||
('Y', 'Si'),
|
('Y', 'Si'),
|
||||||
('N', 'No'),
|
('N', 'No'),
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
from django.shortcuts import render
|
|
||||||
|
|
||||||
# Create your views here.
|
|
||||||
Reference in New Issue
Block a user