Charly
why ns error dom bad uri getting ?
You need to explain better whats happening
Tez
I can get the query based on hours My question is that how can i annotate each users attendance query and get its first morning entry time
From what I understand,you want to get the users who got late and any time after 10 is late. What I would do is get the hour the user came in. Here is another way of getting the hour. def late(self): t = strptime(self.clock_in, "%H:%M") return t.hour > 10
Muhammad
when i request django api from react app, i am getting NS_ERROR_DOM_BAD _URI I am using nginx as reverse proxy
Muhammad
in what context ? url spelling is correct and frontend and backend are serving with subdomains of same domain
Charly
in what context ? url spelling is correct and frontend and backend are serving with subdomains of same domain
In the only context possible You may be using a relativa path instead of calling the right URL or something like that
Charly
if you can call taht from the browser or cli then your issue is on your frontend code not django
Rahat
How to implement notification?
Doragonsureiyā
How to implement notification?
To get an answer to your question, it is worth to formulate it more clearly, perhaps add more details, perhaps add explanations.
Muhammad
if you can call taht from the browser or cli then your issue is on your frontend code not django
we have cloudflare implementation on domain, is this causing issue ??
V
Anyone sendme realtime django project
Maxim
Anyone sendme realtime django project
this is not a project sharing group
Hasan
hi why my post_save signal called 6 times per create opject in model?
Hasan
hi why my post_save signal called 6 times per create opject in model?
i solved that when i connect to signal without sender, the signal calls 6 times but i dont know why wrong code : post_save.connect(handle_otp_profile,) the correct code is : post_save.connect(handle_otp_profile, sender=User)
Artur
how i can group by field and get the last element in django orm?
Patrick
how i can group by field and get the last element in django orm?
Model.objects.filter(filtername="filtervalue").last()
 
