Sipdripkillswitch
u code in test server
Sipdripkillswitch
if it works gud u merge it with prod
Tamim
Hello guy I need something like ckeditor that I can add mathematics questions through django admin.
MICKEY
I have to make a quiz website with live users count . Is there anyone to help?
old
Hello guys I'm getting pylint(import-error) even after installing pylint help me guys
~
hey guys, how can i specify a schema inside a queryset? I would like to specify the schema if I don't do that it always creates the data in the public schema and I don't want it.
Abdul Shakoor
how do i authenticate users (whom are using apps to access my website) without using RESTFULL API?
Abdul Shakoor
I have a website which has a restricted content (only authenticated users can access it) so my question is how I can mobile apps access it without using RESTFULL API?
Hamidreza
can we send message like HttpResponse to use styles without change template?
cj
I have a website which has a restricted content (only authenticated users can access it) so my question is how I can mobile apps access it without using RESTFULL API?
well... you should use REST APIs or GraphQL and use tokens (or use OAuth2), there's no way you can share web sessions with mobile apps
Abdul Shakoor
he mentioned something like python-json module
cj
he mentioned something like python-json module
that works by using an API too 🤷🏻‍♂️
Abdul Shakoor
where i can find this module or can you send the link
cj
another thing you can do —but not recommended— is using a WebView in your mobile app and load your Django web page there
cj
where i can find this module or can you send the link
json is a Python built-in library but if you want to expose its data on a web site you should use an API
Anonymous
Hi can anyone tel me how to upload an xlsx file in django and reflect that in mysql database??
cj
are json and python json same?
python-json as a package doesn't exist, json is a built-in library on Python
cj
Hi can anyone tel me how to upload an xlsx file in django and reflect that in mysql database??
use django-import-export library https://django-import-export.readthedocs.io/en/latest/
Abdul Shakoor
and it job is just to parse the JsonResponse
cj
and it job is just to parse the JsonResponse
yes, to parse and to render, but again, for it to works on a web site —and let a mobile app to access it— you need an API, a basic one, but an API after all
ITz_Ayi
I'm trying to build an ads classified site and trying to make a category page but I'm kind of confused. I have already created a category model under Products app. Please is it necessary to create another app specifically for categories???
Bhashkar
how django handle multiple request at a time if the django use wsgi ?
Dharmil
Any easy codes or video to create cart for ecommerce website...??
Dharmil
check django oscar
Can you send me link ?? I am not aware about it..
Dharmil
Okie
Hamidreza
Is when we run the project on the server with the runserver command Is the site speed slowing down? How to run to speed up the project + I also manage several telegram robots in the project, which slow down a lot
Mirco
what do you suggest?
You must use Gunicorn or uWSGI
Mirco
Runserver is for development only
Hamidreza
You must use Gunicorn or uWSGI
is gunicorn Only Effective In Speeding Up the Website?
Mirco
is gunicorn Only Effective In Speeding Up the Website?
Obviously isn't, it's up to your code But runserver in production is the evil
Mirco
Read better Django documentation next time
Mirco
By comparison I mean runserver
It's absolutely faster
Hamidreza
It's absolutely faster
is gunicorn need something like tmux?
Mirco
No
Hamidreza
No
i just deploy my project with gunicorn
Mirco
i just deploy my project with gunicorn
Look for its documentation
Hamidreza
ok
Mirco
You need to install it inside your virtualenv and then use the command to run Django with Gunicorn
Mirco
The documentation is pretty clear
Uday
im using a function based view for a list of data coming from database which im looping on a page so if the user clicks on one of the item, i need to open a prompt and show that content in the prompt how can this be done when im using a function based view i dont have a slug for this model, i can add if thats needed i tried doing the same thing with generic views but couldnt cuz there are multiple context on the same page
Hamidreza
You need to install it inside your virtualenv and then use the command to run Django with Gunicorn
yes i do that and got this error Failed to dump process list, ignoring: No such file or directory ● gunicorn.socket - gunicorn socket Loaded: loaded (/etc/systemd/system/gunicorn.socket; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-12-17 15:52:25 EST; 16min ago Listen: /run/gunicorn.sock (Stream) CGroup: /system.slice/gunicorn.socket gunicorn is ok but socket is not connecting
Hamidreza
what this can't find?
Hamidreza
I don't see any error
Failed to dump process list, ignoring: No such file or directory what is that
Hamidreza
I don't see any error
502 Bad Gateway nginx/1.14.0 (Ubuntu) in ip address
Charly
gunicorn is listening in a socket if you are using ip adrees then something else is handling that
Anonymous
For an integer filed i have set a default value, that default value should be the max value for another integer field how to do that
Charly
i think nginx
probably, but you didin't show the nginx config
Charly
ot nginx logs
Hamidreza
probably, but you didin't show the nginx config
2020/12/17 16:11:41 [crit] 1710#1710: *2326 connect() to unix:/home/sammy/logger.sock failed (2: No such file or directory) while connecting to upstream, client: in nginx logs
ITz_Ayi
I'm trying to build an ads classified site and I want to make a category page but I'm kind of confused. I have already created a category model under Products app. Please is it necessary to create another app specifically for categories??? Please help
Hamidreza
thats not the gunicor socket
yes, im use restart command but not changed
Charly
yes, im use restart command but not changed
because you need to point to the correck socket
ITz_Ayi
you can have it in the same app
If I'm to add it within the Products app, how do i create the page?.. I have tried severally but haven't gotten any positive result.
ITz_Ayi
as usual, with a view a route and a template
The thing is that i have already defined 'category' on views and models within my Product app. And the product app contains the product list and details as html files. If i enter server/products on my browser, it displays the uploaded files. I added category.html on the Product app and tried to link it to the category_list that has already be defined but i got page not found error
Charly
youll need to add a route anda view and finally the template
Mohammad
How can I send a signal when saving a social network authentication user model? ex: https://stackoverflow.com/questions/64950549/create-a-social-authentication-functionality-with-google-django
ITz_Ayi
youll need to add a route anda view and finally the template
I added the category.html to the template folder in the products app. Now what i don't really get is the route you're talking about. Please can you make it clear🙏🙏
Charly
https://docs.djangoproject.com/en/3.1/topics/http/urls/