Anonymous
While uploading a file in a production environment the application throws 500 internal server error. How to solve it? env : centos7, apache2
Anonymous
I am not getting Dropdown menu for selecting foreign key in DRF https://pastebin.com/EMHjvCZZ
GodKiller
Can anyone guide me how to create rest APIs for my DL model using DRF?
GodKiller
I'll deploy it later on Azure.
Rahul
Hey Guys, I am trying to create web app using Python and django and I want to integrate terraform execution inside app. Any idea how I can run terraform from django using cmd? Or any other method ? Thanks in advance
Anonymous
Image
Never mind, solved
goku
Can anyone tell do I need to create serializers for models which will store data in db using post request?
mukul
ShipmentDetail.objects.filter(track_id=order_id or phone=order_id)
mukul
How to use the upper statement
Arezoo
How can i write unit test in drf ?i used client.post but i can not get reponse content.
Mirco
How can i write unit test in drf ?i used client.post but i can not get reponse content.
Are u using pytest ? If not just follow DRF testing section tutorial And share code
Hamidreza
How to use the upper statement
did you mean "or"?
Mirco
https://dpaste.org/ijE9
So what response contains ?
Arezoo
In response that is json contains success and other fields..when i print response i can not see response body
Mirco
If the status code is 201 And you don't need to hardcode it
Arezoo
Thanks 🙏
Mirco
You can take statuses from DRF
Mirco
https://www.django-rest-framework.org/api-guide/status-codes/
Arezoo
In unit test must i write all of condition that is in function?
Mirco
Mirco
For example if your view accepts some condition, you need to test that condition
Arezoo
🙏🙏
Lekhraj
Hi team, Can anyone please help to use django q on multiple machine clusters with mongodb as broker
Ankit
Please help me
Ankit
I have created a login.html file inside a templates folder and now I want to use that file inside a div tag as link ? How can I do that?
Mihir
Make a view function rendering your page and use the respective url as link.
Ankit
I am using Div tag is inside homepage which is my index.html
Ankit
Thanku
Ankit
And what about url
Ankit
I am using anchor tag inside div tag and defining link as full root of file but it is not working
M
Template can be inherited inside a template and u can pass values too
Xpyk3rs
anyone please help me to do Foregienkey
Doragonsureiyā
anyone please help me to do Foregienkey
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z" Just ask about your problem directly! With ~80,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
bikrant
I'm having blogging project, users can post to groups they join, but while creating a new post they can select all the possible groups, how to limit that to only user joined group list?
Xpyk3rs
Create a table named order with the following fields, --orderno --productdetails(foreignkey with product) --vendordetails(foreignkey with vendor) --paymentstatus --customerdetails(foreignkey with user) --deliverydate how to write this? i dnt nw this...but i created once and got some errors
Doragonsureiyā
Create a table named order with the following fields, --orderno --productdetails(foreignkey with product) --vendordetails(foreignkey with vendor) --paymentstatus --customerdetails(foreignkey with user) --deliverydate how to write this? i dnt nw this...but i created once and got some errors
Homework? Job/Quiz question? you have to do it yourself, this group is to help you on specific issues you have on YOUR code, so you have to show the code you wrote by yourself and explain where and why you are stuck... as simple as that. 🤷🏻‍♂️
rakhi
hii guys pless try to solve my problem:--- while iam installiing pip Install beautifulsoup on cmd its giving error like below error: could not find a version that satisfies the . error:no matching distribution found for beautifullsoup4. plese give me solution
Yash
How to extend the user model ?
Yash
I want to add more fields
Mihir
How to extend the user model ?
Try making a Custom model and add a One to One field relation with user model. With a related name. Then you can easily Access variables defined in this model. You can also extend the Abstract User Class but personally I find this method complicated.
Anonymous
Hello ı need help. that my ulr path('<str:category_slug>/',views.special_list,name='category'), how canı change to dynamic utl ?
Anonymous
example {% url '??' ?? %}
Kha
Hey everyone Does CBV replace FBV I’m a beginner
Mirco
Hey everyone Does CBV replace FBV I’m a beginner
Yup, but not always It depends on the use case
Kha
Because I still learn I don’t know which cases I have to use CBV or FBV
Alex
Because I still learn I don’t know which cases I have to use CBV or FBV
https://docs.djangoproject.com/en/3.1/topics/class-based-views/intro/ CBV is more useful first of all CBV separates behavior by used http method
Alex
Also you can use mixins
Alex
and other features that are described in the doc :)
Alex
Thanks bro
You are welcome!
Chandu
Hi friends, I have a small doubt, I will apply for python job. I have a skills of python, Django. But I haven't html&js. So am I eligible? Please suggest me
Anonymous
Python+django+mysql+redis
Anonymous
Mangodb
J
Hello friends, Can you pls suggest Any good intermediate level django video tutorials?
Yash
How can I create pipeline for django Project in gitlab.....
k
Hello, In my django project, there's one html button and on clicking that button, it will redirect me to an external python file, having some print functions..what to include in my views.py file?
k
My goal is to click an html button on my django web page and this will lead to run an external python script, whose output needs to be displayed on that webpage. The python script consists of some functions
Faisal
In view.py call function and render the output of function on your template
k
<form method="post"> {% csrf_token %} <button type="submit" name="run">click</button> </form> <p>{{res}} </p>
k
this is my html file
k
this is my views.py and u1 is my external file
k
from django.shortcuts import render from django.http import * from . import u1 import sys,os # Create your views here. def index(request): if(request.method == 'POST' and 'run' in request.POST): x = u1.printhis() return render(request,'home.html',{'res':x.stdout})
Ajay
Hi, I am working on some project. I want to know about something in microservice with django. Is this work in django or not?