محمد دلشاد
have a look and help in it
Future
محمد دلشاد
a bit more explaination would be better
Future
result = Category.objects.filter(status=True)
if you want to get directly from table (previous one was using fk relation)
محمد دلشاد
okk usually we go like this
https://hastebin.com/ivicacaxex.py
and when we create forms we get desired result
what should i change in the models.py for my desired result
محمد دلشاد
Sobha
https://stackoverflow.com/questions/63682048/how-to-make-a-small-part-of-code-in-views-py-to-run-for-every-x-minutes-in-djang
Sobha
please help me
Beka
Read about cronjobs. That does something for specific time.
Mehmet
mirrorpie
mirrorpie
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": os.environ.get("DB_NAME", ""),
"USER": os.environ.get("DB_USER", ""),
"PASSWORD": os.environ.get("DB_PASSWORD", ""),
"HOST": os.environ.get("DB_HOST", ""),
"PORT": os.environ.get("DB_PORT", ""),
}
}
iliyaz
@mirrorpie in my example database variables written in string, in your example variables gets from system envs
mirrorpie
abhijith
any one know how to implement sokect.io with django rest framework??
Mirco
محمد دلشاد
Anonymous
Anyone need 30 days of Machine learning/ Deep Learning Interview Question By ineuron
محمد دلشاد
KJ
Shradha
Hi I want to build and practice django and django REST related projects. Can anyone help me with some sites for projects....
KP
Is AWS mandatory for web developer. Most interviewer ask about AWS. If Any one have any idea about it pls share.
Mirco
KP
If I want to learn then what will be the best way
KP
To learn
Mirco
AWS has path to get certification and learn about it
Mirco
otherwise internet is full of resources
KP
👍
Nirmal
Helloo
Nirmal
I want to set admin panel template in my project
Nirmal
How can i use template??
Beka
محمد دلشاد
Beka
محمد دلشاد
that wasn't link man that was @ with the property
Karthik
Can any one help me what are basic interview questions asked in django
Karthik
And how to prepare for interview
Shivam
Can any one share about how to create middleware
Mehmet
https://docs.djangoproject.com/en/3.1/topics/http/middleware/
Uday
{% for post in posts %}
<li>
<div class="blogContent">
<img src="https://wallpaperplay.com/walls/full/4/2/c/343005.jpg"><br>
<div class="blogTextPreview">
<a href="#"><h1> {{ post.title }} </h1></a>
<h3>{{ post.created_on }}</h3>
<p>{{ post.content }}</p>
</div>
</div>
</li>
{% endfor %}
i have image field too
Uday
how to show image?
Uday
in post model i have field for image
Anonymous
Hello
Please I am new to Django and I want to know how to display Django urls in my hompage template..
Thanks
Mirco
Beka
Uday
Uday
got it though, posts.blog_url.url
Uday
in img src
Beka
Did you set image configurations in settings.py and urls.py?
Zerihune
hello have difficulty displaying images while sending email
Sobha
https://stackoverflow.com/q/63689207/12169437
Sobha
this is my problem
Zerihune
have anyone tried sending emails in django
Sobha
Sobha
Sobha
Zerihune
it sends the email but doesn't display the images
Zerihune
i have used html email templates but fails to render the image
Mehmet
Did you give absolute urls into img srcs each?
Zerihune
yes its dynamic
Mehmet
What do you mean by dynamic?
Mehmet
Are your img srcs rendered like "https://yourdomain.com/static/img.jpg" or "/static/img.jpg"?
Zerihune
its from database
Zerihune
{% for x in post %}
Zerihune
{{x.image.url}}
Beka
Mehmet
You can create a fictive view and try that email tmplate
Mehmet
Or you can log your html before email to parse with your eye.
Beka
You are missing image configuration. Go to your project url and add those lines...
Zerihune
not rendering images in the email
Beka
Oh.. hmm.. no idea. Okay.
Zerihune