Compiling django project as a desktop application

后端 未结 1 732
攒了一身酷
攒了一身酷 2021-02-09 01:25

I have a web application that I would like to have a version of it on the desktop. It would be totally awesome if i can just compile it rather than rewrite it. (I can\'t give th

1条回答
  •  攒了一身酷
    2021-02-09 02:20

    Yes, I am doing this on OSX. It's not simple and, as far as I can tell, I may be the first person to successfully do it on OSX, so YMMV.

    Pyinstaller, as of March, wasn't quite ready for Django support. I've filed a few tickets from when I tried to use it to package my application and I have admittedly not fixed those issues yet.

    I went with py2app, ultimately, because I had prior experience with it for other applications. I made a sample project with py2app and Django and put it on Github. You may find it useful. I also linked a few of the pages that I found useful in the process, which I've included below:

    https://groups.google.com/forum/?fromgroups=#!topic/django-users/-VGqvHew35g

    http://misunderstandings.wordpress.com/2008/06/26/django-desktop-app/

    https://bitbucket.org/Lawouach/cherrypy-recipes/src/9c35b4b62ef1/frameworks/django_?at=default

    If I had to do it again, I would probably use SQLAlchemy and wxPython or PySide. I'd recommend thinking carefully about what you'd like to achieve using Django as a packaged application because it introduces a lot of complexity.

    0 讨论(0)
提交回复
热议问题