Sanjay
Anonymous
Mirco
Anonymous
.
Any one have django course?
Doragonsureiyā
Any one have django course?
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
Anonymous
Anonymous
Muflone
Ok
python anywhere has a free plan forever
Just to reboot the services every 90 days
Anonymous
Muflone
Anonymous
Muflone
How?
You have to reboot the services, it will not be done automatically
Anonymous
Anonymous
How can I reboot the service?
Muflone
In the section web there's a green button. Just read it
Anonymous
Anonymous
Mahdi
anyone know about this.
Mahdi
NoReverseMatch at /register
Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Vignesh
Anonymous
Anonymous
I have boolean model and form should be accepted if it is false. How to write a logic for this condition. Thanks in advance
Anonymous
Anyone can help me with condition
Arjun
Anonymous
Ok.. Can you please elaborate
Arjun
If you are saving form data , it will call form full clean so if you are writing a clean method in form class you can get form clean data , using that data you can validate
Shikhar
My template is not rendering the image. Here is the link of urls.py , views.py, and the template https://pastebin.com/ppFVfPjM
Shikhar
Anyone
Shikhar
Please help
Mendes
article.image_url is the url path?
Shikhar
Yes
Mendes
can you please show us a print of how the image is rendered on the browser?
Shikhar
It's blank
Mendes
ok, can you please verify the path that django render?
Shikhar
Mendes
press f12 and go to the img tag, verify if the src="{{ article.img_url }}" is rendered properly and is a valid path
Mendes
there should be something like <img src="https://yourdomain.tld/your/path/goes/here"
Mendes
instead of {{ article.image_url }} itself
Mendes
if the alt text is rendered then the problem is most like with the path itself, otherwise there should be an error somewhere else...
Shikhar
Mendes
ok, are there any posts created yet?
Shikhar
Even the title is not rendering
Mendes
try this:
Shikhar
Mendes
I see
Mendes
the problem is the call
Mendes
you are not looping through the articles object
Mendes
try this
Prasanthari
Y are u using image path instead of using {% static image%}??
Mendes
{% if articles is not None %}
{% for article in articles %}
<div class="row">
<img src="{{ article.image_url }}" class="card-img-top" alt="{{ article.title }}" />
<div class="card-body">
<h5 >{{ article.title }}</h5>
<p class="card-text">{{ article.content }}</p>
</div>
</div>
{% endfor %}
{% else %}
<p>No article found</p>
{% endif %}
Prasanthari
Ohh sry is the image is from models??
Shikhar
Mendes
he is passing an articles object, but is calling the article object which doesn't exist...
Mendes
Prasanthari
Did u check admin if the articles aren't empty??
Prasanthari
Can i see your models.py? And views??
Shikhar
Shikhar
Mendes
Shikhar
Mendes
the problem then is with the image path
Prasanthari
Mendes
the path itself is being rendered on the html source? if yes, copy it and paste on a new tab, try to open it...
Shikhar
Mendes
If it gives you a 404 error, then the problem is probably with the image itself that doesn't exist on source.
Prasanthari
Yeah try to open the image using the path on Chrome or some browsers
Shikhar
Mendes
Mendes
Image 1: https://prnt.sc/pp9x2a
Image 2: https://prnt.sc/pp9xau
Image 3: https://prnt.sc/pp9xmh
Image 4: https://prnt.sc/pp9xrx
Shikhar
So should I copy the src
Mendes
follow the images and you will get it...
Prasanthari
Did you installed, image related packages??
Shikhar
Prasanthari