Angel
why don't you use postgresql as your default database
Yes, I use postgres but I am talking about tasks that do not involve the database
Амир
cant use load in my project TemplateSyntaxError at /api/orders/ Encountered unknown tag 'load'.
Angel
It is the most basic 'hobby plan' but it is not free
Ak
Can anyone help me with aws django doubts
Charly
Can anyone help me with aws django doubts
If these are specific to Django just ask your questions here. If not ask in the offtopic group.
Ak
I mean i have my django backend in aws ec2 now i want to see printingd i have given in functions to certain purposes, how to make it visible, i have use used nginx and gunicorn
Ak
So you want to see what you printed using print()?
Yes i ajve given it in funcitons now i want check in live
Ak
Have you checked gunicorn logs?
I havent givrn logs setup in backend
.
Hello everyone, please tell me how can I make it work correctly? This is a table with text and a poster. The text stores text inside which there are links to photos, previously everything was pulled from the local storage, now it is moving to S3 and due to the fact that inside the text in HTML through the img tag, which is not sent a request to S3 and correctly. Here are the options I asked them to reach through C3, but they didn't get help - https://dpaste.org/4X3jS . Example in the poster value group - post_images/CL7RqfyE.jpg and to request I have a valid example - https://aaa.object.pscloud.io/media/post_images/CL7RqfyE.jpg ?AWSAccessKeyId=XXXXXXXXXXXXXX&Signature=XXXXXXXXXXXXXXX and expiration date=XXXXXXXX Request method: get Status code: 200 OK
Omo
Thanks everyone, am getting added knowledge from all questions and answers here.
Jamie
If you use Elasticache cluster, It will be the primary endpoint
Can give an example how it will be Showing failed to connect My code is CELERY_BROKER_URL='redis:username:password@hostname:port/0'
@user_shri
Hii How to connect vs code for python django with frontend
🏅♐Mark
Hii How to connect vs code for python django with frontend
i think you dont know about vscode,frontend and python django just watch a youtube video for a better understanding
️امیر
Hii How to connect vs code for python django with frontend
Step by step tutorial: 1. Install vscode Congratulations, it's done.
Mehdi
Hi Error : The ... attribute has no file associated with it Html : <img src="{{Site.Logo.url}}" width="200" alt=""> Models : Logo = models.ImageField(null=True,blank=True,upload_to='Logo')
Mehdi
I add image and website load but now i want to load website without image , i hope you understand
Mehdi
verify with an if it it has an image upload
I use null=true,blank=true Why must i upload image 🥲
Charly
I use null=true,blank=true Why must i upload image 🥲
Is not that you must upload it ut you ened to verify it has an image
Parsa
Is not that you must upload it ut you ened to verify it has an image
Is Django used in the I I have dio can I use it
Charly
Is Django used in the I I have dio can I use it
what's the "I" ?
Charly
Sorry iot
yeah you can use it, probable there are better options for specific tasks
Jamie
Showing failed to connect . I am using AWS Elasticache Redis My code is CELERY_BROKER_URL='redis:username:password@hostname:port/0'
Charly
An if thats literally the setting you need to replace it with your actual url
Priyanshu Pratap
Hey does anyone know how to add a scroll bar at the bottom of the admin panel. Like if i have a model that has many fields and i used a list display then is there any way to add a scrollbar at the bottom??
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Hi guys I want to create django project using postgres But I don’t know which way is better: create Internal db with django models or create External db using postgers What do you think I should do?
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Luis
Why?
Because thats how django works
Luis
You create the models and django deals with the database
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Because thats how django works
Ok Thanks bro I have another question, will there be a problem if i create db in postgres and connect to django?
Dj - 505
Hello .. i f i have 3 types of users Admin , Employee and Client I did by django rest framework as one project one website) , now the customer want 3 websites , website for each user type ! is that good idea with django RF and what is the best ideas to start with ?
Leonardo
AbstractUser and UserManager
Shan
I having issue using bulk update on listserializer
Shan
Error is cannot resolve keywords 'id' into field
Shan
https://github.com/30Shan30/inventory.git here is my code
Shan
Anyone could help on bulk_update not working
Doragonsureiyā
Anyone could help on bulk_update not working
If you need help, don't just say "not working", explain in detail what's not working the way you expect it to.
Shan
If you need help, don't just say "not working", explain in detail what's not working the way you expect it to.
I get an error is cannot resolve keywords 'id' into field using put method for bulk_update
Doragonsureiyā
I get an error is cannot resolve keywords 'id' into field using put method for bulk_update
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase.
Obdif
Has anyone worked with kubernetes before? Please I need your assistance. 🙏
Mirco
Has anyone worked with kubernetes before? Please I need your assistance. 🙏
If it's related to Django just ask your question Otherwise go to offtopic
Obdif
If it's related to Django just ask your question Otherwise go to offtopic
Yeah, it’s related to Django, I’m finding it difficult to install kubernetes on VM, is there any tutorial you can recommend 🙏
Dj - 505
Why not create a admin side of the web app . The admin side would display all data , and also be able to edit and also do some other necessary stuff.
I am sure i will use admin .. but how make the same admin page in these 3 websites ? How i do the same database belong these 3 websites ? I will use JWT how i put settings.py for these 3 website ? Can i get someone did like these project so he can explain to me ?
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Sing
Can some one help me to fix an issue. Can i capture 500 server error and throw it as 400 to client.is there any way which i can do globally in django
Parsa
Not with django but with with your webserver. But thats a terrible idea.
How can i get contexts from templates in Django not send for example i want to get the values from html input how can i ?
Eternity
How can i get contexts from templates in Django not send for example i want to get the values from html input how can i ?
Give your input name parameter: <input type="text" name="some_name"> Inside your function in views.py write this: input_result = request.POST.get("some_name") Remember that your input must be inside the POST form. Your input can have any name
Gregory
How in Djoser pack make require email field ? DJOSER = { 'USER_CREATE_PASSWORD_RETYPE':True, }
Aldiiar
Who knows how to automatically launch a function 10 seconds after starting a Django project, I launch the function immediately with the project via apps.py and the def ready(self): function, and I can’t figure out how to debug for 10 seconds
Nahom
class UserCreateSerializer(BaseUserCreateSerializer): """Custom UserCreateSerializer for Users model""" access_level_id = serializers.IntegerField() employee_id = serializers.IntegerField() class Meta(BaseUserCreateSerializer.Meta): """Meta class for UserCreateSerializer""" model = Users fields = ['id','username', 'password', 'access_level_id', 'employee_id'] i wanted to add custom field in djoser serializers but it is not working
Pius
Good morning everyone, my name is Timmy 😊
Pius
I'd like to ask, has anyone worked on a speech to tech project using Django 🥲
park seo joon
I was working on a post so I have a model that has a post, user, no_of_likes, date_created and caption so I only want it that if the user navigate to create update he will fill the form and I already have a form in my template that has a method of post and enctype so I query it like this @login_required(login_url='signin') def post(request): if request.method == 'POST': user = request.user.username post = request.FILES.get('post') caption = request.POST['caption'] if post and caption: new_post = Post.objects.create_post(user=user, post=post, caption=caption) new_post.save() return redirect('/') return render(request, 'home.html') The issue is that if the form is filled and submitted it's not showing in the database
park seo joon
Even if I check the terminal it's not showing a post was created it's just showing a response of 200 and if I check my admin panel it's still showing 0 post how can I fix this please
park seo joon
show your form code.
I'm not validating with form because I will still need to style it while widget is not responsive to different devices sizes that's why I use models to validate the input and textarea directly
park seo joon
If I'm the validate with form I will definitely have form =PostForm.objects.get(bla bala) If form.is_valid(): so I wasn't using form
park seo joon
frontend form code
Give me some minutes let me write it out
park seo joon
frontend form code
<form action="{% url 'post' %}" method="post" enctype="multipart/form-data"> {% csrf_token %} <div> <label for="post">Select image:</label> <input type="file" id="post" name="post" required> </div> <div> <label for="caption">Caption:</label> <textarea id="caption" name="caption" rows="4" cols="50" required></textarea> </div> <div> <button type="submit">Post</button> </div> </form>