Astrapel
Hello, I tried to insert multiple values (bulk) and used "post.getlist" data but when I tried to get data such as "integer" value return like this = value="['1']"
this value(error value) is coming from "html"(print) and error comes from "form validation" and return "error for "please enter number" and I don't understand why am I getting this value instead just "integer "number" the input I used is "number" type
code : https://paste.ofcode.org/39n3m7mTHRLRdtz2pAUWgBH
Anonymous
Pixelated
Pixelated
Something like this first_name = self.cleaned_data['fieldname']
Anonymous
Can i get Account on AWS without cc?
Jimmies San
Anonymous
Anonymous
Anonymous
I have deployed my django project on pythonanywhere all is working fine except media url
It's working in local but not on production
Eric
Anonymous
It is working when DEBUG is TRUE in production
Mirco
Loki
I am getting wrong path while updating image in website in Django
Loki
How can i fix this
Anonymous
How to make cart in django
Mirco
Anonymous
I always confuse on one thing
Def order(self,**kargs)
Anonymous
What **kargs is doing
Anonymous
I have never seen value is pass there
Rohan
Rohan
Also if you're using dockerized setup, use a volume mount
Anonymous
But static files are working fine
Anonymous
Anonymous
Rohan
Media is gone
https://docs.djangoproject.com/en/3.0/howto/static-files/deployment/
Rohan
Rohan
Anonymous
Ok
SJA
Hello guys pls is there any opensource Counseling system with django
Anonymous
Mirco
Gio
Happy new year guys
Zerihune
Hello guys does anyone hv a clue about object based permission in a model
Swapnil
I want to create registarion page but my data is not push into database
Anonymous
Anonymous
Why i have to use get_object_or_404
Instead we can use
Product.objects.get(id)
Muslim
Anonymous
Ok if product is not found it will not give error
Anonymous
In database
Meh
Ik that we can use some free css and html templates to design a webpage.
Can such thing also be found in django?
Mirco
Meh
Mahi
Hi everyone,
I want to learn and work on pyspark or python rest apis. I dont have much idea which is good to learn as per market requirement.Could you please suggest me which is good to learn and how can I learn it from scratch. ?
Or anyone have stuff in these topics. If yes, please share.
Mirco
setiawan
excuse me,
I want to ask? I have a problem appearing writing "unable to import django.shortcuts pylint (import-error)" I have tried installing pylint in virtual env but it's still an error in the visual studio application, what's the solution?
setiawan
Anonymous
How to get the name of a foreign key in an objects.all querry with an annotate count? I get the counts correctly but the ids of the foreign keys is showing instead of the value
Gio
Gio
Batman
Anonymous
What is asgi in Django 3.0?
Anonymous
Eric
Channels?
https://channels.readthedocs.io/en/latest/index.html
Rohan
Channels?
Let me 🦆 DuckDuckGo that for you:
🔎 django channels
Anonymous
It is used for routing like blog.something.com to main url
Anonymous
Can I make asynchronous something in Django using asgi like Ajax do then?
~
Can anybody help me out➡➡🔼..
.
I have a problem that i know how to get value of selected radio button but don't know how to get value or text of hyperlink that selected or clicked in html template in *django*
Mirco
Use a pre_save signal to make that calculation using a timedelta and then save it into the field
Mirco
Why not a DecimalField where saving this calculation ?
Mirco
You wanna save into the db that interval or not ?
Mirco
Ok so you need a field to save the calculation
Think better which type of field you want for that value
But the main stuff you asked for is how can do the calculation
A pre_save signal could be a strategy
Mirco
Before saving into the db you can make the calculation performed by backend
Mirco
Yup, but have a look at signals
They can do nice stuff 😊
Mirco
It's like when you wanna create a custom slug before saving.into the db
Mirco
Without saving it into the db, how can u use that duration in some other parts of your app ?
Mirco
get duration makes sense by retrieving it from db as well
Mirco
It depends on your needs
Mirco
It accepts timedelta
Mirco
Frontend is another stuff
You have to process that value into a view and give to the frontend the correct format
Mirco
By using the pre save signal you can get the value of the first 3 , make the calculation into the 4th and then it will save your instance
Mirco
For the frontend part, you will get from db that value and format as u want