If I understand you right, you need to import your model (iPhone) in the admin.py file of your WebApp. And then register „admin.site.register(iPhone)" (without the quotes).
Good luck,
Christian
Am 22.01.2019 um 22:44 schrieb Alexandr Bulgakov <alexbulgakov90@gmail.com>: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)<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+unsubscribe@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.
For more options, visit https://groups.google.com/d/optout.
<django_add.png>
No comments:
Post a Comment