Alexey
gives
where did u add this ?
Orack
REST_FRAMEWORK ={ 'DEFAULT_AUTHENTICATION_CLASSES':(
Orack
in settings
Alexey
'rest_framework.permissions.IsAuthenticated', must be in DEFAULT_PERMISSION_CLASSES
Alexey
and 'rest_framework.authentication.TokenAuthentication in DEFAULT_AUTHENTICATION_CLASSES
Luis
Hi guys! I'm using DJango forms and need to return fields without the "name" param. Any idea ?
Luis
I'm reading source code of "Field" class...
Luis
wait... what? and why?
I'm using MercadoPago (a payment gateway) who process sensible data
cj
I'm using MercadoPago (a payment gateway) who process sensible data
I hope you're not putting that "sensible data" in the templates 🤷🏻‍♂️
Luis
I found a widget_attrs in source code
Luis
May I use these variable to overwrite fields' attributes ?
cj
🤔 I still don't get why you want to do that
Luis
MercadoPago process (via JavaScript) sensible data and gives me a token
Luis
Sensible information is not stored in my servers
Luis
And my backend use these token to process payment
cj
MercadoPago docs :/
https://www.mercadopago.com.mx/developers/en/plugins_sdks/sdks/official/python/ ?
cj
Yep, this is the "backend library"
Django is for backend development 🤷🏻‍♂️
Luis
I won't to store credit card data
cj
never ever
cj
unless... you want to have legal problems 🤷🏻‍♂️
Luis
Hahahaha oooh no
Luis
@c0x6A thanks for your time!
Luis
I'll read your link
cj
I'll read your link
I've found this another one too, IDK if it's gonna be useful for you 🤷🏻‍♂️ https://github.com/WhyNotHugo/django-mercadopago
Luis
Nice!
Luis
Thanks @c0x6A !!
cj
Thanks @c0x6A !!
btw, sorry for eliminating you from the "Copa America" :)
cj
🙂
🇺🇿 Sultonака
Hello guys
🇺🇿 Sultonака
Template has modal popup form
🇺🇿 Sultonака
What way should i use to work with this form without refreshing page?
🇺🇿 Sultonака
Jq form plugin?
🇺🇿 Sultonака
Tastypie lib ?
🇺🇿 Sultonака
?
Anonymous
how auto-fill value in form if data related to that value is in database ??
Anonymous
Mirco
any example ?
there are so many online, you just need to have a search
🇺🇿 Sultonака
Hello guys
🇺🇿 Sultonака
Template has modal popup form
🇺🇿 Sultonака
What way should i use to work with this form without refreshing page?
🇺🇿 Sultonака
Jq form plugin?
🇺🇿 Sultonака
Tastypie lib ?
gamer_boy
django forms not working
gamer_boy
http://dpaste.com/3341T37 -forms
gamer_boy
http://dpaste.com/3SEEE4S -post_edit.html http://dpaste.com/3JBAJ67 -views.py
gamer_boy
someone plz help me
Master
And how this forms should work for you? You just shows them, but not process them
Master
For swapnil
🇺🇿 Sultonака
could anybody help me with my question about popup forms?
Master
For you. You can write js for sending this form information to server, so I am a bit confused with your question
Master
function sendCorrection(event) { event.preventDefault(); form_data = $('#correctionForm').serialize(); $.post('send_correction/', form_data, function(data) { alert("Your submission received"); $('#exampleModal').modal('hide'); }); }
Master
Smth like this
🇺🇿 Sultonака
then i should use rest framework?
🇺🇿 Sultonака
or just jquery form js plugin?
🇺🇿 Sultonака
smth like ajax.form or ajax.submit ?
🇺🇿 Sultonака
what is the best practice about not refreshable processing of django forms?
Master
REST- as you wish. I send this to usual FBV and have no problem. I used simple bootstrap + jquery for this kind of work
Orack
i want to do session authentiication from android app
Orack
how can it be done ? because drf needs an html file to login
Orack
or a token authenticatiion is suggested ?
Muflone
You can have a view with no html response at all
Orack
You can have a view with no html response at all
then again i would need csrf_exempt iguess
Orack
=> no use of using drf
Mirco
i want to do session authentiication from android app
https://www.tutorialspoint.com/android/android_session_management.htm
Muflone
I cannot understand if you want the csrf or not. You can disable per view wherever you don't want it
Muflone
After authentication you are logged on with the user session.
Orack
btw
Orack
finally managed to learn drf