Pedram
hi i cant create super user after email , it show this : self.UserModel._default_manager.db_manager(database).get_by_natural_key( AttributeError: 'Manager' object has no attribute 'get_by_natural_key'
Ivan
friends, how do I save the pagination selection when updating the page?
Firdaus
What is httpsresponse?
https://docs.djangoproject.com/en/4.1/ref/request-response/#django.http.HttpResponse
Hamza
Hi what is the best way to send email ?
Hamza
Send_mail doesn't work and I face this error
Hamza
What's the error
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted.
Hamza
But I put my email and password in setting file correctly
Hamza
no i am using django
∆$¶u
no i am using django
You can reach here https://myaccount.google.com/lesssecureapps?pli=1&rapt=AEjHL4MocvpcsG-mq31U0Btm6vP0kaEEO-EGwsLNQVrwWO8UDHf53pQEI9Ukg0oDGb5h3HBSWnfN536O29fyl7DV4-qjPvF2EQ And turn on so that it can work
AL
How can one debug in Django Templates?
Luis
How can one debug in Django Templates?
Runserver will catch errors
Luis
Only syntactic errors I think
Uday
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted.
if ure using gmail u need to be logged in in the browser as well
Uday
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted.
or seems like the username or password youre providing is incorrect, regardless with django send_mail is the best way to send mails
Dani
You simply need to set up an app password and configure the settings correctly
Dani
But using Gmail as SMTP is a bad idea
Dani
Find a different provider
Oluwamuyiwa
I'm building an appointment webapp for someone So after trying to send mails to the person who tries to book the message enters spam Is this normal for development because I'm using a localhost server Kindly advice on what to do Thanks
Mohammed
How i can use filter_horizontal widget in form (out of admin pages) ?
Doragonsureiyā
Jay
Reverse for 'google_login' not found. 'google_login' is not a valid view function or pattern name. LOGIN_REDIRECT_URL = '/' path('accounts/', include('allauth.urls')),getting this error
yusof
hey guys,create at field in my model suddenly submit the wrong time. it was right at first. i checked my django time zone in setting but it was correct too. does it related with server or something ?
Doragonsureiyā
Yoi
Hey fellas, I hope you all are doing good! I am deploying my application on iis server and using django 4.1 , in settings.py file os.path.join is changed to pathlib (Path) and so I can't set STATIC_ROOT = BASE_DIR / "static". Can anyone please help? Ps. Tried available solutions online but not working for django 4.1 Help appreciated heartily thank you so much
Cheshtaaaaaaa
How can I upload image that is taken as input in form in django database?
Cheshtaaaaaaa
Cheshtaaaaaaa
Not this
Cheshtaaaaaaa
Then
I am asking user to upload image using form
frnd
Hey guys just finished official documentation tutorial, I want a clear learning path can anyone bright me up?
Jay
Can anyone help me in assigning group to a user using all auth
Jay
It creates a user
Jay
But not assigning ana group
Anonymous
hello, i want to ask, does anyone know how to use id and url at the same time?, because after the route to my work I can't return to the previous id, thank you
Andrey
Hello all! How to add new attribute and change attribute name and table others to keep data in database after migration python manage.py migrate? Manually in files to change? I look forward to hearing
Luis
I am asking user to upload image using form
You have to setup media in your settings.py
Andrey
Explain better.
python manage.py makemigrations test python manage.py migrate it will new table in database table test (id, name) i need to add new atribute count or to change atribute name => name_test exampe How it to do?
Andrey
Edit models.py.
ok, don't need to run python manage.py migrate?
Luis
ok, don't need to run python manage.py migrate?
After editing do makemigrations and migrate
Andrey
After editing do makemigrations and migrate
instead of the data flocked from the database?
Luis
thank you, i will try now
You should read the django documentation.
xdd
Hi all, I need when user successfully register on api/v1/auth/ page make redirect to api/v1/token to get users jwt. path('api/v1/auth/', include('djoser.urls')), """url for register""" path('api/v1/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), """url for get access and refresh tokens"""
xdd
Morteza
Dont understand
after registering the user call that url to get a token
xdd
Maybe i can somehow get after registration jwt tokens?
Morteza
and return the token + refresh token
xdd
Can you say please, what i need to do
Morteza
Can you say please, what i need to do
after you register the user make a token for that user and return a response contaning the token
Morteza
https://django-rest-framework-simplejwt.readthedocs.io/en/latest/creating_tokens_manually.html
Morteza
xdd
your welcome
Excuse me, but it must work if i dont have custom model User, and use base one in sqlite?
Morteza
Excuse me, but it must work if i dont have custom model User, and use base one in sqlite?
if you mean that you inheriting from AbstractUser or AbstractBaseUser, so yes it's ok
xdd
if you mean that you inheriting from AbstractUser or AbstractBaseUser, so yes it's ok
I dont create User model by myself, that creates automatically by django, i think
Ivan
Guys help me, I think the task is very simple, but I don't understand it in any way. There are pagination elements, when clicking on which get_absolute_url is triggered, the url disappears (?page=....) How to correctly prescribe that the object clicked on saves the tag after the url (?page=pagination number?) So that when the object is selected, the pagination remains in the selected place. I've been looking for an answer to the question for 2 days, but I still can't solve the problem.
Monkey
Hi everyone, I deployed website on linode. I configured name servers for domain, created a record for domain, and add domain name and ip to allowed hosts, but website available only by ip… this is my first website, and I don’t know what the problem (I configured name servers more than 3 days ago).
Monkey
Maybe you need to wait some time
The wait can be longer than 3 days?
Monkey
During 24 hours
I made all confirmations 74-76 hours ago…
Jerome
The wait can be longer than 3 days?
unlikely, you can verify that by opening a terminal then $ HOST myserver.com you should get the info. (ip-name-host)
Monkey
(your server name obv)
Yes, I get response with correct IP address … but it still doesn’t work
rtg
Hi! Question: I use in templates for internationalization: {% trans 'Example' %} Excellent! But, how can do that or internalization in forms.py forms? Thanks!!
👑 Dharmzeey
Hi please I am using a Formview from the django.views.generic, and in def form_valid() I wrote a condition that if it is not met, the form should re render on the web page
👑 Dharmzeey
please what way can I do it it FormView how can I accomplish this functionality
👑 Dharmzeey
please what way can I do it it FormView how can I accomplish this functionality
I have solved it .I used """return self.render_to_response(self.get_context_data(form=form))"""
S
Hi everyone, I deployed website on linode. I configured name servers for domain, created a record for domain, and add domain name and ip to allowed hosts, but website available only by ip… this is my first website, and I don’t know what the problem (I configured name servers more than 3 days ago).
1. Add '@' & 'www' record against the ip address of website. 2. Allowed host, add the domain name as well - with www. & without www 3. Restart web server. Check & let us know how it goes