ꪉꫝꪖꪹᦋꪖꪜ
Try request.POST['username']
Yes, done i have got my mistake
ꪉꫝꪖꪹᦋꪖꪜ
It checks record from auth_user table, but what if i want to fetch record of other table ?
ꪉꫝꪖꪹᦋꪖꪜ
Do i have to specify table name somewhere?
S
How to identify when I'm execution of DJango Frame work resultant became display White Page. How to make this solution?
Abdalwhab
Hi everyone I hope your okay. How i can get order item in order admin page.
Abdalwhab
Relationship its one-to-one
Abdalwhab
From order to cart and one-to-many
Abdalwhab
From cart to order item
S
Kk
Alex
But it's hard to say without code.
F R
hi, if we have a model serializer with a jsonfield and we want to shpw only one key/value of a json field in our serializer (not all of them) how we should write this type of model serializer?
Alex
hi, if we have a model serializer with a jsonfield and we want to shpw only one key/value of a json field in our serializer (not all of them) how we should write this type of model serializer?
imho, your problem statement means that you've screwed up with your data model. It seems that you should rather use SerializerMethodField OR... you could try to use custom encoder/decoder https://github.com/encode/django-rest-framework/blob/f0a5b958a134e8cd94e3ef3263e8fa623ac9b82f/rest_framework/fields.py#L1772-L1776
Alex
My experience suggests that if you are going to apply such logic more than once, it's better to stick with the MethodField
Vitaliy
Hello, how can i provide required request fields for django channels, consumer method receive?
Ruslan
Hello everybody. How to properly place templates in a django project with multiple app? Index.html works with all apps. If you know where I can read about this theme, give me link please
Alex
Hello everybody. How to properly place templates in a django project with multiple app? Index.html works with all apps. If you know where I can read about this theme, give me link please
There is no magic receipt for that. You simple place your templates in a subfolder named after the scooping app. So if your index.html is located in blog app, then place it in project/blog/templates/blog/index.html
Alex
Then you can refer it in your templates as blog/index.html
Alex
thanks, could you please explain more about how to use serializermethodfield for selecting a certain key/value of a jsonfield?
Sure. Here is the doc https://www.django-rest-framework.org/api-guide/fields/#serializermethodfield
fester
Hello everybody. How to properly place templates in a django project with multiple app? Index.html works with all apps. If you know where I can read about this theme, give me link please
If you have multiple apps, just create subfolders with an app's folder, name it templates then create another folder within you can name it any name , but the best to name it the name of your app. Then you can add your template files of html
Harsh
is there any way to use 1 global function in every app without import in every views.py file?
Harsh
I want to use 1 function in every app how i use without import it
Azizbek Xushnazarov
Rahul
Is there any way to add search bar in dropdown in django admin
Mithun BL❤🐶
I have doubts regarding a task... They have given me a dataset, How can i use this dataset to create a graphs 📊 / charts using django ....
~
I am getting table_shop have no Column product image I tried to resolve by deleting database, migration files, pycahce, getting error validation when I ran migrate command If anyone having any idea to resolve the issue please don't hesitate to share
~
https://images.app.goo.gl/Y4FRWYATU8Vwhjaz8
tech-tycoon
How to pass infinite parameters in url_patterns path in django
~
This is how error looks
tech-tycoon
Can anyone answer?
Вин Король Саксов
tech-tycoon
How?
Вин Король Саксов
How?
You can't google what get parameter in url is?
tech-tycoon
?
tech-tycoon
Get?
tech-tycoon
I am not talking about forms
tech-tycoon
Can u explain please
tech-tycoon
I did not found anything from last . 5 hrs
tech-tycoon
How to pass infinite parameters in url_patterns path in django
Вин Король Саксов
I did not found anything from last . 5 hrs
https://www.seobility.net/en/wiki/GET_Parameters
Вин Король Саксов
Because you don't even google
Shivendra
How to use multiple user register logon in django
Mohammed
Hello my brothers I used channels in django to create a chat app but when I run radis I get this error . error during connect: this error may indicate that the docker daemon is not running:Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?all=1":open//./pipe/docker_engine: The system cannot find the file specified Haw can i resolve it?
Almaz
How to use multiple user register logon in django
I saw some videos about it on YouTube. Do you want me send you link to the videos?
Devansh
Does any one know how to write custom queries in elastic search ?
Devansh
I am implementing search api
Devansh
Using elastic search
Anonymous
Anyone worked on django + mongo?
Anonymous
Ok. I tried. I get warning related to primary keys. And now mongo collections aren't getting created
Doragonsureiyā
Anyone worked on django + mongo?
https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
Alex
https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
shh, dudes are inventing their own search engine.
James
How do I save multiple checkbox values in a single column in the database and retrieve it in django
Suhaib_0.0
How do I make the user when making an account put a picture of it
Suhaib_0.0
Where can I find everything about the Django?
Suhaib_0.0
Official doc
I don't understand what you mean. Do you mean a location and how can I find it?
Anonymous
can anyone help
Anonymous
class Route(models.Model): start_point =models.CharField(max_length=100, blank=True) end_point =models.CharField(max_length=100, blank=True) class Bus(models.Model): route_name =models.ForeignKey(Route, on_delete=models.CASCADE) # views.py bus= Bus.objects.all() start_query= request.objects.Get.get('startpoint') if start_point != '' and start_point is not None: qs = bus.get(route__start_point = start_query) print(qs)
Anonymous
i need to get start_point so that i can compare
Anonymous
from route model
Anonymous
https://stackoverflow.com/questions/69248300/convert-mysql-four-table-join-query-to-django-orm-query
Anonymous
hi there i wanted to makemigrations to my app but i am confused with direction command: python manage.py makemigrations applications/blog output: no installed app with label "applications/blog"
Anonymous
Make sure you have a blog in your installed apps in settings.py
not problem was with models.py solved) thank u
Giri
Anybody please tell me one best website for django rest framework ..
Doragonsureiyā
Anybody please tell me one best website for django rest framework ..
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
Ali Vs
What is query For SQL Max of each group (group by foreign key) ??
Alex
How do I save multiple checkbox values in a single column in the database and retrieve it in django
You could try postgres ArrayField https://docs.djangoproject.com/en/3.2/ref/contrib/postgres/fields/#arrayfield But actually what you are asking is not typical for relational DBs. You would rather create a one2many relation for that.
Alex
How do I make the user when making an account put a picture of it
well... accept the data from the user and put them in your DB. Profit. 🤷‍♂️
.
Hey I want to send more than one instance of the same object as Json including it's features and do some calculations and save in database how to achieve this?