Ghorz
So I can just increase max_connection in postgrrs conf from default 100 to say 500
Just increasing max_connections is bad idea. You need to increase shared_buffersand kernel.shmmax as well.
Ghorz
So I can just increase max_connection in postgrrs conf from default 100 to say 500
https://stackoverflow.com/questions/30778015/how-to-increase-the-max-connections-in-postgres#32584211
Maz
Nah, I haven't used it. @pyflare can answer
Mirco
@pyflare
never used yet
Wanjohi
Hello Guys. Have an issue I need some advice on..I have multi-user-types in my app e.g. Teacher and Student . I have separate registration views for each. I want to allow these guys to edit their profiles. Which is the best approach for doing this?
Rohan
Also approach for what?
Rohan
They sign in > they change profile
Rohan
🤷‍♂
Adil
Hey guys, who can help me to find mistake in my python script?
Wanjohi
Also approach for what?
Handling profiles.
Adil
Im writing a script to parse database, and i use lIKE statement, but it throws some errora
Adil
Run it and you'll find out
im stuck on it for an hour, to me everything seems correct
Wanjohi
Database
Have a model User that extends AbstractUser and created different models for each user type with a OneToOne to User model
Rohan
Show the models maybe?
Rohan
Use linkode.org to share code
Adil
🤦‍♂️🤦‍♂️
Wanjohi
Use pastein, to show what you coded
http://linkode.org/#wgnhGWmTGktvlc2Y1zXTg
Ghorz
http://linkode.org/#wgnhGWmTGktvlc2Y1zXTg
What problems did you encounter
Ghorz
You didn't import the header
Wanjohi
What problems did you encounter
As I said up there ... have the two user types. I need to create profiles for the two for them to edit. Was asking about the approach that's favourable in such a situation.
Ghorz
You inherited from abstract which has more information
Ghorz
So their profile will be based on the user model you created
Ghorz
That's what they'll edit for profile
Wanjohi
Okay. Got an idea. What if someone has the two user types?
Yash
Show us what you've done first, we can write code for you.
Nothing devloped anything yet i have to start from 0 you have any idea so you can share with me
Ghorz
Nothing devloped anything yet i have to start from 0 you have any idea so you can share with me
Study the website appearance, remember you have to things to accomplish, 1. Logic 2. Template It's upto you. Have you built small project like blog, portfolio, etc before
Ghorz
Yes but they are too small campare to this project
If you've built those before, you should have an idea, first set up the app user authentication system, user profile. Then think of how you want the site template to be or duckduckgo for free templates. That's your first task
Puranjay
I want to delete foreign key dependency. When I am fetching the object it's giving some object in form of queryset. But when I try to delete to delete it it's giving an error something like "TypeError: NoneType objecy is not callable"
Puranjay
What should I do?
Sander
Puranjay
https://pastebin.com/TWgbCSG7
Puranjay
This is my problem.
Puranjay
Sander
https://pastebin.com/TWgbCSG7
Your query returns None
Sander
You can't delete None
Puranjay
Actually the filter command is returning the objects with the queryset
Sander
Try calling .all() before .delete()
Puranjay
https://discourse.panda3d.org/t/typeerror-nonetype-object-is-not-callable/1808
Sander
So xxx.all().delete()
Puranjay
print(VDLContract.objects.filter(contractindent__cont__Client__in=clients))
Puranjay
When I run the above the command it's printing the queryset
Puranjay
So xxx.all().delete()
I am trying that
Puranjay
Didnt work
Puranjay
With all()
Puranjay
So xxx.all().delete()
I tried with all() but it is also not working
Puranjay
So xxx.all().delete()
Can you please help!
Puranjay
So xxx.all().delete()
Can we delete a queryset without delete()
Puranjay
Is there anyother way
Puranjay
What happended??
Anonymous
How to make custom django user without password field? to be more clear, I want phone sms verification
Master
Puranjay Your error is happends on this line: vdl_market_object.delete(), not here VDLContract.objects.filter(contractindent__cont__Client__in=clients).delete(). So use pdb and trace value vdl_market_object in your utility function
Anonymous
Can you please help!
Model.objects.all().delete()
Master
@uzbek_muslim https://docs.djangoproject.com/en/2.2/topics/auth/customizing/
Master
Write custom backend, create custom User model, whatever you want.
Abhinav
Hey guys can you please help me out with this! https://pastebin.com/6JZQ1BUZ This is my forms .py file. I have made 3 dropdown linked with each other via Foreign Key. Using this code, I have to click on Save button every time I shift on to next drop down. I want to do without clicking everytime on Save button. What should I do?
Robin
Anyone here who can make landing page.
Master
Anyone here who can make landing page.
Thats a Django channel... Anyone here can make a landing page.
Master
Or at least pretend to ... 🙂
Trials
Anyone here who can make landing page.
how much are you gonna pay?
Ghorz
Anyone here who can make landing page.
Duckduckgo.com landing page template, modify it.
Puranjay
Model.objects.all().delete()
But I want to delete some specific entries only.
Anonymous
But I want to delete some specific entries only.
Then Model.objects.filter(yourfilter).delete()
Puranjay
Then Model.objects.filter(yourfilter).delete()
I did that only.But it's giving error