maverick
What we are doing on unit testing?
GK
How can i make django project in which users approved by admin if have link please share 🙏🏻
Yulian
Neeraj
Can anyone tell the best rest api tutorials
maverick
Twice Twisted
Hi, I have Error 404 in safari. Any solution?
Y
Units means?
I think that's a type of test in programming.
Muhammadali
<input type="file" name="file">
Muhammadali
None f = request.FILES('file')
Muhammadali
Who knows what the reason is
Anshuman
How to take each single day between start date and end date in django for report data 0 also
Smile
class FeedBackView(SingleObjectMixin, FormView): template_name = 'single-project.html' model = Project form_class = ReviewForm login_url = '/login' model.get_vote_count # property i have a property function in models.py how do i call it as attribute from view class?
FOR YOU
Hi! I use simple restframework jwt and I faced with problem. I have configured jwt settings in my project, but I don’t understand, how can I set “access token” and “refresh token” to my headers in request. Some code: user=authenticate(…) access_token = AccessToken.for_user(user) but how can i set it in header? Can you help me?
FOR YOU
that part done in your front end side
ohh, okey. But how can I check if the token is valid in each request to different api? This work will be checked by drf/django?
inchidi
ohh, okey. But how can I check if the token is valid in each request to different api? This work will be checked by drf/django?
correct, you should have an endpoint to "verify" token from the package if i recall correctly
inchidi
Who knows what the reason is
uploaded file object handling, meaning that object representing an uploaded file
inchidi
@Alikhan_2209 following group rule number 3 point 5, please change your name
cj
Units means?
that a piece of code does what it has to do in the correct and expected way
inchidi
Property added. i.e. model_object instead model ? Didnt know about it. Will try. Thx
correct, if model=Project then model_object=Project.object.first() as example
Aryan
Hii... Anyone here used 'Django OAuth Toolkit' for OpenID Connect..??
Doragonsureiyā
Hii... Anyone here used 'Django OAuth Toolkit' for OpenID Connect..??
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
Ammulu
Consider the following scenario where we have 3 entities in our system. 1. User 2. Client 3. Project We have the number of users registered in our system. You can use Django’s default admin template to create/register users but not other entities or you can make REST APIs for users as well if you want. You have to perform the following tasks : 1. Register a client 2. Fetch clients info 3. Edit/Delete client info 4. Add new projects for a client and assign users to those projects. 5. Retrieve assigned projects to logged-in users. Things to consider : 1. The system has many users. 2. The system has many clients. 3. A client can have many projects 4. A single project can be assigned to many users.
Doragonsureiyā
Can anyone help me how to write this one
Just read the documentation and do it
Georg
hello. I need to create an index by an expression like field is null. How can I do it?
Georg
null are not involved into index
Georg
or maybe I'm wrong
Georg
if I build an index just like field , do queries like this select * from ... where field is null go through that index ?
Georg
nope. They don't
Georg
so I need to build index by expression field is null
Georg
my god 🤦🏻‍♂️🤣 just Q(field__isnull=True) does the deal
@l!®€z@
Hello friends can I encrypt jwt in Django ... That when I decode her needs to a password
Georg
is there something like "triggers/function creating section" or I should create it in migratoins?
Georg
Are migrations only way to do that?
Georg
you mean perform_create from DRF ?
Hello everyone I customized my logging in settings.py when I run my project with runserver command, logs are OK and customed. But when I run project with docker and run docker compose logs -f my logs are for django default logging, How can I customize my logging in docker logs?
maverick
Facing issue while form testing. I need to test file upload in form section but getting error no file was submitted. Used same code in view based and it was worked
maverick
Open file and use the instance tlas parameter
Frenchie
Hi guys, I am working on a attendance project I want to display the users who got entered late at the office after 10 (or sometime). I have a model of Attendance which has a fn key to User object. The issue is how I can only get those users which came late today.
Дмитро
Hello guys I want start learning django, what you can recommend learn in the first?
Doragonsureiyā
Hello guys I want start learning django, what you can recommend learn in the first?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Frenchie
In the attendance model,you should have a field that records the time the users arrive,and use it to filter the users who arrive past a certain time.
I have a field named clock_in And I have also tried it using clock_inhourgte=10 But it gives me all the entries after the 10 And the attendance is created whenever user gets out of the office for like lunch and other purposes.
Frenchie
So it think I need to get the users first. Entry in the morning Then extract the entries which are later than 10
Rasineni
Hello guys I want start learning django, what you can recommend learn in the first?
Start learning the simple framework first like Flask, Pyramid then come to django
Rasineni
IMHO Flask have the same complexity as django
Django is monolithic whereas Flask is Modular.
Rohan
How is django not modular?
DJHM
There´s a limitations or cons about to deploy using DJango or Flask? I m trying to learn but not sure where to start and if can trust on new projects!
Billy
Django is monolithic whereas Flask is Modular.
it doesn't make django any more difficult to learn
Rasineni
I am saying that starting to learn from scratch is my advice.where each component is independent and needs to be attached. So one can understand basic stuff about what is happening and why
Rasineni
You can learn what ever you want
Frenchie
time = clock_in.strftime('%H') That should give you the hours. Then you can use it to filter. Try and let me know if it helps.
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
Muhammed emin
Hello, I want to list the users with the same id in django rest framework, how can I do it?
so
hi yall! :) I'm doing an excel parser project in Django with pandas and openpyxl. I have an upload view, where user uploads their file and then it gets parsed and saved as a new excel file with highlighted cells, and the user gets redirected to the 'download' page, where it can download the result - and here I'm kinda stuck! I have no idea how to refer to the created excel file from another, download view. Is it possible to somehow assign the created file to a model and then retrieve it as a model parameter? If yes, then how exactly?
Tanner
okay, thanks!
Django-storages makes all that very easy if you haven't sorted the storage part out yet
Harshit
Hello anyone suggest me how i push my api on AWS server
Zerat
Hello anyone suggest me how i push my api on AWS server
set up nginx, guinicorn on you Aws server, use something like git, to clone your code to server
Ganesh
<input type="file" name="file">
<form method="POST" action="" class="form-control;" enctype="multipart/form-data">
Muhammad
why ns error dom bad uri getting ?