This release is a pre-release and may not be stable for production use.
A Django backend for the Toga widget toolkit.
This package isn’t much use by itself; it needs to be combined with the core Toga library and the Toga Web library.
For more details, see the Toga project on Github.
Prerequisites
This backend requires Django 3.0 as a minimum requirement.
Usage
Toga Django defines a TogaApp class that can be used to mount a Toga Web instance in a Django app. If you have Toga application named myapp, Django deployment is acheived by putting the following into your project’s urls.py:
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path
from toga_django import TogaApp
from tutorial import app
urlpatterns = [
path('admin/', admin.site.urls),
path('/', TogaApp(app).urls),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
This will mount the Toga app at /, the Django admin at /admin, and serve static content in debug mode. You can mount the app at any URL you wish, and you can also add other routes for other views.
The app can then be executed with:
$ ./manage.py runserver
This assumes a standard Toga app layout, where the application myapp has a submodule app.py that defines a main() method.
Community
Toga is part of the BeeWare suite. You can talk to the community through:
Contributing
If you experience problems with this backend, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toga-django-0.3.0.dev33.tar.gz.
File metadata
- Download URL: toga-django-0.3.0.dev33.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6ea7eeecb8623d02b08cc95e961cfe179f45af0a2e86b211e9d9d526e46fb3a
|
|
| MD5 |
48d65953b2ac9393469b54ffdf55c20b
|
|
| BLAKE2b-256 |
0b4a43184e17a65c64d19823a569a6473ec1f3a889adb0e7f2aeccfe97f99ce4
|
File details
Details for the file toga_django-0.3.0.dev33-py3-none-any.whl.
File metadata
- Download URL: toga_django-0.3.0.dev33-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a767e8cb8a02e27b0fb819e9ac24c64f19c7e7a61c8890ca177101cfe5800e7d
|
|
| MD5 |
2dda253f0b71cf9dca3efa2dbc7a631a
|
|
| BLAKE2b-256 |
1c2e1ae4a3fca5f7508dd67d13133e33379ecb44b0ebdedd5d945f5ea212544b
|