Mirco
i thought about jwt and token but how to save it in the client side?
Don't save them into local storage or session storage obviously
Mirco
i thought about jwt and token but how to save it in the client side?
https://www.valentinog.com/blog/oauth2/ Can help u
Aneesh
How to upload arry of urls in one column usig xlsxwritter
Mirco
Doragonsureiyā
tysm :)
You're welcome! 😊
Mahesh
Hi I am getting error in authenticate method even username and password both are correct. Code: user = authenticate(username=username, password=password) I have also added the following in the settings.py file AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', ) Please assist me on this
Sumit
Hi Everyone, I want to make online python editor in django. Please help me.
Mahesh
authenticate methods return none
Mirco
authenticate methods return none
r u sure u'r passing the correct credentials ?
Mahesh
Yes
Mahesh
I have cross verified it with backed
Mahesh
I am really frustrating with this issue
Mahesh
r u sure u'r passing the correct credentials ?
And I don't know what happened when I am going to register new user that time authenticate method works fine.
Mirco
And I don't know what happened when I am going to register new user that time authenticate method works fine.
it's something stupid you cannot find atm, so the secret is always to take a break and come back to the issue in a while
Artyom
https://stackoverflow.com/questions/64350886/generation-checks who can give me answer ?
Commodity
Hjk
I am not able to store primary keys in another table foreign key column
Hjk
I hve to give default =1
Hjk
Then every value become 1
Hjk
How can i store primary keys to another table in foreign key column
Hjk
Plz help me
Hjk
I am not able to find the solution..
Pradyum
https://stackoverflow.com/q/64355403/7999665 Please look into this
sp
anyone here to help me with django?
sp
url redirecting not working properly
Bunty chhatri wala..
sp
code
R.U.S.H.A.B.H
How to print list in tables on html templates...with jinja format??
Herman
Hello everyone please i want that user upload image in Their computer in my simple app . For this problem ,i am using imagefield in django when user submit form , django reset choose file to empty and said that field is required Please need help please
The mint of Linux **
hey , i have tried the stack overflow code on how to upload multiple images in django ... but it is not working , i have tried to fix some issue in it but failed ... so can anyone help me out ??
The mint of Linux **
hi
Tridip
Hello guys, I Have one doubt. Suppose I need to take an input from rest api. After taking that input, I need to POST that to another URL. How to do that in Rest Api??
Anonymous
does anyone has Mosh hamedani's django course?
Tridip
Use python's request library
Can you elaborate it please?
Omair
Can you elaborate it please?
There are many good articles on how to send a POST request with python using the request library. You need to then write your implementation in the current django Rest view.
pythonista
Guys i need a idea. I want to implement a product type to my models. But i can do that with model choices. But I cant add new option for choices. For eg. Mobile is a electonic type of product. I want the user to add more types like clothes, etc. Do I need to create a new model. I just need idea how i can do. Can someone please explain?
Omair
Can you elaborate on what you are trying to achieve.
If you are taking input through your end point and then POST(ing) that input to another URL you can just do so via the request library. The request you will make to the "other URL" will return a response object with the status code and probably some other metadata depending upon how the "other URL" is implemented. If this request fails you can simply return it's status code in your own response for the user that is interacting with your rest api endpoint.
Tridip
Can you elaborate on what you are trying to achieve.
Suppose there is a URL /login. There I need to enter my phone number. After entering the phone number, it will save a user into the database with Its phone number as the primary key. Then after entering the phone number , it will ask for one Otp( in the backend I will randomly generate a otp and save in the otp model in the database where the foreign key is the phone number). Then I need to enter the otp where it was prompt, and after entering it will match with the recent record. If it match, it will return a success message or a failure one
HaClyLo
SMTPAuthenticationError at /authentication/reset_password/ (534, b'5.7.9 Please log in with your web browser and then try again. Learn more at\n5.7.9 https://support.google.com/mail/?p=WebLoginRequired z142sm101998pfc.179 - gsmtp')
HaClyLo
Help!
HaClyLo
sending emails
Anonymous
In my django chat channels I'm getting same username and userid in 2 different windows (using 2 different logins). Can anyone help me in this?
Omair
Suppose there is a URL /login. There I need to enter my phone number. After entering the phone number, it will save a user into the database with Its phone number as the primary key. Then after entering the phone number , it will ask for one Otp( in the backend I will randomly generate a otp and save in the otp model in the database where the foreign key is the phone number). Then I need to enter the otp where it was prompt, and after entering it will match with the recent record. If it match, it will return a success message or a failure one
See here the task of redirection will be handled from your front end rather than your backend. What you can do here is generate a unique token and return it in the response object from your login endpoint to your front end. If the status code from you login endpoint is 200 the frontend will then send a request to the new URL with the unique token appended to it where you need enter your otp.
Omair
You mean JWT type??
Yeah JWT will do
Omair
Guys i need a idea. I want to implement a product type to my models. But i can do that with model choices. But I cant add new option for choices. For eg. Mobile is a electonic type of product. I want the user to add more types like clothes, etc. Do I need to create a new model. I just need idea how i can do. Can someone please explain?
Yup you will need a new model that will store the product type and you need to add it as a foreign key relation in the product table. Also please try to clear your doubts on this group only DM's without asking are not cool.
Javad
def cart_add(request, product_id): cart = Cart(request) product = get_object_or_404(Product, id=product_id) form = CartAddProductForm(request.POST) if form.is_valid(): cd = form.cleaned_data cart.add(product=product, quantity=cd['quantity'], update_quantity=cd['update']) return redirect('cart_add')
Javad
how to redirect it to the same page not to the cart?
Javad
def cart_add(request, product_id): cart = Cart(request) product = get_object_or_404(Product, id=product_id) form = CartAddProductForm(request.POST) if form.is_valid(): cd = form.cleaned_data cart.add(product=product, quantity=cd['quantity'], update_quantity=cd['update']) return redirect('cart_detail')
Doragonsureiyā
Anand
HEY there I need algo of news and blog web service using python with Django and machine learning, If anybody of U send me that it will be great help🙂
Abrar
https://www.reddit.com/r/django/comments/jajqj6/alternative_to_captcha_verification/
Anonymous
Is Django best for a big ecommerce website?
cj
Is Django best for a big ecommerce website?
you'd better want to use Odoo instead of Django for that kind of sites
cj
what is the main difference?
Odoo is a ready to use ERP, so you will find many already built modules for an e-commerce site, and Django is a web framework so you'll have to built everything by hand
cj
What about Laravel?
we are talking about Python here, not PHP
cj
you should avoid whatever things that are done in PHP
Sai
Django has more opportunities...
Manish
Set table name is same to model .. no prefix.. and no postfix.. Model name and table must be same.. Pls give me solution.
Sai
You can use db_table