- Some clients may find scary to write command in command prompt, but django project usually require some commands before actual server runs onto computer. So to reduce the friction between application and user, this project helps to create a distributable package with the help of django and electron.
- add simple
backendin django app - add simple
electronwrapper to django executable file generated bypyinstaller - add simple
frontendin framework such asvuejs,reactjsetc. - add
exampledirectory to create bunch of examples for example whatsapp.
This project is an open-source initiative aimed at building packagable and distributable web application with the help of pyinstaller and electron. This project is meant as Proof-Of-Concept but you could modify backend and add functionality to electorn wrapper and builder as much complex as possible as per your requirement.
- After multiple tries then only django server start when opened with electorn.
Steps involved
$ git clone https://github.com/vimm0/web-desktop.git
$ cd web-desktopFrom the root of this repo, steps involved to produce package from backend directory are:
$ cd backend
$ virtualenv -p python env
$ source env/Scripts/activate
$ pip install -r requirements.txt
$ python manage.py migrate
$ python manage.py createsuperuser
$ pyinstaller --name=webdeskbackend manage.py --onefile
$ ./dist/webdeskbackend.exe runserver --noreload # to check if it works.
After running commands above, open your web browser and visit http://localhost:8000 to access the application.
Pyinstaller produces build and dist directory, dist contains executable application in backend directory, which should be copied to webdesk-de or equivalent electron wrapper. In this case, back directory in webdesk-de.
From the root of this repo, steps involved to produce electron application with django backend is as follows:
$ cd webdesk-de
$ npm install
$ npm run pack:lin
electron produces out directory where all the packaged application resides. You can now open application in out directory.
To open produced application in linux
$ ./out/Webdesk-linux-x64/Webdesk
We welcome contributions from the community to make this project better. To contribute, please follow these steps:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Test your changes.
- Submit a pull request.
Please ensure that your code follows the project's coding conventions and styling guidelines. Also, make sure to update the documentation if necessary.
Also contribution is required in mac OS because of software and hardware limitation.
This project is licensed under the MIT License. You are free to use, modify, and distribute this software. See the LICENSE file for more details.
Thank you for your interest in this project. If you have any questions, please feel free to contact us or open an issue. We appreciate your support!