Thanks, but I am getting this error:
'Product' object has no attribute 'productimages_set'
On Tuesday, July 11, 2017 at 5:29:15 AM UTC-4, ecas wrote:
>
>
> You can query for the images, and keep the first one for the template
> rendering.
>
> products = Product.objects.all()
> for product in p
I think you should use formsets.
https://docs.djangoproject.com/en/1.11/topics/forms/formsets/
On Monday, July 10, 2017 at 11:20:19 AM UTC-4, Denis Cosmin wrote:
>
> I have a form Author that contains the field first_name, last_name, and
> email.
>
> I want to be able to create 1-10 of them at
I am trying to build a website where you can sell stuff. I want the user to
be able to upload multiple images per product/post. I think I have figured
that part out. But I am struggling to display one image per product. Here
are the details:
models.py (I have left out some basic methods)
clas
Hi Shahab,
I am in a similar position like you. I strongly suggest you do the
following
tutorial: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django
Its made by Mozilla Developers and it is amazing!
Good luck!
On Monday, March 27, 2017 at 12:27:59 PM UTC-4, Shahab Emami wrote:
4 matches
Mail list logo