Roman
Can u give me solution
validators = [validator2,validtor2]
Mindru
Can u give me solution
In serializer You can give to field validators=[first_function_validate,second]
Roman
I don't know If You are asking about it but If you want to access data after serializing object there is drf serializer function to_representation
Okay maybe you could help me If I tell what I need, So I need to write search serializer such as, the input is text like 'Lon' and the output should be first 10 Cities with the name that contains Lon
Tushar
validators = [validator2,validtor2]
Thanks i use and instead of coma
Roman
In serializer You can give to field validators=[first_function_validate,second]
I want to do something like serializer= serializer(data=request.data) retutn serializer.dataSo where do I calcuate it ?
Baggy ️️
Can anyone help me with in-app notifications?
Baggy ️️
Example:if someone replied to comment,the author of the comment should get notification
Baggy ️️
Trying it from one week
Baggy ️️
No progress
Mindru
You can get param first, for example text_to_search = request.qury_param.get(search_variable) And in your model You can filter for example field__contains=text_to_search. Now You can put this data from model to your serializer
Roman
Well I don't need to save it innit ?
Mindru
You can override def create of serializer
Mindru
And there to put your logic
Roman
Hm
Roman
Yeah maybe Ican
Roman
Thanks
CJ
Will 1 gb ram vps server be sufficient for 1000 daily visit Django site ? I didn't find satisfactory answer on google.
CJ
On what?
cj
it would be a different thing if you were talking about concurrency 🤷🏻‍♂
CJ
Okay
snc
i have list of name of object which i want to retrieve from certain class.... which method will be most efficient for django
CJ
It's basically a e commerce type site but for limited people like only for 800-900 people they won't use it daily
Sourav
Can anyone have a good material for django rest apis with GRAPHQL?
cj
Can anyone have a good material for django rest apis with GRAPHQL?
🤔🤔🤔 that doesn't make sense... REST with GRAPHQL?
cj
either you use REST or GRAPHQL... what kind of monstrosity is REST with GRAPHQL?
cj
Sry....rest framework with graphql
what are you talking about? I already told you, you either use REST or GRAPHQL, there's not such that monstrosity you're saying "rest with graphql" come on...
Sourav
Plz if u have something like python with graphql...then provide
cj
REST is one thing GRAPHQL is another totally different thing
Doragonsureiyā
Plz if u have something like python with graphql...then provide
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
Coronado
🤣🤣
leo
should i go to uni or go to bootcamp plus udemy course pls give me ur view on it. i don't know what to do?
Doragonsureiyā
should i go to uni or go to bootcamp plus udemy course pls give me ur view on it. i don't know what to do?
Your question is not related to Django. Please move to @PythonOfftopic group and ask there.
Ghorz
● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2020-06-21 06:17:48 CEST; 19min ago Docs: man:nginx(8) Process: 26937 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 26938 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE) Jun 21 06:17:45 xxxxxxx systemd[1]: Starting A high performance web server and a reverse proxy server... Jun 21 06:17:45 xxxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:46 xxxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:46 xxxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:47 xxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:47 xxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:48 xxxxx nginx[26938]: nginx: [emerg] still could not bind() Jun 21 06:17:48 xxxxx systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Jun 21 06:17:48 xxxxx systemd[1]: nginx.service: Failed with result 'exit-code'. Jun 21 06:17:48 xxxx systemd[1]: Failed to start A high performance web server and a reverse proxy server.
You may have apache2 running. Do not deploy on port 80
A҉l҉i҉
😟
Sobha
Please help me
Sobha
https://stackoverflow.com/questions/62495848/how-set-different-sizes-to-different-products
Ghorz
Hey guys what is Django rest framework and where it is used why it is so popular
REST FRAMEWORK is that that that makes your website so fast and enable a mobile app like Facebook connect to servers. On Instagram or twitter, when you click like button, you observe the like action is executed instantly and no browser reload was required. That is REST API. It allows you app to work with no reload needed.
Ghorz
Which is the best Email sending API in Django? I use API by sendgrid. Can other alternatives?
Build your own mail server if you will send thousands of mail daily. You can get $5/m vps. Install postfix. And you're ready to go. You'll have unlimited mails
Ghorz
● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2020-06-21 06:17:48 CEST; 19min ago Docs: man:nginx(8) Process: 26937 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 26938 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE) Jun 21 06:17:45 xxxxxxx systemd[1]: Starting A high performance web server and a reverse proxy server... Jun 21 06:17:45 xxxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:46 xxxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:46 xxxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:47 xxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:47 xxxxx nginx[26938]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 21 06:17:48 xxxxx nginx[26938]: nginx: [emerg] still could not bind() Jun 21 06:17:48 xxxxx systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Jun 21 06:17:48 xxxxx systemd[1]: nginx.service: Failed with result 'exit-code'. Jun 21 06:17:48 xxxx systemd[1]: Failed to start A high performance web server and a reverse proxy server.
I'll advice you use supervisor and nginx, use port other than 80, 81, 3036, 443
Sparsh
Hello I developed employee management system in django
Sparsh
Now I developing wedding planner portal.
Ghorz
Hello I developed employee management system in django
What are the features and tools you used
Sparsh
Employee can mark attendance and also apply for leave.
Sparsh
Manager of respective employee can approve attendance and leave
Ghorz
Did you use API
Sparsh
No
Ghorz
No
What of JS
Sparsh
Yes
Sparsh
Bootstrap jquery and ajax I used for frontend
Ghorz
How did you use ajax with no api
Ghorz
Try rewriting the app with rest framework
Sparsh
It's call a view and render json data
Sparsh
I want to sell that application.
Ghorz
Because you use JsonResponse
Ghorz
It's pure django api
Sparsh
No I didn't use django rest framework paxkage
Ghorz
I use it a lot for smaller projects, but for bigger ones, I use Rest and React
cj
I want to sell that application.
reading all questions/answers above .. I won't buy that
Sparsh
It's your choice bro.i m not forcing .
Sparsh
reading all questions/answers above .. I won't buy that
Sparsh
Now I developing e-commerce in django
Ghorz
I want to sell that application.
Try focusing on improving your development skills. I promise you, if you write codes for the next 6months you coding patterns will change and everything you learned from tutorial will be ditched
cj
It's your choice bro.i m not forcing .
it looks like you don't even know what you made 🤷🏻‍♂🤷🏻‍♂🤷🏻‍♂