This will be an index to the python work, including expecially footnoting virtual environments
cd ~; source .venv/bin/activate .venv
cd /var/www/html//var/www/html/coffeeShop3/testUpload
source .venv/bin/activate
python chatupload.py
Your project’s TEMPLATES setting describes how Django will load and render templates. The default settings file configures a DjangoTemplates backend whose APP_DIRS option is set to True. By convention DjangoTemplates looks for a “templates” subdirectory in each of the INSTALLED_APPS.
~/pythonSrc
, on the droplet.
After getting updated sqlite library on 'droplet', and all python source, to rebuild, got errors at begining of 'make altinstall', a second bunch at the end.
sudo LD_RUN_PATH=/usr/local/lib make altinstall if test "no-framework" = "no-framework" ; then \ /usr/bin/install -c python /usr/local/bin/python3.12; \ else \ /usr/bin/install -c -s Mac/pythonw /usr/local/bin/python3.12; \ fi if test "3.12" != "3.12"; then \ if test -f /usr/local/bin/python3.12 -o -h /usr/local/bin/python3.12; \ then rm -f /usr/local/bin/python3.12; \ fi; \ (cd /usr/local/bin; ln python3.12 python3.12); \ fi if test "x" != "x" ; then \ rm -f /usr/local/bin/python3.12-32; \ lipo \ -output /usr/local/bin/python3.12-32 \ /usr/local/bin/python3.12; \ fi if test "x" != "x" ; then \ rm -f /usr/local/bin/python3.12-intel64; \ lipo \ -output /usr/local/bin/python3.12-intel64 \ /usr/local/bin/python3.12; \ fi # Install macOS debug information (if available) if test -d "python.dSYM"; then \ echo /usr/local/bin/python3.12; \ /usr/local/bin/python3.12; \ fi if test "no-framework" = "no-framework" ; then \ if test -d "libpython3.12.a.dSYM"; then \ echo /usr/local/lib/libpython3.12.a; \ /usr/local/lib/libpython3.12.a; \ fi \ else \ if test -d "libpython3.12.a.dSYM"; then \ echo /libpython3.12.a; \ /libpython3.12.a; \ fi \ fi The necessary bits to build these optional modules were not found: _bz2 _ctypes _ctypes_test _curses _curses_panel _dbm _gdbm _hashlib _lzma _ssl _tkinter _uuid readline zlib To find the necessary bits, look in configure.ac and config.log. Could not build the ssl module! Python requires a OpenSSL 1.1.1 or newer Checked 111 modules (31 built-in, 65 shared, 1 n/a on linux-x86_64, 0 disabled, 14 missing, 0 failed on import) Creating directory /usr/local/lib/python3.12 Creating directory /usr/local/lib/python3.12/asyncio
These errors came at the end of the run
/usr/bin/install -c -m 755 Modules/xxlimited_35.cpython-312-x86_64-linux-gnu.so /usr/local/lib/python3.12/lib-dynload/xxlimited_35.cpython-312-x86_64-linux-gnu.so /usr/bin/install -c -m 644 ./Misc/python.man \ /usr/local/share/man/man1/python3.12.1 if test "xupgrade" != "xno" ; then \ case upgrade in \ upgrade) ensurepip="--altinstall --upgrade" ;; \ install|*) ensurepip="--altinstall" ;; \ esac; \ ./python -E -m ensurepip \ $ensurepip --root=/ ; \ fi Traceback (most recent call last): File "", line 518, in _get_decompress_func ModuleNotFoundError: No module named 'zlib' During handling of the above exception, another exception occurred: Traceback (most recent call last): File " ", line 566, in _get_data File " ", line 521, in _get_decompress_func zipimport.ZipImportError: can't decompress data; zlib not available During handling of the above exception, another exception occurred: Traceback (most recent call last): File " ", line 6, in File " ", line 222, in run_module File " ", line 148, in _get_module_details File " ", line 112, in _get_module_details File " ", line 137, in get_code File " ", line 700, in _get_module_code File " ", line 568, in _get_data zipimport.ZipImportError: can't decompress data; zlib not available Traceback (most recent call last): File " ", line 198, in _run_module_as_main File " ", line 88, in _run_code File "/home/donzeek/pythonSrc/Python-3.12.1/Lib/ensurepip/__main__.py", line 5, in sys.exit(ensurepip._main()) ^^^^^^^^^^^^^^^^^ File "/home/donzeek/pythonSrc/Python-3.12.1/Lib/ensurepip/__init__.py", line 284, in _main return _bootstrap( ^^^^^^^^^^^ In response to sudo LD_RUN_PATH=/usr/local/lib make altinstall got this, at beginning of execution:File "/home/donzeek/pythonSrc/Python-3.12.1/Lib/ensurepip/__init__.py", line 200, in _bootstrap return _run_pip([*args, *_PACKAGE_NAMES], additional_paths) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/donzeek/pythonSrc/Python-3.12.1/Lib/ensurepip/__init__.py", line 101, in _run_pip return subprocess.run(cmd, check=True).returncode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/donzeek/pythonSrc/Python-3.12.1/Lib/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/home/donzeek/pythonSrc/Python-3.12.1/python', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmper2_zyyp/pip-23.2.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmper2_zyyp\', \'--root\', \'/\', \'--upgrade\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1. make: *** [altinstall] Error 1
What’s the difference between a project and an app? An app is a web application that does something – e.g., a blog system, a database of public records or a small poll app. A project is a collection of configuration and apps for a particular website. A project can contain multiple apps. An app can be in multiple projects.
Generating admin sites for your staff or clients to add, change, and delete content is tedious work that doesn’t require much creativity. For that reason, Django entirely automates creation of admin interfaces for models.
Still getting trout setup. Ready to tackle python to recieve uploaded files
/Users/donzeek/Development/django/djangTutorial/ricochet
New example (yesterday's
Linked in Tutorial Guide up to now.
will work within new framework (git download available: ~/Dev/django/fromStaco/minimal-django-file-upload-example
)
Still getting trout setup. Ready to tackle python to recieve uploaded files
source ~/.virtualenvs/djangodev/bin/activate
deactivate
Where to put all API keys for remote accounts. Piling up, previously posting something in the journal:
source ~/.virtualenvs/djangodev/bin/activate
deactivate
django-admin startproject zcs_project
creates subdirectory zcs_project, creates project framework there (including manage.py)
python manage.py runserver
initiates the included simple server, to read (or reread) program output and respond to client probes.
cd <where manage.py is>
This is where application level is modified.
python manage.py startapp zcs_app_name
This creates the application directory 'zcs_app_name' under the project directory 'zcs_project', and on the initial run creates db.sqlite3.
settings.py
file, change it to add to the environment variable
INSTALLED_APPS the string object 'zcs_app_name'.python manage.py makemmigrations
python manage.py showmigrate
python manage.py migrate
continuing with transcription
python manage.py load_pet_data
parent/Management
python manage.py createsuperuser;
python manage.py runserver;
base.html
in 'templates' alonngside home.html and pet_detail.html