Source: https://wiki.archlinux.org/index.php/PostgreSQL
-
Install postgresql package
sudo pacman -S postgresql -
Switch to the postgres user account and initialize the database cluster:
sudo -iu postgres| web: python manage.py collectstatic --noinput && bin/start-pgbouncer bin/start-nginx gunicorn -c gunicorn.conf.py project.wsgi |
| from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter | |
| from fastapi import FastAPI, Request | |
| from fastapi.responses import JSONResponse | |
| from opentelemetry.context import get_current as get_current_context | |
| from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor | |
| from opentelemetry.sdk.trace import TracerProvider, _Span | |
| from opentelemetry.sdk.trace.export import (BatchSpanProcessor, | |
| ConsoleSpanExporter, | |
| SimpleSpanProcessor) | |
| from starlette.exceptions import HTTPException as StarletteHTTPException |
| { | |
| "extensions": [ | |
| { | |
| "id": "10", | |
| "lang": "de", | |
| "source": "Wie Manga!" | |
| }, | |
| { | |
| "id": "100019686565354829", | |
| "lang": "de", |
| from django.contrib.auth.models import AbstractUser | |
| from django.db import models | |
| from django.urls import reverse | |
| from django.utils.translation import gettext_lazy as _ | |
| class User(AbstractUser): | |
| class Types(models.TextChoices): | |
| SPY = "SPY", "Spy" | |
| DRIVER = "DRIVER", "Driver" |
| from datetime import datetime | |
| """ | |
| Called during request: | |
| process_request(request) | |
| process_view(request, view_func, view_args, view_kwargs) | |
| Called during response: | |
| process_exception(request, exception) (only if the view raised an exception) | |
| process_template_response(request, response) (only for template responses) |
| from django.contrib import admin | |
| from django.contrib.auth.admin import UserAdmin as DjangoUserAdmin | |
| from django.utils.translation import ugettext_lazy as _ | |
| from .models import User | |
| @admin.register(User) | |
| class UserAdmin(DjangoUserAdmin): |
Source: https://wiki.archlinux.org/index.php/PostgreSQL
Install postgresql package
sudo pacman -S postgresql
Switch to the postgres user account and initialize the database cluster:
sudo -iu postgresThe repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare [email protected]:usi-systems/easytrace.git
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | ๐ :tada: |
| Version tag | ๐ :bookmark: |
| New feature | โจ :sparkles: |
| Bugfix | ๐ :bug: |
I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.