Alok
Can anyone help me in fixing this issue.
When I removed the cookies it's showing type error how to fix this.
Doragonsureiyā
sayanth
Anyone know how to make django project to approve/reject user based on their details by admin
sayanth
And update the status
Axror
hi guys. I have a #question. How can I use django-dajax framework. have you got any helpful resource
Naeemur
Plz can anyone explain how much important to sql or mysql for django.. i don't know sql can i start learning django or first learn sql and then go django .. what is the best roadmap to know proper djano.. plz if any expert ans this question
Muhammed
VISHNU
How to convert to PDF by whatever id's given in frontend.
Doragonsureiyā
SOSO
Hi
guys i need help
i have three table 1)pharmacyResult(where i have number of employee and some date)
2) PharmacyEmployee(where i have employee)
3) Pharmacy employee result(where i need do some logic and paste employee where employee need to work min 3 hours)
pharmacies = PharmacyResult.objects.all()
when i do for loop
for ph in pharmacies:
pharmacy_employees = PharmacyEmployee.objects.all().filter(pharmacy=ph.pharmacy, date=ph.date)
for employee in pharmacy_employees[0, ph.number_of_employees]:
if employee.employee.workinghours <= 3:
pharmacy_employee = PharmacyEmployeeResult.objects.create(date=ph.date,
hour_from=ph.hour_from,
hour_to=ph.hour_to,
employee=employee.employee,
pharmacy=employee.pharmacy
)
pharmacy_employee.save()
employee.employee.workinghours += 1
how can i put one employee three times to the other ph?
Siddharth
How to solve improperly configured django.core.exceptions.ImproperlyConfigured error
SOSO
Hi
guys i need help
i have three table 1)pharmacyResult(where i have number of employee and some date)
2) PharmacyEmployee(where i have employee)
3) Pharmacy employee result(where i need do some logic and paste employee where employee need to work min 3 hours)
pharmacies = PharmacyResult.objects.all()
when i do for loop
for ph in pharmacies:
pharmacy_employees = PharmacyEmployee.objects.all().filter(pharmacy=ph.pharmacy, date=ph.date)
for employee in pharmacy_employees[0, ph.number_of_employees]:
if employee.employee.workinghours <= 3:
pharmacy_employee = PharmacyEmployeeResult.objects.create(date=ph.date,
hour_from=ph.hour_from,
hour_to=ph.hour_to,
employee=employee.employee,
pharmacy=employee.pharmacy
)
pharmacy_employee.save()
employee.employee.workinghours += 1
how can i put one employee three times to the other ph?
I have a table (results for each pharmacy) and a table (pharmacists for each pharmacy) and when I go over the table (results for each pharmacy) by forloop inside it I go over the table (pharmacists) and set the conditions: if the pharmacist is the manager, then first I put it on and the working hours for it must be at least 3 hours, that is, for each hour I must continuously set this pharmacist
An example of my final table:
{
"id": 271,
"pharmacy": {
"id": 7,
"city": "Shymkent",
"working_time_from": "2021-07-15T10:00:00Z",
"working_time_to": "2021-07-15T22:00:00Z",
"number": "99"
},
"employee": {
"id": 1,
"code": "EU-99035",
"name": «Санжаров** Муратжановна",
"type": 2,
"workinghours": 3
},
"date": "2021-07-15",
"hour_from": "2021-07-08T10:00:00Z",
"hour_to": "2021-07-08T11:00:00Z"
},
{
"id": 282,
"pharmacy": {
"id": 7,
"city": "Shymkent",
"working_time_from": "2021-07-15T10:00:00Z",
"working_time_to": "2021-07-15T22:00:00Z",
"number": "99"
},
"employee": {
"id": 1,
"code": "EU-999035",
"name": «Санжаров** Муратжановна",
"type": 2,
"workinghours": 3
},
"date": "2021-07-15",
"hour_from": "2021-07-08T11:00:00Z",
"hour_to": "2021-07-08T12:00:00Z"
},
$ A C H ! N
*Create a Django application for the following problem statement*
1. Product listing page which lists all the products available in the database. List their name and quantity.
2. Product detail page where details of a product is displayed. Details are:- Name, Quantity, Image of the product.
3. Registration Page, User should register before accessing detail page or listing page. User Registration details: - email, phone
number, username, full name & password.
4. Login functionality with session management. Please add 10 products, 3 users. Create a virtual environment for the application to
freeze the requirements of the application and provide the github link of the repo in the mail.
-Extra points for good UI
$ A C H ! N
Anand
hey
how to show admin user's online status , when i logged in
it should need to show true when i logged it need to show false
Anand
i simply did this , but unfortunately it is not working with my angular front end
class adminloginstatuscode(APIView):
permission_classes = [AllowAny]
def get(self,request):
if request.user.is_staff:
return Response({"online_status":True})
else:
return Response({"online_status":False})
Anand
can anyone help me to figure this out
Anonymous
Anshu
kuzmich
kuzmich
Sherlock
Anand
Sherlock
Rocky
Is python Django fresher getting interview calls
Rocky
Is there anyone Working on Django now
Anonymous
$ A C H ! N
*Create a Django application for the following problem statement*
1. Product listing page which lists all the products available in the database. List their name and quantity.
2. Product detail page where details of a product is displayed. Details are:- Name, Quantity, Image of the product.
3. Registration Page, User should register before accessing detail page or listing page. User Registration details: - email, phone
number, username, full name & password.
4. Login functionality with session management. Please add 10 products, 3 users. Create a virtual environment for the application to
freeze the requirements of the application and provide the github link of the repo in the mail.
-Extra points for good UI
Mirco
Doragonsureiyā
tushar
hlo everyone i want to update multiple data on one click prime key's of that data ischeck_value= ['3','4','5'] in that format how i
tushar
AceT0ne
https://github.com/sarthakpant772/college_back can someone see why in alumni page its not fetching picture form backend it is able to save it but its not getting displayed
Anonymous
function get_absolute_url not working in templates. Help me
منتظر
why I get None
when I use "authenticate"
with a user
except when I "authenticate"
a SuperUser
it's return it correctly
منتظر
even if I set
user.is_active = True
I am still getting 'None'
Anonymous
How to connect django to mysql
Doragonsureiyā
How to connect django to mysql
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
Ola
😂😂😂
Anonymous
https://pastebin.com/BFj23gf8
Help Me. No Working {{ product.get_absolute_url }}
Mirco
coder
Hello; got error this is update method; is it any wrong of code? def update(self, instance, validated_data,pk=None):
print("Hello")
instance=Consumer.objects.get(id=pk)
newspaper_list = validated_data.pop('newspaper_of')
instance.name = validated_data.get('name', instance.name)
instance.ac_no = validated_data.get('ac_no', instance.ac_no)
instance.address = validated_data.get('address', instance.address)
instance.telephone = validated_data.get('telephone', instance.telephone)
instance.email = validated_data.get('email', instance.email)
instance.note = validated_data.get('note', instance.note)
instance.delivary_charge = validated_data.get('delivary_charge', instance.delivary_charge)
instance.status = validated_data.get('status', instance.status)
add_list = []
for list in newspaper_list:
list = Newspaper.object.get(newspaper=list["newspaper"])
add_list.append(list)
pass
instance.newspaper_of =add_list
instance.save()
print(instance, "List of items")
return instance
coder
Hello; got error this is update method; is it any wrong of code? def update(self, instance, validated_data,pk=None):
print("Hello")
instance=Consumer.objects.get(id=pk)
newspaper_list = validated_data.pop('newspaper_of')
instance.name = validated_data.get('name', instance.name)
instance.ac_no = validated_data.get('ac_no', instance.ac_no)
instance.address = validated_data.get('address', instance.address)
instance.telephone = validated_data.get('telephone', instance.telephone)
instance.email = validated_data.get('email', instance.email)
instance.note = validated_data.get('note', instance.note)
instance.delivary_charge = validated_data.get('delivary_charge', instance.delivary_charge)
instance.status = validated_data.get('status', instance.status)
add_list = []
for list in newspaper_list:
list = Newspaper.object.get(newspaper=list["newspaper"])
add_list.append(list)
pass
instance.newspaper_of =add_list
instance.save()
print(instance, "List of items")
return instance
response = handler(request, *args, **kwargs)
TypeError: update() got an unexpected keyword argument 'pk'
Mirco
Anonymous
I can't go to the product description
Manish
How can I use Database Pooling in django with MySQL database.??
Have any idea..
Anonymous
outputs correctly. But does not work on the site where the product card
Anonymous
I just display it in the template - it is displayed. I write in href - does not work
Deleted
Hey, guys, pls help, pagination failed: https://stackoverflow.com/questions/68545607/table-only-shows-the-first-page-in-django-pagination
Karthick
I am working with form.py and views.py while uploading a form get any errors means I want send that error message to another page
Karthick
Yes in that page I have show the error message
Karthick
Even same page also okay
Karthick
I am using validator in models it just sit I don't how shot that in front end
Sherlock
noob here:-
is django rest framework and restful api mean the same thing?🙏🙏
Sherlock
Mirco
Sherlock
dคv¡d
I need help: i want the form the same to user permission form... How can i get it?
Sherlock
Mirco
dคv¡d
How can i get user id from admin Authentication to models ???
Anonymous
Kevyn
you can get user information from request.user
dคv¡d
Kevyn
try request.user.id
Nana
Hi every one. Please how to authenticate with google, using django+angular ?
Kevyn
you can see that tutorial and adapt it
CY
Is it possible to combine AI with Django?
Rahkmanuly
Rahkmanuly
But do not have an experience with this
Rahkmanuly
You can read about transfer learning