What I love about Django is that you can create a Django project with just one file. You can turn a fresh Debian machine into a running Django web app by just doing: apt install -y python3-django apache2 libapache2-mod-wsgi-py3 And then creating the one file Django needs: /var/www/mysite/mysite/wsgi.py: import os import django from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MO…
I don't catch if you are sarcastic or not do you really consider this a lean process in 2024?
What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
31–40 of 63 posts
Re: What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
#32Earlier quoted context omitted.
This is one of the core criticisms of Django and python web backends. WSGI is old tech that in your example requires extra packages and code in project to work. By now Python should stand on its own and handle this independently, being proxied to by better http servers like nginx or caddy.
Not only extra packages. They are currently shoehorning extended multiple interpreter support into CPython, which only Django uses. Similarly, the thread support appears to be mainly for the benefit of that famous photo sharing website that uses Django. CPython is fully commercialized.
And I'm certainly not unique amongst other pythonistas, this has been a goal for literal decades.
Re: What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
#33What I love about Django is that you can create a Django project with just one file. You can turn a fresh Debian machine into a running Django web app by just doing: apt install -y python3-django apache2 libapache2-mod-wsgi-py3 And then creating the one file Django needs: /var/www/mysite/mysite/wsgi.py: import os import django from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MO…
This is one of the core criticisms of Django and python web backends. WSGI is old tech that in your example requires extra packages and code in project to work. By now Python should stand on its own and handle this independently, being proxied to by better http servers like nginx or caddy.
Re: What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
#34Earlier quoted context omitted.
This is one of the core criticisms of Django and python web backends. WSGI is old tech that in your example requires extra packages and code in project to work. By now Python should stand on its own and handle this independently, being proxied to by better http servers like nginx or caddy.
You have to install software for software to run on your computer?!?
Re: What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
#35Love Django, but the issue we’ve had with tasks isn’t with performance, scalability, or devex - it’s with operations. Django-tasks afaict has the same issues as Celery/others in that there’s no Django Admin-like tool that reliably allows you to manage task execution, specifically failures. Without this, I can’t use async tasks for anything that’s important to the business or data consistency generally - which means I…
Re: What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
#36Oh man, I wish this was a bit more mature. I am writing a distributed image processing app right now with Celery, Flask, and SQLAlchemy, but I am finding it difficult to KISS. I was tempted to use Django but couldn't justify the overhead. If they get this cleaned up in the next year that would be awesome!
justify the overhead? But you are using flask and sqlalchemy? You made the wrong choice I would guess. Django does not have 'overhead' to justify in that scenario.
I am keeping the business logic separated out though so I can easily move to Django if needed.
Re: What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
#37Oh man, I wish this was a bit more mature. I am writing a distributed image processing app right now with Celery, Flask, and SQLAlchemy, but I am finding it difficult to KISS. I was tempted to use Django but couldn't justify the overhead. If they get this cleaned up in the next year that would be awesome!
One thing I have learned after nearly a decade in the industry is that you should just never, ever, ever use `celery`. It's overly complicated to program with; the monitoring tools are not great; and the one guarantee you can make is that at some point, you will have some kind of difficult to debug, mysterious failure involving it. If I needed asynchronous background processing in Python today, I'd definitely be look…
Re: What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
#38What I love about Django is that you can create a Django project with just one file. You can turn a fresh Debian machine into a running Django web app by just doing: apt install -y python3-django apache2 libapache2-mod-wsgi-py3 And then creating the one file Django needs: /var/www/mysite/mysite/wsgi.py: import os import django from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MO…
Re: What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
#39Re: What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
#40What I love about Django is that you can create a Django project with just one file. You can turn a fresh Debian machine into a running Django web app by just doing: apt install -y python3-django apache2 libapache2-mod-wsgi-py3 And then creating the one file Django needs: /var/www/mysite/mysite/wsgi.py: import os import django from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MO…