Ritesh
Hey ..I have a error in my program...can any one help me fixing the issues
Ritesh
Anyone
Ritesh
There
Anonymous
Yepp.
Ritesh
https://stackoverflow.com/questions/65596369/i-am-tring-to-write-a-customr-permissions-class-to-add-permissions-for-the-user
Ritesh
Here is the link in stack overflow for the problem
Ritesh
Please help
Ritesh
Any help will be appreciated
Ritesh
I hope someone will help
AA
" You are trying to add a non-nullable field 'sub_title1' to product without a default; we can't do that (the database needs something to populate existing rows). Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit, and let me add a default in models.py Select an option: 1 Please enter the default value now, as valid Python The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now Type 'exit' to exit this prompt " Hi, this is the error I get in my terminal. So do I need to add null=True or default value in sub_title1 ?
Meghna
You have to provide default value in the field of the model
CX
Django PostgresSQL and React.js How is this combination ?
Meghna
You have to provide default value in the field of the model
Or if it date time field then fieldame = models.DateTimeField(default=datetime.now, blank=True)
AdhamSec 💻
Hello everyone. I am a beginner in Django. I have an issue with one thing. So the issue is 'there are 10 number of regions in a country. When everytime we do ''python manage.py migrate'' it should generate 10 regions in admin site by default'.
Nirupam
Guys, i have 81 fields in one single model..whenever i am trying to add more fields it's showing error message - invalid column.. hownxan i add more fields here
Nirupam
You did makemigrations ?
I tried. But migration file is not creating..but i can add the same fields in some other model,no error in that case..but for a particular model with 81 fields , showing error like invalid column name
Nirupam
Migration file creating for other model with same fields but not with that model with 81 fields
Meghna
https://docs.djangoproject.com/en/3.1/topics/migrations/ Check documentation once
Raihan
How to downgrade python version in Django project
ֆ33ʏ377
i want to validate yaml file. Any suggestions?
Mirco
i want to validate yaml file. Any suggestions?
Use PyYAML and remember you are OT
Mirco
How to downgrade python version in Django project
Like you downgrade python without working with Django
Doragonsureiyā
OT means?
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Mirco
Or just move to @python
Tipu
Hey guys, I have a list of items in my home page. Now i want to add a delete button to every item. But I don't know how I can. Please help. I am stuck😟
Raihan
Ok tell here
Mirco
Hey guys, I have a list of items in my home page. Now i want to add a delete button to every item. But I don't know how I can. Please help. I am stuck😟
Just add the button that point to a DeleteView If you don't wanna refresh the page, use ajax or fetch API to make that call
Mirco
Ok tell here
I've already answered Downgrade python normally without thinking about Django This means if you have 3.8 and wanna 3.7 you need to install 3.7
Raihan
Ok thnx
Mirco
I suggest you to use pyenv to easily have more py versions and switch among them
Tipu
Can you please describe me?
Mirco
Can you please describe me?
Nope just because if you spend just a bit of your time on search engine like I did lot of time ago, you will find so many resources
Mirco
Just search by Django delete view ajax And you will find lots of answers
Mirco
It's part of CRUD so is simple and common, internet is full of articles
Tipu
Just search by Django delete view ajax And you will find lots of answers
I know how to delete and I also add but when I click on the button, it's just delete first item of my list
Tipu
Only first item
Firdaus
You need to iterate the button for all item in the list, just like u iterated all the items to create the list in the first place.
Mirco
Only first item
It's normal, the DeleteView expects an ID not a list
Mirco
To delete many objects you need to iterate over them
Anonymous
incorrect value expected pk value received list
Mirco
incorrect value expected pk value received list
Share the code, you will receive a faster help
Tipu
It's normal, the DeleteView expects an ID not a list
Can please tell me how to get user clicked item id my views
Mirco
I suggest you to study a little bit more if you keep doing this kind of questions
Anonymous
Have two tables... User_type and raw_data. I want to create new model hide service.. And the condition is like.. User can select the fields from raw_data tables.... Pls suggest me the relationship for third model
Doragonsureiyā
Ya, thanks
You're welcome! 😊
Tipu
!yw
What means that
Tipu
This
Okay, shortcut😊
Ritesh
https://stackoverflow.com/questions/65596369/i-am-tring-to-write-a-customr-permissions-class-to-add-permissions-for-the-user
Ritesh
Can any one help me with this issue
Ritesh
Anyone
Ritesh
??
Ritesh
Anyone who can solve my problem
isa
Hi, I have 2 questions: 1. Default value of SECURE_SSL_REDIRECT is FALSE. Do you advice to make it TRUE for deployment ? 2. What do you advice for value of SECURE_HSTS_SECONDS ?
Sergey
Anyone who can solve my problem
What do you need to do?)
Mirco
Hi, I have 2 questions: 1. Default value of SECURE_SSL_REDIRECT is FALSE. Do you advice to make it TRUE for deployment ? 2. What do you advice for value of SECURE_HSTS_SECONDS ?
1 - yes 2 - start with something small like 30secs and if it's good adjust until 1 year for example https://adamj.eu/tech/2019/04/10/how-to-score-a+-for-security-headers-on-your-django-website/ this read is suggested
Mirco
Doragonsureiyā
Thanks
You're welcome! 😊
Ritesh
What do you need to do?)
Help me....in solving my problem
Ritesh
I am stuck and trying to solve
Ritesh
But here no one is helping me
isa
How to redirect all HTTP connections to HTTPS in Django ?
.
HTTPS
.
My favourite
No Name 😎🙍‍♂
How to redirect all HTTP connections to HTTPS in Django ?
Which server do you use? I mean nginx or Apache
thenils
How can I keep digital ocean ip in google authentication redurect url