Mirco
i have a column containing names of local areas... I want to populate those names in a choicefield... The model is called Area
ok, so form choicefield accept an iterable called choices , so u can work into your view and create this list from querying ORM and passing it to the form
Anonymous
i have a column containing names of local areas... I want to populate those names in a choicefield... The model is called Area
i would suggest, 1. create an api with verb GET, which reads from models ex:- Model.objects.all(), serialize it, then return in json format. 2. from ui side, whenever choicefield is clicked, generate an event which will call this API, then you can populate it. #sorry for the jargons
Anandababu
Hi..How to get logged in Windows/Linux user ID in django app
Anandababu
We need to show the logged in harris of Client system
Anonymous
Do you have AD user creds ?
Anonymous
you need to know how to make api call with your client (Java) and thats all. you can try create simple http get first or use any public api then try call it from your desktop code
You have some videos that illustrate that process? My problem is I want with javascript(client side ) I want to get json form, from the models on the django(server side )
Anonymous
you can try django rest framework for that
Yes, I try it, and on the server side, which you prefer to use?
inchidi
technically everything that depends on django are server side
Anonymous
I mean that I want just to do a simple JS request without needing to use templates on django
inchidi
Anonymous
on the case when we want to create an integrate web app? no?
Anonymous
yes, and I make with them an api root
cj
yes, and I make with them an api root
then you have your problem solved 😊
Anonymous
what I need is I to get the data from the api
cj
🤷🏻‍♂
cj
I guess you need to read about DRF first 😉
Anonymous
can you give me a video that illustrate that process?
cj
can you give me a video that illustrate that process?
better read the official documentation, I don't like videos
cj
videos are slow for learning, what I recommend you is to read official docs
Anonymous
Videos are good for learning GUIs
inchidi
Videos are good for learning GUIs
i dont think so, you'll spend more time just because it doesn't looks like yours
inchidi
while text usually provide screenshot when they think you really need to see their result
Anonymous
videos are slow for learning, what I recommend you is to read official docs
And according to your advice, I no longer need to use JS?
inchidi
inchidi
assuming webapp is what you want to achieve
Anonymous
so that's what I need. Like using AJAX or something, no?
Anonymous
true, ajax or fetch api
so any docs, github repos or atricles that illustrates that?
inchidi
that thing about learning strategies its just a myth, that people like to establish as having a “unique” way of learning, its only bs, since what it does matter are 2 things (or 3): - Will and discipline - that the learning is meaningful and has a concrete way of being used
Anonymous
the problem is when I make an api from a YouTube video
cj
And according to your advice, I no longer need to use JS?
you use JS on the client-side if you're making a webapp
cj
so any docs, github repos or atricles that illustrates that?
go step by step, first learn DRF, then you will read about AJAX/Fetch
cj
do you want to make your own API? or do you want to use someone else's API?
Anonymous
no!
cj
no!
https://t.me/django/37924
Anders (izzno / gooood) 🇳🇴
I admire you're patience...
Anonymous
hi I have a problem when using Django Models
Anonymous
Can I define multiple primary keys in Models ?
Anonymous
I tried to set ‘primary’ equals True but I got some errors.
🏳️‍🌈Robby [ Private Message = Spam]
https://github.com/pydanny/cookiecutter-django/blob/master/README.rst
cj
https://github.com/pydanny/cookiecutter-django/blob/master/README.rst
I can say that's the most used template I've known
🏳️‍🌈Robby [ Private Message = Spam]
Add it in the pinned message?
Anonymous
how can you guys type formatted text in telegram?
Anonymous
you can use unique_together
Mirco
like this
Long press on a word and choose mono
Anonymous
Thanks !
Mirco
🙈
😂
Macurrent
Hello team. did the command for running server change? I used to use python manage.py runserver. Now that does not work for me. python ./mysite/manage.py runserver works instead
Macurrent
They are located in desktop in a folder called django girls.
Macurrent
I got it. thanks
Vladimirs
Hey, guys! Could you tell me how can i save avatar from facebook??? THanks a lot!
Vladimirs
thanks)) i found it)))
Aadhi
Guys, how to pass the results of a query set into Django drop down list
Miguel
Hello friends, could you help me in decidme: ​​How can I simplify this part of my code? or make it more manageable, it's mainly to give Like and Dislike
Miguel
https://pastebin.com/9iDVjM8u
Rohan
/ban @WavesNewsRUGeorge68benc ad spam
Rohan
will restrict manually :/
N S
What is the best way to edit multiple records of a model at the same time
Anonymous
Write your own script
Rohan
What is the best way to edit multiple records of a model at the same time
What do you mean edit multiple records of a model?
cj
What do you mean edit multiple records of a model?
at the same time, don't forget that part
Rohan
Right, I'm supposed to know.