how i can group by field and get the last element in django orm?
you can get last element with Model.objects.last()
Shrey
If your django application has roles assigned to users, do we have to create multiple forms for displaying particular data for the particular role..... or is there any other way to do this !! For example: there's something that only admin can create, so I want a form to be displayed only when accessed by admin........... Is this approach correct ??? @login_required(login_url="auth_login") def createExchange(request): username = None if (request.user.is_authenticated) and (request.user.is_admin == "True"): user = request.user username = request.user.name if request.method == "POST": form = NewExchangeForm(request.POST) if form.is_valid(): exchange_model.username = username exchange_model.name = form.cleaned_data["name"] exchange_model.type = form.cleaned_data["type"] exchange_model.user = user exchange_model.save() return redirect('createExchange') form = NewExchangeForm()
Az Oz
Hello guys, anyone help pls. I have this code: first_name = request.POST['first_name'] phone_number = request.POST['phone_number'] session_file = request.FILES['session_file'] tg = request.user.all_accs.create(first_name=first_name, phone_number=phone_number, session_file=session_file). But django returned error: session_file multivaluedict err
Az Oz
I tried to send file in session_file model
Frenchie
From what I understand,you want to get the users who got late and any time after 10 is late. What I would do is get the hour the user came in. Here is another way of getting the hour. def late(self): t = strptime(self.clock_in, "%H:%M") return t.hour > 10
But this will get all the clock_in Even when the user get out for lunch time By the way, Thanx alot for your reply and solution.😄 Meanwhile I have got the solution, I need to get the user's first clock_in time(on that day). I used annotate function with a subquery.
Eman
- We know that models.ForeignKey achieves a one-to-many relationship, so if we create a model Song with a foreign key to Album, we'll guarantee that any album instance has 0 or more songs, but we want to enforce a 1-or-more relationship as much as we can, at least on django admin so that any admin can't create an album without first uploading a song, how can this be done? - hint: You'll need to perform custom formset validation - hint: Don't forget to handle the delete case, an admin user shouldn't be able to delete all songs of an album
Eman
how can i do that؟
Rajat
I tried to send file in session_file model
Did you have created multiple form
Doragonsureiyā
how can i do that؟
So, why don't you do it yourself first? When you have an issue with the Python code you wrote (read rule 5️⃣ to show your code), come back here and people will help you. 😉
Maxim
I I asked Google but got nothing
try your luck with Django documentation hint: pay attention to the hints
Eman
Ok thank you
TI Mercado Industrial
Hello, which hosting services do you recommend me for a Django E-Commerce site?
Thalib
ubuntu/Aldrich/myprojectenv/lib/python3.10/site-packages/django/core/management/commands/makemigrations.py:143: RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': SCRAM authentication requires libpq version 10 or above
Thalib
How can i update libq i tried several ways but dont workking.. It occurs when i tried to host my project
Thalib
I have tried to host my django project which using postgres sql as DB. In AWS EC2 by mistake i have got this error when i run my project i have got Operational error SCRAM Authentication requirs libpq version 10 then i have tried many ways to update refferd from google
Almortatha
you have to install django-cors-headers
and set in the setting CORS_ALLOW_ALL_ORIGINS = True
Sukhmanjeet
I saw this syntax in forms.py which says: self.fields['username'].validators.append(ForbiddenUsers) where fields is a tuple with 'username' as one of the elements and ForbiddenUsers is a function raising Validation Error. I am not able to understand from where does validators came from and how can we append a function to it?
PR
How can i set 2 varieble to url? For example: 127.0.0.1/search/?page=2?q=test
Mirco
How can i set 2 varieble to url? For example: 127.0.0.1/search/?page=2?q=test
Pagination is built-in especially if you develop APIs with Django Rest framework For the q, I don't know your context but you don't have to define but just read via request.GET
TI Mercado Industrial
Mirco
No pagination is not specific to APIs nor DRF
I know, he can use Django paginator But I don't know what he's trying to build 😅
Santosh
Hi, i want to display excel file on UI and remove duplicate coloums using django Can any one suggested me
Smile
Hello! I started learning DRF. I have a django project but I can't figure out where to locate the apiview file. Should it be a separate directory? How does the django+drf project structure looks like?
The Inspired
Hello! I started learning DRF. I have a django project but I can't figure out where to locate the apiview file. Should it be a separate directory? How does the django+drf project structure looks like?
The structure is the same as a normal Django project... you place your APIView classes inside the views.py file only, just like a normal django project.
F
Anyone help? Django can work with Oracle database 12.1.0.2?
ask
Hello everyone, I've have a model to save pdf files. After saving pdf files in database how can I get link of that file in fronted. I want if user click on that link able to view that file???
F
Check docs
I found one document. But i need also your opinion. No can do anything?
F
In document said that new version can work only with 19C. Am i right? There are no any other ways?
G Bharath
Hai i want some information on encryption and decryption, in django and flutter
Doragonsureiyā
Hai i want some information on encryption and decryption, in django and flutter
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Mirco
I found one document. But i need also your opinion. No can do anything?
Never used Oracle, that's why I suggested you docs that is the only real source of truth
G Bharath
At backend we are using django And in frontend we are using Flutter.... We are encrypting the data at backend.... But when we are trying to decrypt from flutter we are not able to do.....?
G Bharath
We are using CTR method in AES
G Bharath
Kindly give some genuine info how to solve this issue...
Harshit
In the django admin page... The checkbox to select a particular record is not coming... Can anyone suggest how can I get that functionality?
Kapil
how to render json response in html table ,data comes in dictionary
Kapil
using ajax
Armond
Friends, how are the projects? Do we upload our own Vue and Django backend in a special way to show the customer, for example? It means that it should be on the same local system and let's make it appear on any platform. Phone and..
Mirco
Friends, how are the projects? Do we upload our own Vue and Django backend in a special way to show the customer, for example? It means that it should be on the same local system and let's make it appear on any platform. Phone and..
they are called environments, you can have your local env, then your staging env and the the production env the staging env is an env equals to the prod one when you can have your quality assurance before deploying to prod
Focky
Simple and works like a charm
Shiv chary
Hello everyone, Need help 😅, I completed django basics like forms and models and static files, render HTML pages, links to HTML pages, and what should I want to learn, to become well in django can anyone help me what more topics, I need to cover. Thank you in advance!.
Yury
Hello everyone. I have on the main page three kinds of card (it’s article preview), how can i output records in one cycle in template? It has different css classes and i don’t really understood how i should to do it.
livelysravan
Can python be used as Backend for flutter
Yury
what do you mean by different css classes?
Just three kinds of cards which styled different
The Inspired
are the css applied on some sort of condition?