Anonymous
User2(real) comes and signup with his details
cj
But i cant show wrong data to the acrual user after login
then your first step should be confirming the email, before asking for names and other data
Anonymous
User3(fake) comes and signup with fake data
Anonymous
THEN actual user confirms
Anonymous
Registration flow is already decided
inchidi
THEN actual user confirms
he wont able to confirm since the link expired
cj
why not: user_fake: wants to register with email of user_real * can't confirm because can't access inbox user_real: wants to register with his email * can confirm user_real: continues registration process, fills all his data, and be happy
Anonymous
It expires after 24 hours
cj
Registration flow is already decided
then you will have to make littles changes to make it better 🤷🏻‍♂️
cj
Actually this is right if i keep all users data. But @Inchidi is suggesting against it
just don't keep anyone's data until the email is confirmed
Anonymous
I have to keep the data
Anonymous
Cant go around it
cj
I have to keep the data
you don't if the email is not confirmed 🤷🏻‍♂️
cj
Cant go around it
is your project ready in production yet?
Anonymous
Design is ready
cj
Design is ready
things can be changed to make them better 🤷🏻‍♂️
Anonymous
Yeah
cj
so go, make changes and have a better registration flow
Anonymous
Anonymous
Okay
Anonymous
Have to discuss this with team
inchidi
Actually this is right if i keep all users data. But @Inchidi is suggesting against it
actually am not against it, its up to you. but yes am sugesting you to not storing *all* unverified user data
inchidi
1 latest is enough
inchidi
dont save/create before check it
Anjani Bond for example your models are Person with fk to Group : group_obj=Group(name="1st group") # do something if not error: group_obj.save()
Anjani
👍
Rajjix
ur too late to the party 🎉
Andrii
guys, have a problem with deploying on my server all the time get an 403 error with csrf tokens even if form is very simple, even when I write csrf_extemp for request, it is requering this fucking token
Andrii
any ideas?
Andrii
even google can’t help me
Anonymous
Which proxy server are you using?
Andrii
yes!
Andrii
nginx
Andrii
and gunicorn
Andrii
I am not new in django to make some kind of stupid easy mistake
Andrii
I mean this
Andrii
are you including {% csrf_token %} inside the <form> in your template?
Andrii
but I really haven’t any ideas
cj
I have many projects running with nginx+gunicorn, and I don't have 403 errors 🤔 how is you nginx configuration? can you show it?
Andrii
I think smthing is wrong here
Andrii
I don’t have ssl
Andrii
but it should work even without it
Anonymous
Uncomment proxy_set_header host line
Anonymous
I had this same problem once
Anonymous
Uncomment proxy_set_header host line
This should solve this @orlan0045
Andrii
will try now
Andrii
still nothing
Anonymous
Did you restart nginx?
Andrii
ok, I am sure it’s config
Andrii
yes
Anders (izzno / gooood) 🇳🇴
Is there a way to have a hierchi in a model, meaning you are presented with choices depending on your choices.
Anonymous
Show the nginx config again @orlan0045
Anonymous
Uncomment proxy_pass_header server line too
Andrii
nothing again
Andrii
wait
Andrii
sudo systemctl restart nginx
Andrii
is it ok?
Anonymous
Yes
Andrii
so nothing
Anonymous
Are you able to login in django admin panel?
Andrii
will try now
Rajjix
man have you tried using httpie to send a get request then a post request, i don’t think it’s nginx trouble u have there. and try another request from the server ur deploying on, i think ur problem is cors
Rajjix
check ur console if ur using a browser it should give more explanation than just 403 Forbidden
Andrii
yes, I can login into admin
Anonymous
Then there is other issue than nginx
Andrii
ok, I will google one more time but don’t undestand what a fuck is it
Anonymous
Yeah try inspecting console
Anonymous
Cors errors can be found there
Andrii
thanks, guys!
Bahadır
Hi, can you do artificial intelligence project on Django
Bahadır
Are there sample projects
Bahadır
artificial intelligence projects web-based I want to see a sample document for this is in your hand
cj
basically what you will make is a front-end (call it client if you want) using Django, for you AI python code