Take those fields out as a foreign key and use that foreign key as inline
in this admin.

On Wed, 23 Jan, 2019, 4:14 AM Alexandr Bulgakov <alexbulgako...@gmail.com
wrote:

> Hello All!
>
> I need help(
>
>
> There is a class, it has 2 fields. I need to add an add button to display
> these fields again when required.
> models.py:
>
> class IPhone(models.Model):
>>     iPhone_name = models.CharField(max_length=50)
>>     iPhone_image = models.ImageField(upload_to='models', blank=True)
>>
>>     price_name = models.CharField(max_length=150, default=' ')
>>     price_cell = models.IntegerField(default=0)
>>
>>     def __str__(self):
>>
>>         return '{}'.format(self.iPhone_name)
>>
>>
> [image: django_add.png]
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c79b62de-fc5c-4acd-917c-8068b3e2e370%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/c79b62de-fc5c-4acd-917c-8068b3e2e370%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD-d1sZvgp7oi-tFL2TfAm%3D-tm%3D2rnqoadGM6V69CTkvftbh8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to