Anonymous
how can we use rest api on django template ??
Ynwa
Hello to everyone, have difficulties to make an ajax call to the server picking values from drop down dependent filters, which are forming my list views base on DRF. Can you recommend me something?
iiiiiiπoW
Hi.. I am writing Rest api .. I am using python 3.6.8 Django, Django rest framework When an api is called, i want to execute mulitiprocess Because i want to give the respons without time dalay I want to write an insert query inside the function and use multiprocess Here is my code But its not working def proces_add(request): emp=Employee.objects.get(EmployeeId=request.data.get("Emp")) result = { 'Status': success, 'Message': 'process called', 'Employee': emp.EmployeeId } p = Process(target=proce_new, args=(emp.EmployeeId,)) p.start() return Response(result, status=status.HTTP_200_OK) def proce_new(emp): try: device = Device.objects.all() for val in device: div = val.Device.DeviceCode sync = Synchronization( Device=div, SyncType=1 ) sync.save() except Exception as ex: logging.getLogger("error_logger").exception(repr(ex)) Could you please look this.. I am really stuked. I need hlp https://pastebin.com/cr0P2Faa
Александр
to display the value instead of pk, use SlugRelatedField with the value read_only=True, but then you can't write the value with these tags, how do I do it? Hi everyone)
Yuri
Does anyone here knows how to include path params on DRF's router?
Yuri
router = SimpleRouter() router.register('{cod_ibge}/{date}', views.HolidaysViewSet, basename='holidays') urlpatterns = router.urls
Yuri
I'm trying this way but the path isn't found at my browser
Isaías
I used abstract user but asked for the password reset functionality in the django manager in the model user. This is normal? Is there a way to recover this?
Александр
Trying to write my first test, Django Rest Api doesn't see the app url, only the project url, how do I fix it?
Александр
django.urls.exceptions.NoReverseMatch: Reverse for 'api/dish' not found. 'api/dish' is not a valid view function or pattern name.
Александр
I'm trying to test my app, but I can't pass the app url in response = self. client.get(reverse('....')), APITestCase sees the project url, but not the url of the app I want to test
Александр
sorry for my english)
Александр
solved)
Rajesh
sorry for my english)
no worries even my english also same like that
Shery
Hi everybody, i need help with this: I got a Custom AbstractBaseUser (called "User") in my "profiles.models" app. I want move that app to a folder called "apps" with the rest of them, but when I try to change set AUTH_USER_MODEL = apps.profiles.User at settings.py it return: 'apps.profiles.User'. String model references must be of the form 'app_label.ModelName'. How I can set AUTH_USER_MODEL and keep the folder tree?
Tar
Where is recommended to save constants in Django? If in settings.py I prefer not The constants are for the app/s and not a configuration variable
Shery
that's a good question too. I save them in another folder with a few py files, like tokens and stuff, but sometimes it turn into a mess...
Tar
That is what thought to do , like I'm doing in general Python project
Cheap
you can store in virtual env
kancharla
Can u guys suggest best tutorial for learning Rest framework
Modi
Guy I conduct session for live Hanson project . If you don't get book understanding I can help out with live trainings
Jesus
Hi, I was wondering what technique Django used to load models into the admin panel. I know its using the admin.py and admin.site.register(Model) but my question is how can I achieve this creating my own one, what's this python technique called?
Anonymous
Is there any way we can merge different models of django and access it with one URL?
Ganesh
Hey , can anyone suggest some Django project topics that i can do as final year project..
Mimi Khalid
Hi guys, Im Mimi and I'm new here. I am currently developing system that used django-viewflow pro as the engine for workflow. Does anybody here familiar with django viewflow? I need some help 😄
Loki
Hello guys i am unable to upload pictures in Django through form pls help
Loki
@mimikhalid Aditya
Loki
Madhura
Anonymous
Did you configure media root
Loki
Yes
Loki
Did you configure media root
I am able to upload or update blog posts picture but not profile picture
Anonymous
Did you ass media root in urls.py?
Aditya
I'm sorry, I'm aware.
Anonymous
Can you ping me the code
Loki
Yes sure
Loki
Actually i am new to Django
Anonymous
Direct message me
Loki
Ohh sorry i wasn't aware of it
iiiiiiπoW
I am new to django and the django bacjground tasks package I am facing an issue that i couldn't do/start background task unless i forcefully run the command process_task , that is python manage.py process_tasks. I want to do/start background task with out the process_tasks command.. Is it possible ?
deadspy
I need A Help To Create a Chat bot! PLease...
Mr
I need A Help To Create a Chat bot! PLease...
There are videos in youTube which guide u through
Doragonsureiyā
I need A Help To Create a Chat bot! PLease...
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 firsts results
---
Can we directly record the Location of the client while submitting the form ?
Anonymous
Djangoni endi boshlayman maslahat kerak
Rajesh
Cam anyone help me to solve my problem? On my django project email didn't sent to preceding mail id. Can some one help me?
Aditya
Is there any way we can merge different models of django and access it with one URL?
URL are not model dependent, Views are. You can import both models together and access relevant objects together.. but might need to read/filter/save both models seperately
Tush
Can anybody tell me why my terminal give me this after running local server "GET /HTTP/1.1" 200 16351 "GET /Static /admin/css/fonts.css HTTP/1.1" 200 423
Tush
And many more line
Manav
Can anyone suggest resources to learn django?
Loki
Udemy
Loki
And Django documention
Manav
Udemy
Thanks👍
Rohan
RelatedObjectDoesNotExist at /profile/ User has no profile , i wrote signals correctly but facing the same error.Did anyone faced this kind of error?
Rohan
Wrote signals such that user is given a default profile pic, but facing this error
Ganesh
Why the djano forms is not validating
Ganesh
After doing validation also form is not validating
Roman
Hi, where do I add modelValidation after I have all fields, ovveride save ??
Ganesh
It's not throwing error but it is not validating
Tush
Hello
Tush
Can anyone tell me
Tush
How to solve osError
Tush
Please reply
Ganesh
How to solve osError
I think by import
SkyLord
hello I'm trying to test SENDGRID I created a new project + application in settings.py I added: ============================ DEFAULT_FROM_EMAIL = '***************' #sendgrig email EMAIL_HOST = 'smtp.sendgrid.net' EMAIL_PORT = 587 EMAIL_USE_TLS = True EMAIL_HOST_USER = 'Apply' EMAIL_HOST_PASSWORD = '*************' ============================ when accessing: sent_mail = send_mail ( subject, txt_, FROM_EMAIL, recipient_list, html_message = html_, fail_silently = False, ) get error: TimeoutError: [WinError 10060] can anyone help me ????
SkyLord
im working from localhost
Andrej
This is working for me: # MAIL # ------------------------------------------------------------------------------ DEFAULT_FROM_EMAIL = 'webmaster.dev@sms-api-gateway.com' EMAIL_USE_TLS = False EMAIL_HOST = 'mail1.domain.com' EMAIL_PORT = 25 # SMTP port 587 EMAIL_HOST_USER = 'webmaster@sms-api-gateway.com' EMAIL_HOST_PASSWORD = '*******' EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' SERVER_EMAIL = 'webmaster.dev@sms-api-gateway.com'
Andrej
When it's not working, you should find out the authentication method from your e-mail provider