Promiscuous Ferris
In views?!
yes. that's generally where you process the incoming requests.
Mahdi
Can i send you message in pv?!
Promiscuous Ferris
And you mean that my data deserialized at end?!
that's about naming your variables. you can do that later. that was a side note. let's focus on the current problem first
Promiscuous Ferris
Can i send you message in pv?!
I'm sorry but that would be a no.
Mahdi
Oh ok so never mind
Promiscuous Ferris
What should i put here?!
you should ignore those parts. that was a mere example. replace this return HttpResponse("data not valid") with this return HttpResponse(data_serializer.errors.__str__())
Mahdi
Ok thanks i will try this too
Promiscuous Ferris
then you check the errors on the CLIENT side
Muflone
Python 3.6 was available on venv
venvs don't change python versions Where you got that 3.11 version?
彡ɾεʓɑ彡
venvs don't change python versions Where you got that 3.11 version?
I do not know When building a new project from Django Several versions of Python were installed in the drawer, and I tested version 3.6 and it was correct
M. Hossein
I have created a exception handler in DRF but django related exceptions are not caught. What should i do?
彡ɾεʓɑ彡
pycharm Python 3.6.13
Muflone
pycharm Python 3.6.13
Then that python 3.11 was installed by you
Muflone
Use the version 3.6 which should have all the libraries provided by your OS
Alex
https://ibb.co/L04BLRV
Alex
https://ibb.co/L04BLRV
from this you can see i can get the id token but i don't know why the token can't be passed to a views whwat could be the issue
Alex
path('gettoken/', views.gettoken, name="gettoken" ), path('getidtoken/', TemplateView.as_view(template_name='sendidtoken.html')),
Alex
that ia my path
Alex
what is the issue here someone to help
Masta
Hello Django friends. Has anyone already implemented social authentication using DRF and Djoser? If yes how did you achieve it ? I am asking this question because while implementing it in one of my projects on my local machine I am getting this error: "non_field_errors": ["State could not be found in server-side session data."] The error occurs when I try to login using google (Google OAuth2). I searched for a solution online for several days but no clear answer. In fact on the github page of Djoser this very question regarding the error above is not answered. Any clue on how to make it work ? I am currently trying the dj-rest-auth package but I just want to know if it is possible to fix that error from djoser. Thanks and have a good celebration.
Victor
Why do you want to do that?
I want a system that can be run as a software to be installed or what do u recommend
Khaled
I want a system that can be run as a software to be installed or what do u recommend
you can write a script for config the project and run the server this script will be exe file
HBS
How to deploy a project in server
Charly
How to deploy a project in server
Depends on the server, you can start by doing some google research
🎉🅹🅰️🅻🅾️🅻🅸🅳🅳🅸🅽🎉
i get username and password1 and password2 and email from webpage, then how can i get register user with it
Roy
Hey guys can anyone suggest me any Django hosting platform for hosting django applications at cheap price
Anonymous
5$ per month for 1 server
Shubham Choudhary
Shubham Choudhary
Roy
5$ per month for 1 server
It's costly brother but thanks for the suggestion
🤲🙏🤲
hi can any one please help me with the installation and set up of django in virtual environment
Believe
Just create an virtual env and activate it and install Django in it
Rasoul
hi can any one please help me with the installation and set up of django in virtual environment
For starters you could use virtualenv with django as you would with any other libraries. Later on you can start using tools like poetry to better manage your dependencies and stuff like that. For settings you could also create a .env file and define the env vars in it.
.
html file {% for message in messages %} <div class="alert alert-{{ message.level }}" role="alert"> {{ message }} </div> {% endfor %} views.py def logout_user(request): logout(request) messages.add_message(request, messages.INFO, 'Вы вышли из системы') return redirect('login', permanent=True) how do i make message use msg level given in views?
Isa
How does django find tables with one to many connections? For example I have Parent and child table. I have in child FK to parent. When I do something like this p = Patent().objects.get(pk=1) children = p.child_set.all() How Django knows where find Child table? And that he should be looking for this table
Nana
Hello Guys, how do I find a tutorials on web sockets?
🎉🅹🅰️🅻🅾️🅻🅸🅳🅳🅸🅽🎉
how to make view using model whith data which was taken in template
ERMIA
Hello Guys, how do I find a tutorials on web sockets?
There are dozens of channels guide on youtube When learning fundamental never use gpt it's mostly confusing and suggest you to use depricated methods which ends up screwing you mindset
🎉🅹🅰️🅻🅾️🅻🅸🅳🅳🅸🅽🎉
Nana
what is it
Django web sockets
🎉🅹🅰️🅻🅾️🅻🅸🅳🅳🅸🅽🎉
Django web sockets
Oh ,iʼm not aware of that
Vaibhav
Django stores fk and reverse names in somewhere in memory?
Fks in db and reverse name just in it's States
ERMIA
Oh ok Thanks Please I will be glad if you post links to those channels
You can find many in youtube in almost every language But best guide is docs
🎉🅹🅰️🅻🅾️🅻🅸🅳🅳🅸🅽🎉
what are web sockets
Doragonsureiyā
what are web sockets
These single steps will help you a lot: Step 1️⃣: Open a browser Step 2️⃣: Write down https://google.com or https://duck.com and press Enter Step 3️⃣: In the search box, write down the same words you asked here Step 4️⃣: Read the first results
J G
You can try using a check for logged in user's group like superuser or admin... to customise validation on different user login
Newton
Is it possible to change django custom user parameters Like First Name Last Name Username Email Then Additional parameters like Address Gender Age Contact number It should add to django default admin
Newton
I tried to follow but then it created seperate model instead of making change in exiting django user model
Muflone
I tried to follow but then it created seperate model instead of making change in exiting django user model
You'll create a new user model and use that one The original model won't exist at all
Newton
After cratering one seperate app of student and declared model all parameters When I login as admin I found Groups Users and then Students
Muflone
After cratering one seperate app of student and declared model all parameters When I login as admin I found Groups Users and then Students
When you define a new user model and setup it in settings you won't have the original Users model Just make sure to setup the model before running the migrations
Newton
Any already exiting resources in internet to search
Newton
https://pastebin.com/SSd1hCth
Newton
Here is my model.py
Muflone
Any already exiting resources in internet to search
The official documentation explains Have you set the new model in settings?
Newton
Yes then issue start in migration and login
Muflone
Yes then issue start in migration and login
What you set in settings then?
Newton
Customeruser model
Muflone
Customeruser model
What exactly?
Newton
AUTH_USER_MODEL = 'signup.CustomUser'
Muflone
Have you set it before running migrate ?
Anonymous
Do we really need to learn forms if we are learning postgreasql... Like sqlite and postgreasql are different so learning sqlite could it make sense
Anonymous
i dont think so
So what do you suggest
Anonymous
I mean I'm a student and so for a django developer what will be important topics to handle
Muflone