Dump existing data:
python3 manage.py dumpdata > datadump.json
Change settings.py to Postgres backend.
Make sure you can connect on PostgreSQL. Then:
| import inspect | |
| from typing import Any, Callable, List, Type, TypeVar, Union, get_type_hints | |
| from fastapi import APIRouter, Depends | |
| from pydantic.typing import is_classvar | |
| from starlette.routing import Route, WebSocketRoute | |
| T = TypeVar("T") | |
| CBV_CLASS_KEY = "__cbv_class__" |
| # No inicio.jsp | |
| <input type="hidden" id="controloAlteracoes" value="0"> | |
| # no acesso.js (chamado no inicio.jsp) | |
| $("#controloAlteracoes").change(function () { | |
| if ($(this).val() == 1) { | |
| toastr.clear(); | |
| toastr["info"]("Existem informaΓ§Γ΅es nΓ£o guardadas", "AtenΓ§Γ£o", { | |
| "closeButton": true, | |
| "debug": false, |
| package agent; | |
| import common.Action; | |
| public class AlphaBeta extends GameAlgorithm { | |
| //ALFABETA-DECISION(state) returns an action | |
| // max = -β | |
| // For each a from ACTIONS(state) do | |
| // v = MINVALUE(RESULT(state, a), max, +β, 1) |
| 1. Make folder tree like these | |
| mi_project | |
| βββ src | |
| β βββ midjangoapp | |
| β βββ manage.py | |
| βββ config | |
| β βββ requirements.pip | |
| β βββ nginx | |
| β βββ midjangoapp.conf | |
| βββ Dockerfile |
| var canvas = document.createElement('canvas'); | |
| var gl; | |
| var debugInfo; | |
| var vendor; | |
| var renderer; | |
| try { | |
| gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); | |
| } catch (e) { | |
| } |
| #!/bin/sh -x | |
| # This script compiles Godot for GNU/Linux in 64-bit. | |
| # Place this script at the root of your Godot Git clone. | |
| # CC0 1.0 Universal | |
| # Build 64-bit Godot for GNU/Linux desktop, in debug and release mode | |
| scons p=x11 -j$(nproc) verbose=no tools=yes target=release_debug openssl=builtin | |
| scons p=x11 -j$(nproc) verbose=no tools=no target=release_debug openssl=builtin |
| from functools import update_wrapper | |
| from django.contrib import admin | |
| from django.contrib.admin import ModelAdmin | |
| from django.contrib.admin.templatetags.admin_urls import add_preserved_filters | |
| from django.core.exceptions import PermissionDenied | |
| from django.shortcuts import render | |
| from myapp.models import Widget | |
| from myapp.forms import ManageWidgetForm |
NOTE: This is a question I found on StackOverflow which Iβve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantinoβs answer][2].