Re: [Django] #35355: Images derived from models are not showing in template

2024-04-05 Thread Django
#35355: Images derived from models are not showing in template
-+-
 Reporter:  Blauwe Stad  |Owner:  nobody
  Technologieen  |
 Type:  Bug  |   Status:  closed
Component:  Template system  |  Version:  4.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  models, ImageField   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David Sanders):

 * resolution:   => invalid
 * status:  new => closed

Comment:

 Hi there,

 There's not sufficient information to confirm this is indeed a bug; this
 is more of a support request. Please seek assistance from a friendly
 community member in one of the support channels:
 https://www.djangoproject.com/community/

 If it does turn out there is a bug feel free to reopen the ticket.
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018eaefd5bed-592b0de0-4ce9-489b-b4cf-06b82ff2ef16-00%40eu-central-1.amazonses.com.


[Django] #35355: Images derived from models are not showing in template

2024-04-05 Thread Django
#35355: Images derived from models are not showing in template
-+-
   Reporter: |  Owner:  nobody
  BlauweStadTechnologieen|
   Type:  Bug| Status:  new
  Component:  Template   |Version:  4.2
  system |
   Severity:  Normal |   Keywords:  models, ImageField
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Images are not showing in templates despite following the documentation to
 the letter, which leave the conclusion that there is a bug with Django. I
 have the following:

 The directory goes as follows:  root  > media > assets

 {{{

 #models.py
 class NewsArticle(models.Model):

 uuid=   models.UUIDField(primary_key=True,
 default=uuid.uuid4, editable=False)
 image   =   models.ImageField(upload_to='assets/')


 }}}



 {{{
 # settings.py
 MEDIA_URL = '/media/'
 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
 MEDIA_DIR = BASE_DIR / 'media'
 }}}


 {{{
 #views.py
 from django.urls import path, include
 from . import views
 from django.conf import settings
 from django.conf.urls.static import static
 from django.contrib import admin
 from django.views.static import serve


 urlpatterns = [
 path('', views.details),
 path('',views.article_list),
 ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
 }}}


 {{{
 # template
 
 }}}

 Despite this, there is a bug with Django which prevents images from being
 shown in the template.
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018eaeeec1e6-18da33dd-dda7-4f24-98b0-c4a0ebee8643-00%40eu-central-1.amazonses.com.