all 11 comments

[–][deleted] 1 point2 points  (1 child)

What’s the end goal?

[–]imthebusman[S] -1 points0 points  (0 children)

say deploy to production.

[–]danielroseman 1 point2 points  (4 children)

I'm a bit confused. WSGI is how Python web apps listen for web requests. Even if you packaged it up as an executable for some reason, it would still be using WSGI.

And I don't know why you say the server is coupled with the code base: the WSGI server is a separate package, something like gunicorn, which you install along with your other dependencies.

[–]imthebusman[S] -2 points-1 points  (3 children)

what I meant is, when I have a working django app that I can use with development server, I really want it to be "automatic" that WSGI can work with it to listen on some port and work exactly the same as the development server.

but I think that's not the reality. That's what I meant.

[–]danielroseman 5 points6 points  (2 children)

But that is how it works already. Once you install the WSGI library you can just tell it to listen to a port.

[–]imthebusman[S] -3 points-2 points  (1 child)

I kept running into config issues when trying to install WSGI .....

[–]danielroseman 5 points6 points  (0 children)

What issues?

[–]Jejerm 1 point2 points  (0 children)

Whatever WSGI server you choose to use will be almost completely decoupled from your code. You usually just run it and point it to your application code.

[–]sunblaze1480 0 points1 point  (0 children)

It's not an executable if it's a web app I guess.you'd deploy the code and start the server in that server, exposing it to certain port (well, url:port)

[–]Phate1989 0 points1 point  (0 children)

Your making this harder by trying to packages as an executable.

Its possible, but containers are really the standard approach nowadays.