.
Please help !!!
Alex
.
For ex- I have included three pizza having some features and it's cost and the no of each pizza now I want to take add total cost and save in db ,how to achieve this
.
Do the input be like nested JSON
F R
Hi, if we want to define swagger documentation (drf-yasg) for generic view in order to see parameter and response serializer in swagger link, what should we add to our view?
Hikmet
Hi all. I have such a problem. There are two views detail and export. And I have 2 forms in one template that handles them. In the second form, I marked the url specified in the actions
{% url 'export' %}
in such a way, but it seems that it sends the post request to the previous view named detail.
How can I fix it?
Hikmet
https://dpaste.com/4FRLGSDKH here is the code
ꪉꫝꪖꪹᦋꪖꪜ
Can i add forgot password in default django administration panel, and is it possible to change view ?
Anonymous
Sanjarbek
#help
https://dpaste.org/Ud1a
Azizbek Xushnazarov
#help
https://dpaste.org/Ud1a
its is a server error which means that a compilation error occurred in your code. turn Debug to True in settings.py to see what happened in the code.
Sanjarbek
Y
Hello
Please i want to know how integrate Api in django App?
Y
Yes I want to integrate someone's api
Y
Äli
hello everyone i need somehelp
dคv¡d
Alex
Yes I want to integrate someone's api
You should start from learning the API. Then you should search if there is a python client for that api. If no, you can write your own, otherwise you will end up with tons of code like:
token = requests('api-get-token`)
headers = <set-headers-with-token>
response = requests.get('api/someendpoint', headers=headers)
response.raise_for_status()
data = response.json()['data']
Äli
I have task to get POST data from request, so that request have many fields I need to store them in different DB_model, I solved it with hard code Serializer create() method by importing Model and create it manually Model.objects.create(bla=validated_data["field"], ...etc )
AnotherModel.objects.create(......etc)
it's worked by the create() should return one objects so I can't return :
Model
AnotherModel
and if return one of them I got error in Response: "There a missing fields.
thanks
Äli
Y
Rahimi | رحیمی
Hello every body!
I'm coding a project which should has more than one admin, I have to gave them only a super admin access but make it possible for this super admin to change any user's role to an admin, and define the access level.
How can I implement this feature?
🤔
I appreciate any help 🌻
Alex
Hunde
https://stackoverflow.com/questions/45895010/display-tomorrows-date-in-django-template/50930093
Hunde
Anonymous
I want to learn Django via project based learning with cohort. I have completed Corey-Schafer video, and now looking for 2-3 people. If interested, please dm me
Mani
Hello I am usıng celery and django_celery_beat
My task can be created in celery when I create them manually.
but when i create them with django_celery_beat, they are not passed to my redis. What should I do?
Alex
Mani
Have you set up beat itself?
I didn't do any set-up, according to celery document I used pip install and then added it to my installed apps, do I need to do more? I have added my celery itself, and it's working when I do task.delay()
Mani
Anonymous
please explain need of
def str(self):
return self.title
what exactly it does?
Alex
Pixel
Cleiton
Hello
I have a view with a form and formset.
Is it possible to validate form fields based on the number of formset forms entered?
Example:
if len(cleaned_data['formset'].forms) > 2:
raise ValidationError(...)
F R
Hi, although i installed drf_yasg, openapi when i write this code it has red underline for drf_yasg and openapi
from drf_yasg import openapi
why this happens and how can i solve it?
Mirco
Stefan
please explain need of
def str(self):
return self.title
what exactly it does?
This is actually a string method. It is rendered when an item has been saved in your database.
So if your return self.title, it will return the title that item. And it will also be displayed on your model ymif you didn't overwrite it with ModelAdmin class with list_display = [] in your admin.py file.
Alex
∫ 𝔞𝔪𝔞𝔫
Hello
Is there any way to refer to static files in css files?
Gideon
Gideon
Gideon
there is still a library, but you can do without it
https://github.com/sklarsa/django-sendgrid-v5
Anonymous
I want to use two databases for my Django project. Is it possible to use multiple databases?
Charly
Talha
I have a problem with image name ? the file name is Pencil_jeans (1).jpg but when i upload this file by using RestApi it changs the name with " Pencil_jeans_1.jpg "
Here this is the code of save
serializer.save()
how to resolve this issue?
Jitendra Kumar
Registration number already exists before submitting I want showing like message , that's instance help-block error .
Please help me
Anonymous
Node js or Django?
Jitendra Kumar
Django
Ilya
𝓡𝓪𝓶𝔃𝓲𝓭𝓭𝓲𝓷
Hi guys. I came across the problem with models.
Problem is that I can not load my photos when i click to the main photo. It should show me the all photos which are related to the main photo by FK but it is not working.
Please help me with this problem if you can.
Doragonsureiyā
𝓡𝓪𝓶𝔃𝓲𝓭𝓭𝓲𝓷
#1375
Hello guys i need help every time I initiat the payment in by development server in django I got this error....you are accessing the development server over HTTPS, but it's only suppor HTTP
TheTanweer
TheTanweer
F R
hi, although i installed django and it is in my venv folder in Lib site packages when i migrate it says ModuleNotFoundError: No module named ' django'. for pip install dajango : Requirement already satisfied. should i delete my venv and reinstall all packages again? thanks
TheTanweer
ILYOSBEK
Ashish
How use rest api in browser in django
ILYOSBEK
and check python path
ILYOSBEK
youtube dennis ivy reactjs
Ashish
Sorry authentication system in rest api...to add api key in browser and get data like Google api
Ashish
Not postman or terminal
Anonymous
what are some best site that translate python code into plain english?
Anonymous
wtf this means super().form_valid(form), especially super() ?
Anonymous
yes😅