Tukhtamurod
So....both are good ?!
why not, if you learn any front end framework and django rest, it would be the best choice
Anonymous
Hi all is any one have example of new django 3.1 async class based middleware
Taranjeet
So....both are good ?!
Totally agree with @black_tiger07 Templating engines with Django or flask are just for small or mid level projects. If you are working on something big. Try a frontend framework. React, angular, Vue these are the popular ones.
Michael the wolf 🐺
I have a database table with primary key = true set in models.py but when creating a new row , i want to use the specific number as a primary key value. Any idea on how to do this ?
Taranjeet
I have a database table with primary key = true set in models.py but when creating a new row , i want to use the specific number as a primary key value. Any idea on how to do this ?
Not possible. That's a unrealistic thing and why do u want to do that. Whatever you are trying to do is just simply wrong.
Michael the wolf 🐺
Why do u want to do that.
I have two tables one of them is a foreignkey of another. I was assigned a task of creating a single form to create a new entries in both tables.
Michael the wolf 🐺
The primary key of one table should be in one of the columns of another table.
Michael the wolf 🐺
If i can manually choose a unique id using random , the i can be able to so this. I couldnt think of any other way
Taranjeet
I still don't get u entirely but afaict you are trying to do something wrong. Primary key of a table is generated by the database itself, you can't and u shouldnt try to change that or even try to assign them manually.
Taranjeet
If u wan to do that manually then don't create a primary key
undefined df
Hi I just started learning Django and I barely understand anything can anyone help me
undefined df
Mirco
Already done that
You have always something new to learn
undefined df
Try and learn python first
It's just that the orientation is just messed up
Brainiac
It's just that the orientation is just messed up
Maybe that's the issue. Learn python with this material "Learning Python" by "Mark Lutz". Surely it'll help u
undefined df
Maybe that's the issue. Learn python with this material "Learning Python" by "Mark Lutz". Surely it'll help u
Thanks I will read it, but I am really good in object oriented programming maybe am I missing something
Brainiac
👆
Tukhtamurod
Hi I just started learning Django and I barely understand anything can anyone help me
you should get used to things that a framework does on behalf of you, no need to worry about what is going on, and why it is like this
Tukhtamurod
Django is an MVT framework you should understand this concept first
 Aryas
Hello friends. I have a little problem with taking data from select tag in html. I have named my select tag in HTML and when I want to take data in views.py I code like this: request.POST.get('name_of_select_tag') But returns null. and says NOT NULL constraint faild
 Aryas
could you please help me
Vishnu
Hey guys can anyone help me how to send an email using sendgrid and django
 Aryas
Detail it on stackoverflow then share the link here
https://stackoverflow.com/questions/34863342/how-to-collect-data-from-select-tags-into-django-views it was the link that I found and i found my error that was a ridiculous problem. It's better not to mention😂🤦‍♂️🤦‍♂️
Vishnu
It would be really helpful if you guys mentioned the correct steps for both smtp method
Vishnu
And Api key method
Vishnu
Sendgrid using api key
Vishnu
In django app
Vishnu
Can you guys help me out with this
Mirco
Start having some search online
AliReZa
What was it?
many=True in serializer
Sadra
Intelligent Agent 😂
Sadra
Hey guys can anyone help me how to send an email using sendgrid and django
Refer to the official docs right below. Just some settings and it goes nicely done. :) https://sendgrid.com/docs/for-developers/sending-email/django/ It's obviously not a big deal. Try to send the emails using async tasks. In this case, celery gonna be the best choice.
Khumoyun
Hello, I am iterating posts in my template/index.html I need display date if post day.month high than last displayed post date Question: How to display only date:"n.d.o" while displaying posts?
Sadra
I think it's something like this. {{post.date|date:"the format you want"}}
Khumoyun
ndo?
n => day with month d => year o => hour
Khumoyun
I think it's something like this. {{post.date|date:"the format you want"}}
I know but I need check date if last posted date is higher than displaying
Sadra
I know but I need check date if last posted date is higher than displaying
You probably need to work with Django pagination system. You can check if whether there are any posts before the post object.
Sadra
What's more, you can use last() method.
Khumoyun
You probably need to work with Django pagination system. You can check if whether there are any posts before the post object.
for example: {% for post in posts %} <p>{{ post.published_date|date:"H:i" }}</p> <p> {{ post.title }}</p> {% if first post day higher second %} <p> {{ post.published_date|date:"n.d.o" }}</p> {%endif%} {% endfor %}
Sadra
for example: {% for post in posts %} <p>{{ post.published_date|date:"H:i" }}</p> <p> {{ post.title }}</p> {% if first post day higher second %} <p> {{ post.published_date|date:"n.d.o" }}</p> {%endif%} {% endfor %}
I think pagination will help in this case. But make sure you are evaluating by the day parameter. Check out: https://docs.djangoproject.com/en/3.1/topics/pagination/ You can also make your custom filter using templateteags.
Sadra
thank you for your answer but Pagination can not help me
You just need to create a custom pagination class which focuses on the date. (mostly it does) And then, you can check if there is any post before a specific post.
Incognito
Hello, I'm new to django Question: can I create a contact app, with django Just like WhatsApp or telegram. Sync all the users contacts that are on the app
Vishnu
using django
Anonymous
Sendgrid has a perfect documentation in their site
Ariel
Best way to integrate Saleor with external Python code?
Mirthhh
order doesnt matter i think,doing projects by yourself is the biggest test for skills which you learned and will learn in process
Illia
Hello everybody does anybody have any articles or tutorials about safety in django? I want to know how to keep my secret key and db credentials and ... secure.
Alex
Environment variables
not necessary. You will keep the credentials open in your code anyway. One of the solutions is to use ansible vault
pranit
Hello everyone I am trying to run Django project directly on domain name in aws without using port , can anyone pls help me out
Mirco
Follow rules or the exit door is close to u 🙂
Sadra
Good job. 👌 Focus on OOP, bootstrap, and Django. I'll bet you'll shine. ✨👌
Alex
would you please explain more?
Sure! https://docs.ansible.com/ansible/latest/user_guide/vault.html
Ariel
When you wrapping Django project with Docker, do you need to re-build it every time you change the code?
Ariel
There isn't a way to push the new code into the container strictly from PyCharm project?
Mirco
When you wrapping Django project with Docker, do you need to re-build it every time you change the code?
but if you run django runserver and wanna have it reload on every changes you just need to set up correctly volumes
Ariel
Thank you
Bagas
Can I disabled logging for custom management commands ?
Doragonsureiyā
Can I disabled logging for custom management commands ?
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
Bagas
!search
There nothing from google. So i ask here.