cj
Данил
Yeah I see😁. https://channels.readthedocs.io/en/latest/deploying.html
cj
Supervisor
many people will hate me, but... use systemd instead of that old supervisor thing
Данил
But I puzzled by this article about supervisor
cj
Данил
I hate deploying 🙈🙈🙈
Данил
Thanks very much. Tomorrow I will try second time
Данил
With Daphne
Mrinal
I've encountered a few situations in Django projects where I've experienced problems with unauthorized state changes in certain enum fields.
In order to solve this issue, I've created an open source Django reusable app that helps you control the state transitions. With dj_enum you can define a set of state choices for your models and ensure that your data remains consistent by preventing illegal state change.
Github repo link: https://github.com/themrinalsinha/dj_enum
I would like to have some feedback and contributions to enhance its robustness.
Thanks.
Данил
Hello guys, I have a question. I use unicorn webserver but cannot load page when run me site in digitalocean
#docker-compose.yml
services:
web:
build: .
command: uvicorn DjangoApp.asgi:application --host 0.0.0.0 --port 8000
volumes:
- static_volume:/usr/src/DjangoApp/static
- media_volume:/usr/src/DjangoApp/media
ports:
- "80:80"
env_file:
- ./.env
depends_on:
- db
What's wrong I do?
😈
Данил
No(
Sourabh
Can we create the build of django application?
Данил
DjangoApp it's project name
Jitxs
try ports:
80:8000
Abhishek
ConnectionError at /test/
Error 22 connecting to 127.0.0.1:6379. 22.
What is error ,I am building ecommerce website,to send notification to users
Abhishek
Any idea I am struck in this error
Ali
Abhishek
Данил
Данил
runs correctly but site doesn't load
Данил
The following error was encountered while trying to retrieve the URL: http://46.101.115.12
Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
Your cache administrator is webmaster.
Данил
in console:
web-1 | 2023-11-05 10:28:56,061 INFO Starting server at tcp:port=8000:interface=0.0.0.0
web-1 | 2023-11-05 10:28:56,062 INFO HTTP/2 support not enabled (install the http2 and tls Twisted extras)
web-1 | 2023-11-05 10:28:56,063 INFO Configuring endpoint tcp:port=8000:interface=0.0.0.0
web-1 | 2023-11-05 10:28:56,066 INFO Listening on TCP address 0.0.0.0:8000
Ali
Bro go enter the django app container and get container local ip with ifconfig. Then use this ip insead of server global ip
Ali
To reach the web site
Данил
Ali
Write this commands in your server
sudo docker exec -it web-1 sh
It'll open your web app container server
Then write this
ifconfig
Get container ip
Copy this ip and search with this url not your digitalocean server ip
Данил
just reloading all time, no effect
أسماء
Please, how can I solve error running console pycharm 2023.2.3
Данил
I have websockets but when I use Nginx, I cannot connect to them. Websockets Routes not found, what's wrong?
Maxim
@Wisely456 WTF with your PFP?
Muflone
Данил
Ali
Ali
If you want I can share my nginx conf
Nihalxxxx
I uploaded a pdf file and i want to display as flipbook.. like wowbook library..how??
Данил
cj
👌?
can't you use another profile picture that is not meant to confuse people? or what are your intentions by using a pfp from an admin or from the group?
Данил
👌?
Данил
I'm warned
Rohan Ekke
Why testcase (tests.py) are done in django? What is use of test?
Ahmed
Can someone suggest me good hosting for django
Vercel or render are these good for django
Данил
Adisa
I am having problem with loading static files on AWS EC2 instance while trying to deploy my django project using apache2 server, gunicorn and supervisor… I have tried all the configurations but nothing seems to be working in loading the static files… someone should help please
Anonymous
Can you recommend me a good hosting for Django?
cj
None
hi anyone know how expire or cancel a order in paypal api v2 ? (order should not payed and user cant use approve order link )
@Rp
Hi guys, is there anyone familiar with multiple database connection in django project please explain to me
Abhinand
The field admin.LogEntry.user was declared with a lazy reference to 'mainapp.customuser', but app 'mainapp' doesn't provide model 'customuser'
any one know about this
it occure when i am trying to create custom user model
class CustomUser(AbstractUser):
profile_image = models.ImageField(upload_to='media/profile', null=True, blank=True)
Boini
Guys I have an signup data in mysql database and I want to authenticate login details with using django rest framework please help
I'm
Hi everyone!
I am using rest framework to send data in json format to an API. I have 2 models, User and Category. I want to send "username" from User and "name" from Category model. How can I do this? I have just one meta class in serializer class which will handle one of the models. What should I do for using both?
Suleman
does any body habe worked on windos defender inside windows containers.
i. am having issue. with that
I'm
I'm
Believe
DeathLikeSilence
Using foreign key
Yeah you can use a foreign key if you want to connect them or related
In the User model, create a field like this:
Username = model.Charfield()
In the Category model, create a field like this:
Name = model.Charfield()
But unfortunately, I can not understand what you want to do with those
Can u explain more???
DeathLikeSilence
What is a category about??
Or User
What do u want to do??
Mahan
Hello, how can I tell Django not to go to the checkout page if the shopping cart is empty? And come back to this page?
cj
cj
men i know but how tell it in view?
you have to check if the cart is empty and redirect to the proper page according to that validation... have you ever heard how if clause work?
cj
another option could be make a decorator for your checkout-page view, where the decorator will be in charge of checking whether the cart is empty to redirect to another page or let the user continue doing the checkout
Nishanth Siraj
Can you say what package is better for doing cron jobs in django. My research stated that celery is better but i want your opinion
Bob
Bob
have anyone of u guys tried developing desktop apps using DJango? if so any tips would be greatfull
Mahan
i use this but doesent work
if not cart.cart:
return redirect('cart:cart')
Bob
Mahan