Refereces: (Queries)[https://docs.djangoproject.com/en/3.1/topics/db/queries/]
References: (Migrations)[https://docs.djangoproject.com/en/3.1/topics/migrations/]
[ | |
{ | |
"name": "Alpha", | |
"capital": { | |
"display": "A", | |
"unicode": "U+0391", | |
"html": "Α" | |
}, | |
"small": { | |
"display": "α", |
```html | |
<select | |
id="languagesISO639-1" | |
name="languagesSelect" | |
> | |
<option value="af">Afrikaans</option> | |
<option value="sq">Albanian - shqip</option> | |
<option value="am">Amharic - አማርኛ</option> | |
<option value="ar">Arabic - العربية</option> | |
<option value="an">Aragonese - aragonés</option> |
{ | |
"types": { | |
"resourceTypeGeneral": "Dataset", | |
"resourceType": "Dataset", | |
"schemaOrg": "Dataset", | |
"citeproc": "dataset", | |
"bibtex": "misc", | |
"ris": "DATA" | |
} | |
} |
{ | |
"types": { | |
"resourceTypeGeneral": "Collection", | |
"resourceType": "Report", | |
"schemaOrg": "Collection", | |
"citeproc": "report", | |
"bibtex": "misc", | |
"ris": "GEN" | |
} | |
} |
const isORCID = (identifier) => { | |
return identifier.length > 0 && /(\d{4}-){3}\d{3}(\d|X)/.test(identifier) | |
} |
#!/bin/sh | |
# docker-compose -f docker-compose.asencis.development.yml --env-file .env.development exec web python manage.py dbshell -- -c 'TRUNCATE django_migrations;' | |
# docker-compose -f docker-compose.asencis.development.yml --env-file .env.developemt exec web python manage.py migrate --plan | |
python manage.py dbshell -- -c 'TRUNCATE django_migrations;' | |
python manage.py migrate --plan | |
# Once we have the migrations "plan" of execution...migrate first, if error, use the --fake flag, e.g.: | |
python manage.py migrate auth 0001_initial |
# Inherit from the Python 3.9.1 slim buster Docker image | |
FROM python:3.9.1-slim-buster | |
# Set the working directory | |
WORKDIR /app | |
# Install application dependencies | |
COPY ./requirements.txt ./ | |
RUN pip install -r requirements.txt |
Refereces: (Queries)[https://docs.djangoproject.com/en/3.1/topics/db/queries/]
References: (Migrations)[https://docs.djangoproject.com/en/3.1/topics/migrations/]
References: settings.py
The settings.py file gives us an extremely convenient way to define project level configurations. This is where we define databases, email providers, error logging, caching backends, message brokers, default file storage etc.
A common setting is the DEBUG
paramater:
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"definitions": { | |
"nameType": { | |
"type": "string", | |
"enum": [ | |
"Organizational", | |
"Personal" | |
] |