DDA is an example project to demonstrate how to use Django as a desktop application. It provides an alternative to using a GUI framework such as Tkinter or PyQt.
It is a work in progress.
First, install Python 3.4. The application will probably work with any 3.x version, but it has only been tested on 3.4.
(527)% virtualenv env (528)% source env/Scripts/activate (env)(529)% pip install -r requirements.txt
Note
|
The above commands assumes that you have virtualenv on your path.
If you do not, then you will need to list the entire path to execute
it. For example, /c/Python34/Scripts/virtualenv would be the path for a Windows install (assuming you were running a Bash shell). |
Because this repo includes a database, you do not need to run migrate to create it yourself.
At the command line, type the following.
(env)(530)% python manage.py runserver
Open up your favourite web browser, and navigate to http://127.0.0.1:8000/.
At the top of the web page window, you will see the application menu. You can access the Administration content under the drop down menu of the same name. The login name is admin and the password is admin.
To allow the Django Desktop Application to access common javascript and css files used by the web pages (without having to hit the network), I have included copies in this distribution. Here is a list:
-
Glyphicons (Graciously donated to Bootstrap)
They are all awesome.
-
Freeze Application
There is some experimental content that calls cx_freeze, but the resulting executable does not run successfully. -
Create Installer
Add NSIS installer for application. This is easy enough to do, but there is not much point in doing it until the freeze problem is addressed. -
Use A More Robust Local Webserver
Right now, the application is using the built-in Django webserver (in debug mode!). Other people that have used Django in this way have used CherryPy, and I plan on doing the same. Eventually.
I would really like to get this working using the built-in webserver, as I think that this may be just fine for simple applications. (And, I have been beating my head against it for long enough, that I want to get it working from sheer stubbornness.)
See this example for using CherryPy.
Here is another example.
As well as here.
This example uses Python 2.7, where I am using Python 3.4.