Re: unique_together does not work in django 2.0

2018-01-19 Thread FernandoJMM
Hello, Problem solved. For it to work I have to put the META class between the silo class and the method. Thank you El viernes, 19 de enero de 2018, 12:53:28 (UTC+1), Jason escribió: > > To be clear, you started with an empty database and the duplicate values > exist after adding data? > --

unique_together does not work in django 2.0

2018-01-18 Thread FernandoJMM
Hello, I have the following class: == class Silo(models.Model): nave = models.ForeignKey(Nave, on_delete=models.CASCADE) codSil = models.CharField( 'Código Silo', db_index=True, max_length=2, default='01') notas = models.TextField(null=True, blan

Using the ModelAdmin.inlines class, there is no DELETE button

2018-01-13 Thread FernandoJMM
Good Morning, I'm customizing the ModelAdmin class inlines attribute. The code is this. class NaveInline(admin.TabularInline): model = Nave fields = ['codigoNave', 'nave', 'tipoPuesta'] ordering = ['codigoNave'] extra = 1 class GranjaAdmin(admin.ModelAdmin): fieldsets = [

Re: Error following django's documentation 2.0

2018-01-09 Thread FernandoJMM
, 2018 at 8:32 PM, FernandoJMM > wrote: > >> Hello everyone, >> >> I'm learning django. I am in the official documentation of django link: >> >> *https://docs.djangoproject.com/en/2.0/intro/overview/ >> <https://docs.djangoproject.com/en/2.0/intro

Error following django's documentation 2.0

2018-01-05 Thread FernandoJMM
Hello everyone, I'm learning django. I am in the official documentation of django link: *https://docs.djangoproject.com/en/2.0/intro/overview/* After creating the model and doing the migrate I go to the section called *Enjoy the free API* to test in the python terminal and I get an error when