Why?
djngo.com is the culmination of years of effort, creating a single file python executable that runs on all platforms. This project is based on APE ( https://justine.lol/ape.html ) and in the past few days, our Python APE port (called python.com) became good enough to run Django. So we put Django inside the executable too, and called it djngo.com. The djngo.com executable will just work on the following platforms: - A…
Portable Django
21–30 of 71 posts
Re: Portable Django
#22I'm running
curl -O https://djngo.com/djngo.com
shasum -a 256 djngo.com
and I get 6133a4f5c76af6ca6a2b2eba115783a78fc1721cd384539076884f640b801a26 djngo.com
I'm on a M1 Mac. Am I missing something obvious?I tried running it anyway (smart I know) and it failed with
zsh: exec format error: ./djngo.comRe: Portable Django
#23Are people still using Django?
Re: Portable Django
#24I'm getting the wrong hash when I download the file (I tried a couple times). I'm running curl -O https://djngo.com/djngo.com shasum -a 256 djngo.com and I get 6133a4f5c76af6ca6a2b2eba115783a78fc1721cd384539076884f640b801a26 djngo.com I'm on a M1 Mac. Am I missing something obvious? I tried running it anyway (smart I know) and it failed with zsh: exec format error: ./djngo.com
x@m1n1n0 ~> chmod +x djngo.com
x@m1n1n0 ~> sha256sum djngo.com
6205984f572575c407ce65502361b554af17584f076076bec7440613459d 1dff djngo.com
x@m1n1n0 ~> ./djngo.com
extracting blink-darwin-arm64 to /var/folders /fn/4cdpvwcx1wnc53rzl2m0pn_m0000gn/T//.ape-blink-0.9.2
Python 3.6.14+ (Actually Portable Python) [GCC 9.2.0] on cosmo
Type "help", "copyright", "credits" or "license" for more information.
>>:Re: Portable Django
#25Re: Portable Django
#26Re: Portable Django
#27Earlier quoted context omitted.
A lot. And it baffles me why hasn't anyone realized that Kenneth Reitz was right about django over a decade ago and all his points are equally valid today. https://speakerdeck.com/kennethreitz/flasky-goodness
Flask FTW.
import os
from django.conf import settings
from django.core import management
from django.conf.urls import url
from django.http import HttpResponse
# Django 2.2 Release Notes
# https://docs.djangoproject.com/en/4.1/releases/2.2/
# Documentation
# https://docs.djangoproject.com/en/2.2/
__version__ = 0.1
DEBUG = True
ROOT_URLCONF = 'project'
DATABASES = {'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'project.db' }}
SECRET_KEY = os.getenv('SECRET_KEY', 'Please set a SECRET_KEY as an env var.')
if not settings.configured:
settings.configure(**locals())
def index(request):
return HttpResponse('Hello Django!')
urlpatterns = [
url(r'^$', index),
]
if __name__ == '__main__': # pragma: no cover
management.execute_from_command_line()Re: Portable Django
#28Are people still using Django?
Re: Portable Django
#29I know about Electron and Tauri and all that but this seems like an intriguing possibility to work on.
Re: Portable Django
#30Hmm, this has me thinking I could build a single-file executable with a self-contained database or that connects to the server. And with a little work I might be able to launch the system browser pointed at the Djngo. And with this I might have a simple web based replacement for all the Access utilities floating around here? I know about Electron and Tauri and all that but this seems like an intriguing possibility to…