Anonymous
How can I limit_choises to my admin model field based on request.user? E.g. if request.user.role == 'A' this user may set some values to AdminModel. If reques.user.role == 'B' this user may set another values to AdminModel How can I implement this thing?
Anonymous
I'm trying to add this method to my AdminModel, but it not affected https://pastebin.com/6ky2uhnZ
Mohit
I want to push real time notifications to angular frontend.. I'm using django rest framework.. Best way to achieve this?
Mohit
👍
Anonymous
Better don't generate then.
Sumit
Hi everyone, I am building a web server for displaying some reports using django. I tried using the dash framework but then realised that it needs another server of dash itself to run along with django. Is there any way to make dash and django run as a single server? because otherwise its hard to impose user authentication. Please help here.
Sagar
No WhatsApp
cj
oh... shit... oops!
Sagar
3/3 😅
Anonymous
Good day
Anonymous
Am new to using django
Anonymous
And am not quiet getting the installation successfu'
Anonymous
Can someone help me our
Anonymous
Out
Anonymous
Thank you
cj
Can someone help me our
show the steps you did, and the errors you got and give more context
Anonymous
Though am using window pc
Anonymous
After i opened window powershell ISE instead of Window Powershell
Yep
Where to start if i need a table, which gets generated by choosing a field from a database? Name color model A. Red. Coupe A. Green something ... B. Black. Coupe And so on.. I want to create some option, that someone can choose between A and B and than the table gets generated. Where to start with that? Anyone have some tipps/links?
Héctor
can someone recommend me an alternative to django typeform in which I can store the structure and data in my database?
Yep
One idea Write an API endpoint that accepts a param to filter your queryset and call it when you select the table option ( for example on change select option into your frontend side )
Puhhhhh...hmmm...i thought it can be done easier. Im glad, that i can display my database with all the functions around..will screenshot this and check, thxs
Yep
That's easy
Any suggestions for google on that? New to django ~2-3 weeks
Mirco
cj
nice bot, you're still alive 🙂
Wisdom
Hello everyone, please am new to django, can u tell me the roadmap/concepts I need to learn to be master in Django?
NR
Hi
NR
Looking for paid help need to clone one script
NR
If interested pm me
Alexander
Rammanoj
hey guys, I have been using drf for a while and got a weird error. Hope will get some help here. I have a queryset, I need to serialize and return the json response. But I am not sure how to pass the queryset to the serializer. serialized_post = serializers.PostSerializer(models.Post.objects.filter(pk=post.pk)). And the response to it is like: You passed a Serializer instance as data, but probably meant to pass serialized .data` or .error. representation.` I am not sure where I went wrong. Can anyone help me out ?
Rammanoj
change Response(serialized_post) to Response(serialized_post.data)
thanks for the response. That is one of the mistake and there is also another one. I also found an answer here https://stackoverflow.com/questions/48348267/django-rest-framework-queryset-object-has-no-attribute-pk
Avinash
I create a forms.py(not a modelform) then how can i save details to the model on submit ?
Mirco
I create a forms.py(not a modelform) then how can i save details to the model on submit ?
Create a form that inherits from forms.Form , create the fields you need , then use it into a view and render it into a template On submit get post data into the view and create a model instance on form valid
inchidi
which part you trying to make?
inchidi
so, you never learn anything about django before?
inchidi
what do you mean by more in depth good resources?
inchidi
so i assume you already store your video inside file field on your model, then you can simply pass your object in context
inchidi
then from that data, its up to you how to render it, whether you want to use js library or simply html5 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
Sanjay Krishnan
The db design is very important..and keep track on orm queries you use with the help of django debug toolbar.
nasim
Any django developer here
nasim
Please help me
nasim
I have a projct
nasim
If u won't help
nasim
My job will go
Sanjay Krishnan
Ask your problem
Anonymous
Hi to all, how I can run a module.py from javascript and render the result from it
Anonymous
I mean I want when the client press a checkbox (the string inside them will go to my module.py ) it will go to the server side (python( django ))
El
hello I have a question how can I set a time field in a form ?
Avinash
Can't we make an autofield a foriegnkey in another model ?
Mr.Robot
How to do Authorization in django. Authentication is not only the way to filter different users
Jagat
Hello everyone I want to use mysql with django What I should do for that
Jagat
I know sqlite but they want in mysql db
Jagat
Help me
NR
In settings adjust sql configuration
NR
Rest of configuration remain same
Anonymous
And i think you need to install mysqlclient
El
hello friends I have a question if I already have my template html of my form as I can pass the fields of my forms.py?
黒の戦士
Hello everyone
Jean C.
hi