Ali
Which part of it?
Views Settings
Ranken
https://t.me/django/185455
This guy's the group's robot???? I had no idea
cj
This guy's the group's robot???? I had no idea
learn how to share code properly... I never asked you to send me a DM
Ranken
learn how to share code properly... I never asked you to send me a DM
The code is on cpanel and I'm chatting with my phone.... So tell me how share code then
Doragonsureiyā
The code is on cpanel and I'm chatting with my phone.... So tell me how share code then
To share code or error tracebacks, use a pasting service, like: - https://linkode.org - https://dpaste.org
Ranken
Ok here's the link to the signing vie https://dpaste.org/S8B8
cj
Ok here's the link to the signing vie https://dpaste.org/S8B8
you're authenticating the user, but you're never login them
cj
¯\_(ツ)_/¯
cj
ah no wait... you're login them... you shared your code in an awful way ¯\_(ツ)_/¯
Ranken
I did log in on line 15
cj
I did log in on line 15
but why are you redirecting in the same line? that's not how Python works
Ranken
I'm not the editor of dpaste doesn't allow me to indent my code that's why
Ranken
https://dpaste.org/zKdh This one is the sign up view
Ranken
https://dpaste.org/zKdh This one is the sign up view
I've setup login redirecting url but still nothing works
cj
I did log in on line 15
are you using login from django.contrib.auth right? or did you write your own function for that?
cj
The code is on cpanel and I'm chatting with my phone.... So tell me how share code then
why don't you use a computer to write code? first do things in localhost and check if everything works there, also you can debug it line by line to catch where the error is ¯\_(ツ)_/¯
Ranken
why don't you use a computer to write code? first do things in localhost and check if everything works there, also you can debug it line by line to catch where the error is ¯\_(ツ)_/¯
That's the thing ...... It built everything and made sure it worked before I uploaded it to cpanel...... Now everything just seems wrong
cj
if so... then why don't you do things in the proper way? don't use cpanel... use docker and a VPS, or if you don't want to use docker at least use a virtual environment in a VPS the way it's meant to be used ¯\_(ツ)_/¯
Ranken
so, does it work in your localhost?
Yes it does.... Perfectly.... It even sends emails in local host after user registration
cj
It's the cost of a cloud or vps hosting plan💁‍♂........ I'd pay for bigger plans when the funds are available
is $2/mo expensive ? ... if it works in your localhost, then I'm sure it's something related on how you deployed your project to that cpanel 💩-thing
cj
In Nigeria?.... Yes it is With the current exchange rate
well bad luck then... but again, if it works in your localhost, then there's some random issue in the server, so don't use it an change to a VPS ¯\_(ツ)_/¯
cj
Okay then
also, use docker or at least a virtual-environment in the proper way
Sudhagar
also, use docker or at least a virtual-environment in the proper way
What is the benefit of using docker or vps in the project bro ?
Ravi
how can i connect the 2 django project with each other.
Ravi
with same login username and password in both
Ravi
in both the project
William
how can i connect the 2 django project with each other.
Using JWT authentication or single sign-on
Wow
Is it worth it to learn docker to containerize django project?
Tanner
Is it worth it to learn docker to containerize django project?
Look up and learn Dokku if you haven’t already - it changed everything for my Devops setup
Ali
Hi i need to overwrite django user to login only whit mobile and 2FA Help me plz? Link on web or source in git 😔
Ali
Hi i need to overwrite django user to login only whit mobile and 2FA Help me plz? Link on web or source in git 😔
Everything should be as usual BUT.. You need to check the platform right when user is trying to log in. You need to overwrite the log_in method and check the platform before logging the user in.
Anonymous
when i was going to install cv2 package this occured
Anonymous
pip install cv2 ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none) ERROR: No matching distribution found for cv2
Anonymous
pip install opencv-python
Ayush
Unknown field (s) (header_image) specified for User
Ayush
Guys please help me
Ayush
Django.core.exceptions.FieldError:
Doragonsureiyā
Django.core.exceptions.FieldError:
To share code or error tracebacks, use a pasting service, like: - https://linkode.org - https://dpaste.org
Ayush
Okay Sir
Maxim
Okay Sir
it was about showing the error in its entirety and hinting at exactly how to do it
Strauss21
I want to take some variables from java script localstorage to a django form how can I do that ?
Anonymous
Or react
Strauss21
thanks I'll try ajax
Ranken
also, use docker or at least a virtual-environment in the proper way
I finally got the code to work .... By changing the order of the if statements..... Somehow that solved my issue..... But now I have another issue with emails..... Emails are setup correctly and do not generate any error..... But I never get to receive any emails🤷‍♂
Cynthia
hello guys
Cynthia
how do I increment a variable in template
Cynthia
{{varible.0}}
Cynthia
{{variable.1}}
Cynthia
instead of doing variable.0 and variable.1
Cynthia
For loop?
yes forloop
RXRX
yes forloop
what do you want to achieve ? maybe you can user {{forloop.counter}} or add it in your variable accordingly
RXRX
use*
Cynthia
what do you want to achieve ? maybe you can user {{forloop.counter}} or add it in your variable accordingly
I have a dictionary which i have looped so I wanted to loop the items in the dict
RXRX
you want +1 in each loop?
Kishor
in login views how to store the username in session
RXRX
request.user
Kishor
in class based views
RXRX
yed
then forloop.counter will work
Kishor
{{varible.0}}
{%for variable in variables%} {{variable}} {%endfor%}
Rahkmanuly
What is the best option? Nginx or Apache?
madswall
Nginx, Traefik
RXRX
whatever suits you
bikrant
I'm using formset to save some data from templates While using {{ formset }} it works fine And saves data however on Using for loop to view forms the data object doesn't gets saved {{ for form in formset }}, form is loading in html as wanted
bikrant
I checked in views the formset.is_valid is getting false value is 2nd case. What could be wrong here
bikrant
formset.management_form was missing In templates which caused validation error 😅
Allamprabhu
I want to create a crud app using Django and DRF. I am confused about the front end, whether I use to call the API or render static files. I am a beginner to Djago.
Anonymous
It's your choice