Dinesh
I assigned a class and given a character field but the max length isn't working.
What you mean by isn't working, share the piece of code or error. Add some more detail, are you saying you were able to save more characters than the condition ?
Hondamir Qobilov
Express.js ni kim biladi
Hondamir Qobilov
Yordam kerak edi
Doragonsureiyā
Express.js ni kim biladi
Python groups in other languages (⚠️Not managed by us ‼️) Amharic @python_amharic Arabic @arabipython Azerbaijani @azepug Chinese @pythonzh French @python_francais German @pythonde Hebrew @pythonisrael Hindi @pyhindi Tamil @pythontamilcommunity Indonesian @pythonid Italian @python_ita @pythonita Kazakh @python_kz Malaysia @pythonmalaysia Persian @pyfarsi Portuguese @pythonbr Russian @ru_python_beginners @ru_python @python_scripts Spanish @PythonEsp Swahili @python_eafrica Turkish @python_tr Uzbek @python_uz If you have an active and well managed group that you want to be listed there, ask in the Meta group, link in the rules page.
Arman
Guys is there a tool to automate or at least make more easier to document/readme.md django orojects? Maybe some AI ? wanna nention that I know already know about swager, Im asking about pure django
refleks1a
hello everyone, im trying to connect to mysql: mysql.connector.connect( user="${MYSQL_DB_USER}", password="${MYSQL_DB_PASSWORD}", host="${MYSQL_DB_HOST}", database="${MYSQL_DB}", ) but i get an error: mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'@'172.18.0.3' (using password: YES)
refleks1a
MYSQL_DB_USER=root MYSQL_DB_PASSWORD=root MYSQL_DB_HOST=mysql-db MYSQL_DB_PORT=3306
Dinesh
MYSQL_DB_USER=root MYSQL_DB_PASSWORD=root MYSQL_DB_HOST=mysql-db MYSQL_DB_PORT=3306
Try with host "localhost", I hope you are running mysql in your machine itself.
Dinesh
CREATE USER 'john'@'%' IDENTIFIED BY 'password'; Will allow user john to connect from any IP CREATE USER 'john'@'192.168.1.200' IDENTIFIED BY 'password'; Will allow user john to connect from mentioned IP only. If the root user you are trying to use is the default user created means its only allowed fo access from host - localhost.
refleks1a
i am using correct credentials, because i can login to sql db using the same credentials via command line
Siddharth
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'your_database_name', 'USER': 'your_mysql_user', 'PASSWORD': 'your_mysql_password', 'HOST': 'localhost', # Set to your MySQL server's host 'PORT': '3306', # Set to your MySQL server's port } }
Siddharth
pip install mysqlclient
refleks1a
i do like that but i get the credentials from .env
Siddharth
i do like that but i get the credentials from .env
So use os environ and call the values there
Dinesh
i am using correct credentials, because i can login to sql db using the same credentials via command line
In that case can you share output of from mysql shell. SELECT * FROM mysql. user;
refleks1a
i am trying to connect to mysql from docker entrypoint
Dinesh
i am trying to connect to mysql from docker entrypoint
Then create a user with host 172.18.0.3
refleks1a
doesn't work
refleks1a
same error
Dinesh
Mysql is running inside docker ? Is it binded port correctly. Are you using docker exec to connect from command line.
refleks1a
https://github.com/refleks1a/RealEstate_application
refleks1a
SELECT User,Host FROM mysql.user; +------------------+-----------+ | User | Host | +------------------+-----------+ | john | % | | mysql.infoschema | localhost | | mysql.session | localhost | | mysql.sys | localhost | | root | localhost | +------------------+-----------+
refleks1a
so?
Dinesh
Wont work
Yeah IDK before its docker.
refleks1a
i tried to use john but get this: mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'john'@'172.18.0.3' (using password: YES)
Anonymous
How can I setup Github's Django project to my own laptop to run it successfully?
clouded
so?
So, use john
clouded
i tried to use john but get this: mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'john'@'172.18.0.3' (using password: YES)
You may be able to use John to connect to the database, but that does not mean the password is set correctly, nor that John has the right permissions on the database.
refleks1a
i gave this user privilages: GRANT ALL PRIVILEGES ON *.* TO 'john'@'%' -> WITH GRANT OPTION;
Dinesh
i gave this user privilages: GRANT ALL PRIVILEGES ON *.* TO 'john'@'%' -> WITH GRANT OPTION;
Try paasword without any special characters if any. Just throwing some possibilities I can remember.
Arman
Guys is there a tool to automate or at least make more easier to document/readme.md django orojects? Maybe some AI ? wanna nention that I know already know about swager, Im asking about pure django
Alex
@authentication_classes([BasicAuthentication]) @permission_classes([IsAuthenticated]) @csrf_exempt def handle_json(request): if request.method == 'POST': received_data = json.loads(request.body) response_data = { 'message' : 'Json received successfully', 'received_data' : received_data } return JsonResponse(response_data) else: return JsonResponse({'error': 'Invalid request method'}, status = 405)
Alex
i have added rest framework authentication in my settings but still it gives a response without the basic auth what could be issue what am i missing ? someone help 'rest_framework.authentication.BasicAuthentication',
Krishna
Hi you can try API views that might work for you or share complete auth setting of rest framework
Krishna
Alex
Rana
Hey, everyone can you help me how i get remember me im login page ?
Anonymous
group_id is a str
Mahan
Hi can i create application backend with drf?
Bilal
are any one host and deploy django project on bluehost?
Georg
helo. I trying to do this request.COOKIES, but the map is empty but I see in browser that Storage->Cookies->"localhost"->* present. At least I can see sessionid
Alex
I don't think this format is supposed to be used for code.
what is the best way to listen to a request i know its coming in json format and the other side that is sending needs a basic authentication
Georg
may be a cause in different port back/front
Alex
I don't think this format is supposed to be used for code.
i have tried https://pastebin.com/fFPiuxCr still not getting a response i have disable the authentication but not getting response what could be the issue ?
Georg
may be a cause in different port back/front
yep.. That was a trouble. solved
Bilal
I can do it.
What your opinion about blue host ? Are best choice to deploy and host ?
Secret
Bilal
Thanks , but I face an issue with redis on cpanel
Bilal
It's not supported
Bilal
https://googiehost.com/blog/best-django-hosting/
Thanks for this link , it helpfull
🎉🅹🅰️🅻🅾️🅻🅸🅳🅳🅸🅽🎉
https://googiehost.com/blog/best-django-hosting/
they are all paid,are there any hosting that are free for test