Skip to main content
Pre-release

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

toga-django-0.3.0.dev29.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toga_django-0.3.0.dev29-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file toga-django-0.3.0.dev29.tar.gz.

File metadata

  • Download URL: toga-django-0.3.0.dev29.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for toga-django-0.3.0.dev29.tar.gz
Algorithm Hash digest
SHA256 3bf0d8f42e33c56386b97cddae499a70dc33ba45b7b4451d479f805dbe98d2a0
MD5 c2212ef39ea09ae73162371b5855343e
BLAKE2b-256 ba804323aade51b3835d8f36ad6ea269b8ff79db66ee30e3cc5ff7e373e45cca

See more details on using hashes here.

File details

Details for the file toga_django-0.3.0.dev29-py3-none-any.whl.

File metadata

  • Download URL: toga_django-0.3.0.dev29-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for toga_django-0.3.0.dev29-py3-none-any.whl
Algorithm Hash digest
SHA256 412ac310799f7b8047e52c30a026069261afc6b08d472cd68057227599537a8e
MD5 355ad23cdfa77e58a04f4cfc791be958
BLAKE2b-256 c009cd75d2e6db28ca63160bd0d897ac04244824fefc0e47e6017604e7ca097b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0.dev29 This release

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.0.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page