Alex
Thanks when i put out of widgets dict it works , but can u tell me the reason
because a field is a field. And a widget is a widget. A widget is a part of a field.
Mahdi
class SetLastVisitUser: def init(self, get_response): self.get_response = get_response def call(self, request): if request.user.is_authenticated: # Update last visit time after request finished processing. user=UserCustom.objects.filter(id=request.user.id) if user: user.update(last_visit=now()) response = self.get_response(request) return response Hello Friends, can anyone explain this to me? Items init and call Code to set the last visit of each user
Hamidreza
hi, i have a Django App with postgreSQL, and i got this error: FATAL: sorry, too many clients alerdy connected to django, postgresql, telethon
Raj__Django
favicon.io no web process running herko error
Raj__Django
When uploading to heroko
Raj__Django
Can anyone help me for this error
Raj__Django
And also after running heroku ps : scale web=1 It is showing couldn't find that process type. (web)
Alex
Yes, modern postgres and mysql both have jsonfield
Alex
Oh, better to check their docs - since when they support json type
Ujjwal
Any tried and tested video or content regarding deploying a django APIs on heroku
Ujjwal
I have been stuck for 2 days yesterday and day before yesterday . Watched many videos ..I am stuck ..so any good resource ???
Кирилл
Con you recommend db-pooling for oracle?
Кирилл
I've tried django-db-connection-pool, but for some reason it do not want to do autocommit as regular django oralce backend.
Sarthak
Hey any good developer looking to spend time on an amazing project
Sarthak
No cash
Sarthak
Only accomplishment
Sarthak
The project is about creating an ecosystem which people consider their home on the internet
Sarthak
DM to discuss
Sarthak
We will launch some apps which would be part of this home on the internet
Sarthak
One app has been launched already, but traction is poor right now
Sarthak
But the play is we atleast make 2-3 apps I have planned and then pitch to an investor
Sarthak
Showing that we are commited
Sarthak
Towards the project
Sarthak
Backend is in django
Sarthak
I believe in excellency, and if you believe in it too, and find less such environments around the world, we would be suckers for one another ...god vibes only
Sarthak
Let the messages continue boys
Alex
Sarthak good luck
Sarthak
Thank you so much need all that I can get😃
Sarthak
🙈
Manuel
please What am I doing wront
Manuel
wrong
Manuel
class LoginSerializer(serializers.Serializer): mail = serializers.EmailField() password = serializers.CharField() print(mail) def validate(self, data): user_data = data.get("mail","") password = data.get("password","") print(user_data) print(password) if user_data and password: user = authenticate(email=user_data,password=password) if user: print(user) if user.is_active: data["mail"] = user else: message = 'User is desactivated.' raise exceptions.ValidationError(message) else: message = 'Unable to login with given credentials.' raise exceptions.ValidationError(message) else: message = 'Must provide username and password both.' raise exceptions.ValidationError(message) return data
Manuel
I'm putting the mail and the password it needs to login and it doesnt work
Manuel
please help
Ghorz
please help
Use pastebin
Manuel
ok ok
Ghorz
Also paste the errors log
Manuel
I got no errors just None
Manuel
when I do authenticate
Manuel
and I don't understand
Ghorz
and I don't understand
Posted the pastebin link
Manuel
ok let me do it
Manuel
https://pastebin.com/Ji0KKGNV
Manuel
tell me if it is OK
Manuel
I want to authenticate by emails not by username
Manuel
because I got multilple users with the same username but with differents domains
Manuel
that's why I wanna do it by emails
Anonymous
I want to authenticate by emails not by username
same thing i want to do with my website but i cant decide wether i have to customize model.py or i have to create new forms.py or anything..
Anonymous
If you have done it correctly, please guide me as well. thknx in advance..
cj
how come you can't find it? you posted the link to the book
Hamidreza
hi, i have a Django App with postgreSQL, and i got this error: FATAL: sorry, too many clients alerdy connected to django, postgresql, telethon
i don't know why i got this error my requests is so low my code is working so good but i get this error
Hamidreza
🧐
Nice
How to delete your project entire query set ???
Nice
Can anyone suggest me how to delete entire query set from your django project
Anonymous
Hello everyone is there any free course where i can learn how to create a saas platform web application from start to deployment along with testing in django . Please suggest me.
Anonymous
And also after running heroku ps : scale web=1 It is showing couldn't find that process type. (web)
U might have not configured heroku well , means may not have mentioned procfile properly
Anonymous
I want to authenticate by emails not by username
Check out this article on custom user authentication in django https://medium.com/analytics-vidhya/django-custom-authentication-with-email-cc7e3919f11c
Anonymous
Can anyone suggest me how to delete entire query set from your django project
Queryset ? Means whole db data ? Or data related to single model ?
Anonymous
Nice
So I can rewrite my query in django
Anonymous
Whole query set
Bro u mean all the data in database ryt ?
Nice
Yeah
Anonymous
Just do python manage.py flush
Anonymous
It will prompt for permission give yes
Nice
I'm creating a blog so there is a bug , I think my some of my query sets are mistak so , I want to rewrite my query
Anonymous
It will delete all ur db data , do it if u r not in production . Its quite risky
Nice
I'm creating a blog project
Anonymous
Just do python manage.py flush
Ok u can delete whole data in ur db using this command
Nice
Ok u can delete whole data in ur db using this command
Ok it means it will also delete whole queries right
Nice
Means ORM
Anonymous
Ok it means it will also delete whole queries right
Queries is what u do to extract data from database , no data in db means no query can be performed to it
Nice
Ok
Nice
Thnx bro 👍✒️
Neo
can we able to store logs based on the particular columns values changes in django