Anonymous
like aws , pythonanywhere, ets
Pythonanywhere is free?????😳
Mirco
Pythonanywhere is free?????😳
with some limitations
Anonymous
Pythonanywhere is free?????😳
I think it's free for 3months then after we have to pay for pro version
.
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
Muflone
Ok
python anywhere has a free plan forever Just to reboot the services every 90 days
Muflone
Muflone
How?
You have to reboot the services, it will not be done automatically
Anonymous
How can I reboot the service?
cj
How can I reboot the service?
that's not a Django related question, move to Offtopic group (@PythonOfftopic)
Muflone
In the section web there's a green button. Just read it
Mahdi
anyone know about this.
Mahdi
NoReverseMatch at /register Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Vignesh
NoReverseMatch at /register Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
It means the url was not found , make sure that the arguments passed into the reverse function are defined in the urls
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
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
article.image_url is the url path?
Image_url is a field in models
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...
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??
Mendes
Y are u using image path instead of using {% static image%}??
no, here is the problem: return render(request, 'inblog/index.html', context= {'articles': articles})
Mendes
he is passing an articles object, but is calling the article object which doesn't exist...
Prasanthari
Did u check admin if the articles aren't empty??
Prasanthari
Can i see your models.py? And views??
Shikhar
Can i see your models.py? And views??
Sure. I'm sending the link
Mendes
the problem then is with the image path
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...
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
Mendes
I didn't understand
I will shot some examples, wait a minute
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
follow the images and you will get it...
After I click on edit as html a box appears on the place where inspector code is opened
Prasanthari