├── .circleci └── config.yml ├── .gitignore ├── CHANGES.md ├── Dockerfile ├── README.md ├── bin └── countriesDataLoader.py ├── djangopj ├── .env_example_en ├── .env_example_jp ├── .env_example_zh ├── accounts │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── templates │ │ └── accounts │ │ │ └── signup.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── db.sqlite3 ├── djangopj │ ├── __init__.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── geo │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── fixtures │ │ ├── country.json │ │ └── prefecture.json │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── templates │ │ └── geo │ │ │ ├── index.html │ │ │ └── prefectures.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── manage.py ├── static │ ├── admin │ │ ├── css │ │ │ ├── autocomplete.css │ │ │ ├── base.css │ │ │ ├── changelists.css │ │ │ ├── dashboard.css │ │ │ ├── fonts.css │ │ │ ├── forms.css │ │ │ ├── login.css │ │ │ ├── nav_sidebar.css │ │ │ ├── responsive.css │ │ │ ├── responsive_rtl.css │ │ │ ├── rtl.css │ │ │ ├── vendor │ │ │ │ └── select2 │ │ │ │ │ ├── LICENSE-SELECT2.md │ │ │ │ │ ├── select2.css │ │ │ │ │ └── select2.min.css │ │ │ └── widgets.css │ │ ├── fonts │ │ │ ├── LICENSE.txt │ │ │ ├── README.txt │ │ │ ├── Roboto-Bold-webfont.woff │ │ │ ├── Roboto-Light-webfont.woff │ │ │ └── Roboto-Regular-webfont.woff │ │ ├── img │ │ │ ├── LICENSE │ │ │ ├── README.txt │ │ │ ├── calendar-icons.svg │ │ │ ├── gis │ │ │ │ ├── move_vertex_off.svg │ │ │ │ └── move_vertex_on.svg │ │ │ ├── icon-addlink.svg │ │ │ ├── icon-alert.svg │ │ │ ├── icon-calendar.svg │ │ │ ├── icon-changelink.svg │ │ │ ├── icon-clock.svg │ │ │ ├── icon-deletelink.svg │ │ │ ├── icon-no.svg │ │ │ ├── icon-unknown-alt.svg │ │ │ ├── icon-unknown.svg │ │ │ ├── icon-viewlink.svg │ │ │ ├── icon-yes.svg │ │ │ ├── inline-delete.svg │ │ │ ├── search.svg │ │ │ ├── selector-icons.svg │ │ │ ├── sorting-icons.svg │ │ │ ├── tooltag-add.svg │ │ │ └── tooltag-arrowright.svg │ │ └── js │ │ │ ├── SelectBox.js │ │ │ ├── SelectFilter2.js │ │ │ ├── actions.js │ │ │ ├── actions.min.js │ │ │ ├── admin │ │ │ ├── DateTimeShortcuts.js │ │ │ └── RelatedObjectLookups.js │ │ │ ├── autocomplete.js │ │ │ ├── calendar.js │ │ │ ├── cancel.js │ │ │ ├── change_form.js │ │ │ ├── collapse.js │ │ │ ├── collapse.min.js │ │ │ ├── core.js │ │ │ ├── inlines.js │ │ │ ├── inlines.min.js │ │ │ ├── jquery.init.js │ │ │ ├── nav_sidebar.js │ │ │ ├── popup_response.js │ │ │ ├── prepopulate.js │ │ │ ├── prepopulate.min.js │ │ │ ├── prepopulate_init.js │ │ │ ├── urlify.js │ │ │ └── vendor │ │ │ ├── jquery │ │ │ ├── LICENSE.txt │ │ │ ├── jquery.js │ │ │ └── jquery.min.js │ │ │ ├── select2 │ │ │ ├── LICENSE.md │ │ │ ├── i18n │ │ │ │ ├── af.js │ │ │ │ ├── ar.js │ │ │ │ ├── az.js │ │ │ │ ├── bg.js │ │ │ │ ├── bn.js │ │ │ │ ├── bs.js │ │ │ │ ├── ca.js │ │ │ │ ├── cs.js │ │ │ │ ├── da.js │ │ │ │ ├── de.js │ │ │ │ ├── dsb.js │ │ │ │ ├── el.js │ │ │ │ ├── en.js │ │ │ │ ├── es.js │ │ │ │ ├── et.js │ │ │ │ ├── eu.js │ │ │ │ ├── fa.js │ │ │ │ ├── fi.js │ │ │ │ ├── fr.js │ │ │ │ ├── gl.js │ │ │ │ ├── he.js │ │ │ │ ├── hi.js │ │ │ │ ├── hr.js │ │ │ │ ├── hsb.js │ │ │ │ ├── hu.js │ │ │ │ ├── hy.js │ │ │ │ ├── id.js │ │ │ │ ├── is.js │ │ │ │ ├── it.js │ │ │ │ ├── ja.js │ │ │ │ ├── ka.js │ │ │ │ ├── km.js │ │ │ │ ├── ko.js │ │ │ │ ├── lt.js │ │ │ │ ├── lv.js │ │ │ │ ├── mk.js │ │ │ │ ├── ms.js │ │ │ │ ├── nb.js │ │ │ │ ├── ne.js │ │ │ │ ├── nl.js │ │ │ │ ├── pl.js │ │ │ │ ├── ps.js │ │ │ │ ├── pt-BR.js │ │ │ │ ├── pt.js │ │ │ │ ├── ro.js │ │ │ │ ├── ru.js │ │ │ │ ├── sk.js │ │ │ │ ├── sl.js │ │ │ │ ├── sq.js │ │ │ │ ├── sr-Cyrl.js │ │ │ │ ├── sr.js │ │ │ │ ├── sv.js │ │ │ │ ├── th.js │ │ │ │ ├── tk.js │ │ │ │ ├── tr.js │ │ │ │ ├── uk.js │ │ │ │ ├── vi.js │ │ │ │ ├── zh-CN.js │ │ │ │ └── zh-TW.js │ │ │ ├── select2.full.js │ │ │ └── select2.full.min.js │ │ │ └── xregexp │ │ │ ├── LICENSE.txt │ │ │ ├── xregexp.js │ │ │ └── xregexp.min.js │ └── common │ │ └── css │ │ └── base.css └── templates │ ├── 403.html │ ├── 404.html │ ├── base.html │ └── registration │ ├── logged_out.html │ ├── login.html │ ├── password_reset_complete.html │ ├── password_reset_confirm.html │ ├── password_reset_done.html │ └── password_reset_form.html ├── doc └── img │ ├── Site_administration_Django_site_admin.png │ └── localhost.png ├── docker-compose.yml ├── nginx └── conf │ └── nginx.conf ├── postgres └── docker-entrypoint-initdb.d │ └── myproject_web.sh ├── requirements.txt └── set_venv.sh /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Python CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-python/ for more details 4 | # 5 | version: 2 6 | jobs: 7 | build: 8 | docker: 9 | # specify the version you desire here 10 | # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` 11 | - image: circleci/python:3.7.7 12 | 13 | # Specify service dependencies here if necessary 14 | # CircleCI maintains a library of pre-built images 15 | # documented at https://circleci.com/docs/2.0/circleci-images/ 16 | # - image: circleci/postgres:9.4 17 | 18 | working_directory: ~/repo 19 | 20 | steps: 21 | - checkout 22 | - run: 23 | name: "Pull Submodules" 24 | command: | 25 | git submodule init 26 | git submodule update --remote 27 | # Download and cache dependencies 28 | - restore_cache: 29 | keys: 30 | - v1-dependencies-{{ checksum "requirements.txt" }} 31 | # fallback to using the latest cache if no exact match is found 32 | - v1-dependencies- 33 | 34 | - run: 35 | name: install dependencies 36 | command: | 37 | python3 -m venv venv 38 | . venv/bin/activate 39 | pip install --upgrade pip 40 | pip install -r requirements.txt 41 | 42 | - save_cache: 43 | paths: 44 | - ./venv 45 | key: v1-dependencies-{{ checksum "requirements.txt" }} 46 | 47 | # run tests! 48 | # this example uses Django's built-in test-runner 49 | # other common Python testing frameworks include pytest and nose 50 | # https://pytest.org 51 | # https://nose.readthedocs.io 52 | - run: 53 | name: run tests 54 | command: | 55 | . venv/bin/activate 56 | python djangopj/manage.py test 57 | 58 | - store_artifacts: 59 | path: test-reports 60 | destination: test-reports 61 | 62 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.py[cod] 3 | _data 4 | _log 5 | __pycache__/ 6 | venv 7 | sent_emails 8 | -------------------------------------------------------------------------------- /CHANGES.md: -------------------------------------------------------------------------------- 1 | # v2.1.0 2 | - DB_HOST & DB_PORT is also parameterized using .env 3 | - docker-compose is now instructed to be used with --env-file=djangopj/.env 4 | 5 | # v2.0.2 6 | - Removed unnecessary debug information 7 | 8 | # v2.0.1 9 | - Force to use requirements.txt for creation of docker image instead of defining in Dockerfile 10 | - Use hardlink for .env instead of symbolic link consideriong deployment 11 | - Added not to use postgres user at the timing of creation of database 12 | 13 | # v2.0.0 14 | - Version up of software 15 | - OS: Alaminux instead of CentOS 16 | - Django 4.0 instead of Django 3.x 17 | - PostgreSQL 14 instead of PostgreSQL 12 18 | - Adoption of .env instead of writing value directly in docker-compose.yml & settings.py 19 | - Persistent data volume 20 | 21 | # v1.6.0 22 | Added some helpful functions for starting djang project to default status. 23 | - User Authentification 24 | - List page with pagination as example 25 | - Data loader as example 26 | - Responsive design 27 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM almalinux 2 | MAINTAINER Hajime Kurita 3 | 4 | # Setup 5 | RUN yes | rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* 6 | RUN yes | dnf install epel-release 7 | RUN yes | dnf update -y 8 | RUN yes | dnf install python3 9 | RUN yes | dnf install libpq-devel 10 | RUN yes | dnf install python3-devel 11 | 12 | # RUN yes | dnf module disable postgresql; 13 | # RUN yes | dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm; 14 | RUN yes | dnf -y install postgresql; 15 | RUN yes | dnf -y install postgresql-devel; 16 | RUN yes | dnf install gcc; 17 | 18 | RUN python3 -m pip install --user --upgrade pip 19 | 20 | COPY ./requirements.txt /tmp/ 21 | RUN python3 -m pip install -r /tmp/requirements.txt 22 | 23 | ENV PJ djangopj 24 | RUN mkdir -p /var/www/$PJ 25 | WORKDIR /var/www/$PJ 26 | COPY $PJ /var/www/$PJ 27 | RUN mkdir -p /var/www/$PJ/static/admin 28 | 29 | ENV PYTHONUNBUFFERED 1 30 | -------------------------------------------------------------------------------- /bin/countriesDataLoader.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import fileinput 3 | from pprint import pprint 4 | from csv import DictReader 5 | import re 6 | 7 | class countriesDataLoader: 8 | def __init__(self): 9 | self.file = '../data/countries.tsv' 10 | self.countryKey2population = { } 11 | self.langs = [] 12 | 13 | def loadCountries(self): 14 | self.countryKey2countryName = {} 15 | location2lang = {} 16 | with open(self.file) as rfh: 17 | line_cnt = 0 18 | countryKeyLocation = 0 19 | populationLocation = 0 20 | for line in rfh: 21 | items = line.strip().split("\t") 22 | # Location is fixed 23 | country_name = items[0] 24 | countryKey = items[3] 25 | location_cnt = 0 26 | if line_cnt == 0: 27 | for item in items: 28 | matches = re.findall(r'^lang:([a-z][a-z])/(.*)$', item) 29 | if matches: 30 | lang_code = matches[0][0] 31 | lang_desc = matches[0][1] 32 | location2lang[location_cnt] = lang_code 33 | self.countryKey2countryName[lang_code] = { } 34 | self.langs.append(lang_code) 35 | elif item == "Top Level Domain": 36 | countryKeyLocation = location_cnt 37 | elif item == "population": 38 | populationLocation = location_cnt 39 | location_cnt += 1 40 | else: 41 | for item in items: 42 | if location_cnt == countryKeyLocation: 43 | self.lcCountryName2countryKey[country_name.lower()] = item 44 | elif location_cnt == populationLocation: 45 | if item: 46 | self.countryKey2population[countryKey] = int(item.replace(",", "").strip()) 47 | elif location_cnt in location2lang: 48 | self.countryKey2countryName[location2lang[location_cnt]][countryKey] = item 49 | location_cnt += 1 50 | line_cnt += 1 51 | 52 | def run(self): 53 | self.loadCountries() 54 | 55 | if __name__ == '__main__': 56 | countriesDataLoader = countriesDataLoader() 57 | countriesDataLoader.run() 58 | -------------------------------------------------------------------------------- /djangopj/.env_example_en: -------------------------------------------------------------------------------- 1 | DB_NAME=example 2 | DB_HOST=postgres_by_1stclass 3 | DB_PORT=5432 4 | 5 | # You should use postgres user at the timing of database creation because this is only assured user to have the privilege. 6 | # You can change this after you made database and added new user to postgresql with proper priviledge if necessary. 7 | POSTGRES_USER=postgres 8 | 9 | POSTGRES_PASSWORD=example_password2020 10 | LANGUAGE_CODE=en-us 11 | TIME_ZONE=UTC 12 | -------------------------------------------------------------------------------- /djangopj/.env_example_jp: -------------------------------------------------------------------------------- 1 | DB_NAME=example 2 | DB_HOST=postgres_by_1stclass 3 | DB_PORT=5432 4 | 5 | # このユーザー名はデータベースを立ち上げた後に、PostgreSQLに適切なユーザーを追加・設定したら変更が可能です 6 | # それまでは変えないで下さい 7 | POSTGRES_USER=postgres 8 | 9 | POSTGRES_PASSWORD=example_password2020 10 | LANGUAGE_CODE=ja 11 | TIME_ZONE=Asia/Tokyo 12 | -------------------------------------------------------------------------------- /djangopj/.env_example_zh: -------------------------------------------------------------------------------- 1 | DB_NAME=example 2 | DB_HOST=postgres_by_1stclass 3 | DB_PORT=5432 4 | 5 | # このユーザー名はデータベースを立ち上げた後に、PostgreSQLに適切なユーザーを追加・設定したら変更が可能です 6 | # それまでは変えないで下さい 7 | POSTGRES_USER=postgres 8 | 9 | POSTGRES_PASSWORD=example_password2020 10 | LANGUAGE_CODE=zh-hans 11 | TIME_ZONE=Asia/Shanghai 12 | -------------------------------------------------------------------------------- /djangopj/accounts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/djangopj/accounts/__init__.py -------------------------------------------------------------------------------- /djangopj/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /djangopj/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | name = 'accounts' 6 | -------------------------------------------------------------------------------- /djangopj/accounts/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/djangopj/accounts/migrations/__init__.py -------------------------------------------------------------------------------- /djangopj/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /djangopj/accounts/templates/accounts/signup.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 |

Sign up

5 |
6 |
7 | {% csrf_token %} 8 | {{ form.as_p }} 9 | 10 |
11 |
12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /djangopj/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /djangopj/accounts/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | app_name = 'accounts' 5 | 6 | urlpatterns = [ 7 | path('signup/', views.SignUpView.as_view(), name='signup'), 8 | ] -------------------------------------------------------------------------------- /djangopj/accounts/views.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.forms import UserCreationForm 2 | from django.urls import reverse_lazy 3 | from django.views import generic 4 | 5 | 6 | class SignUpView(generic.CreateView): 7 | form_class = UserCreationForm 8 | success_url = reverse_lazy('login') 9 | template_name = 'accounts/signup.html' 10 | -------------------------------------------------------------------------------- /djangopj/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/djangopj/db.sqlite3 -------------------------------------------------------------------------------- /djangopj/djangopj/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/djangopj/djangopj/__init__.py -------------------------------------------------------------------------------- /djangopj/djangopj/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for djangopj project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangopj.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /djangopj/djangopj/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for djangopj project. 3 | 4 | Generated by 'django-admin startproject' using Django 4.0.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/4.0/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '89=b+&iqn49vohxd*g*&6q0#*%e-=9=!cqcnw^we6-ul$7=2^j' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles' 40 | ] 41 | 42 | MIDDLEWARE = [ 43 | 'django.middleware.security.SecurityMiddleware', 44 | 'django.contrib.sessions.middleware.SessionMiddleware', 45 | 'django.middleware.common.CommonMiddleware', 46 | 'django.middleware.csrf.CsrfViewMiddleware', 47 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 48 | 'django.contrib.messages.middleware.MessageMiddleware', 49 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 50 | ] 51 | 52 | ROOT_URLCONF = 'djangopj.urls' 53 | 54 | TEMPLATES = [ 55 | { 56 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 57 | 'DIRS': [], 58 | 'APP_DIRS': True, 59 | 'OPTIONS': { 60 | 'context_processors': [ 61 | 'django.template.context_processors.debug', 62 | 'django.template.context_processors.request', 63 | 'django.contrib.auth.context_processors.auth', 64 | 'django.contrib.messages.context_processors.messages', 65 | ], 66 | }, 67 | }, 68 | ] 69 | 70 | WSGI_APPLICATION = 'djangopj.wsgi.application' 71 | 72 | 73 | # Database 74 | # https://docs.djangoproject.com/en/4.0/ref/settings/#databases 75 | 76 | DATABASES = { 77 | 'default': { 78 | 'ENGINE': 'django.db.backends.sqlite3', 79 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 80 | } 81 | } 82 | 83 | 84 | # Password validation 85 | # https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators 86 | 87 | AUTH_PASSWORD_VALIDATORS = [ 88 | { 89 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 90 | }, 91 | { 92 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 93 | }, 94 | { 95 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 96 | }, 97 | { 98 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 99 | }, 100 | ] 101 | 102 | 103 | # Internationalization 104 | # https://docs.djangoproject.com/en/4.0/topics/i18n/ 105 | 106 | LANGUAGE_CODE = 'en-us' 107 | 108 | TIME_ZONE = 'UTC' 109 | 110 | USE_I18N = True 111 | 112 | USE_L10N = True 113 | 114 | USE_TZ = True 115 | 116 | 117 | # Static files (CSS, JavaScript, Images) 118 | # https://docs.djangoproject.com/en/4.0/howto/static-files/ 119 | 120 | STATIC_URL = '/static/' 121 | 122 | ######## 123 | # Customization by ths repository 124 | import environ 125 | 126 | envfile = os.path.join(BASE_DIR, '.env') 127 | env = environ.Env() 128 | env.read_env(envfile) 129 | 130 | STATIC_ROOT = os.path.join(BASE_DIR, 'static') 131 | 132 | HOSTADDRESS = env("DB_HOST") 133 | HOSTPORT = env("DB_PORT") 134 | DBNAME = env("DB_NAME") 135 | DBUSER = env("POSTGRES_USER") 136 | DBUSERPASS = env("POSTGRES_PASSWORD") 137 | 138 | LANGUAGE_CODE = env('LANGUAGE_CODE') 139 | TIME_ZONE = env('TIME_ZONE') 140 | 141 | DATABASES = { 142 | 'default': { 143 | 'ENGINE': 'django.db.backends.postgresql', 144 | 'NAME': DBNAME, 145 | 'USER': DBUSER, 146 | 'PASSWORD': DBUSERPASS, 147 | 'HOST': HOSTADDRESS, 148 | 'PORT': HOSTPORT 149 | } 150 | } 151 | TEMPLATES = [ 152 | { 153 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 154 | 'DIRS': [os.path.join(BASE_DIR, 'templates')], 155 | 'APP_DIRS': True, 156 | 'OPTIONS': { 157 | 'context_processors': [ 158 | 'django.template.context_processors.debug', 159 | 'django.template.context_processors.request', 160 | 'django.contrib.auth.context_processors.auth', 161 | 'django.contrib.messages.context_processors.messages', 162 | ], 163 | }, 164 | }, 165 | ] 166 | LOGIN_REDIRECT_URL = '/' 167 | INSTALLED_APPS.append('geo.apps.GeoConfig') 168 | INSTALLED_APPS.append('accounts.apps.AccountsConfig') 169 | 170 | # For production purpose, customize this part 171 | EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend" 172 | EMAIL_FILE_PATH = os.path.join(BASE_DIR, "sent_emails") 173 | 174 | # Better for you to customize based on necessity 175 | # LANGUAGE_CODE = 'ja' 176 | # ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '.helloworkplus.com'] 177 | -------------------------------------------------------------------------------- /djangopj/djangopj/urls.py: -------------------------------------------------------------------------------- 1 | """djangopj URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/3.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path, include 18 | from django.conf.urls import url 19 | 20 | urlpatterns = [ 21 | url(r'', include('geo.urls')), 22 | path('accounts/', include('accounts.urls')), 23 | path('accounts/', include('django.contrib.auth.urls')), 24 | path('admin/', admin.site.urls) 25 | ] 26 | -------------------------------------------------------------------------------- /djangopj/djangopj/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for djangopj project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangopj.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /djangopj/geo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/djangopj/geo/__init__.py -------------------------------------------------------------------------------- /djangopj/geo/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | from django.contrib import admin 5 | from .models import Country 6 | from .models import Prefecture 7 | 8 | admin.site.register(Country) 9 | admin.site.register(Prefecture) 10 | -------------------------------------------------------------------------------- /djangopj/geo/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | class GeoConfig(AppConfig): 4 | name = 'geo' 5 | -------------------------------------------------------------------------------- /djangopj/geo/fixtures/country.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "model": "geo.country", 4 | "pk": 1, 5 | "fields": { 6 | "name": "United States", 7 | "key": "us" 8 | } 9 | }, 10 | { 11 | "model": "geo.country", 12 | "pk": 2, 13 | "fields": { 14 | "name": "Japan", 15 | "key": "ja" 16 | } 17 | }, 18 | { 19 | "model": "geo.country", 20 | "pk": 3, 21 | "fields": { 22 | "name": "China", 23 | "key": "cn" 24 | } 25 | }, 26 | { 27 | "model": "geo.country", 28 | "pk": 4, 29 | "fields": { 30 | "name": "Taiwan", 31 | "key": "tw" 32 | } 33 | } 34 | ] -------------------------------------------------------------------------------- /djangopj/geo/fixtures/prefecture.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "model": "geo.prefecture", 4 | "pk": 1, 5 | "fields": { 6 | "name": "New York", 7 | "key": "newyork", 8 | "country":1 9 | } 10 | }, 11 | { 12 | "model": "geo.prefecture", 13 | "pk": 2, 14 | "fields": { 15 | "name": "Alabama", 16 | "key": "alabama", 17 | "country":1 18 | } 19 | }, 20 | { 21 | "model": "geo.prefecture", 22 | "pk": 3, 23 | "fields": { 24 | "name": "Alaska", 25 | "key": "alaska", 26 | "country":1 27 | } 28 | }, 29 | { 30 | "model": "geo.prefecture", 31 | "pk": 4, 32 | "fields": { 33 | "name": "Arizona", 34 | "key": "arizona", 35 | "country":1 36 | } 37 | }, 38 | { 39 | "model": "geo.prefecture", 40 | "pk": 5, 41 | "fields": { 42 | "name": "Arkansas", 43 | "key": "arkansas", 44 | "country":1 45 | } 46 | }, 47 | { 48 | "model": "geo.prefecture", 49 | "pk": 6, 50 | "fields": { 51 | "name": "California", 52 | "key": "california", 53 | "country":1 54 | } 55 | }, 56 | { 57 | "model": "geo.prefecture", 58 | "pk": 7, 59 | "fields": { 60 | "name": "Colorado", 61 | "key": "colorado", 62 | "country":1 63 | } 64 | }, 65 | { 66 | "model": "geo.prefecture", 67 | "pk": 8, 68 | "fields": { 69 | "name": "Connecticut", 70 | "key": "connecticut", 71 | "country":1 72 | } 73 | }, 74 | { 75 | "model": "geo.prefecture", 76 | "pk": 9, 77 | "fields": { 78 | "name": "Delaware", 79 | "key": "delaware", 80 | "country":1 81 | } 82 | }, 83 | { 84 | "model": "geo.prefecture", 85 | "pk": 10, 86 | "fields": { 87 | "name": "Florida", 88 | "key": "florida", 89 | "country":1 90 | } 91 | }, 92 | { 93 | "model": "geo.prefecture", 94 | "pk": 11, 95 | "fields": { 96 | "name": "Georgia", 97 | "key": "georgia", 98 | "country":1 99 | } 100 | }, 101 | { 102 | "model": "geo.prefecture", 103 | "pk": 12, 104 | "fields": { 105 | "name": "Hawaii", 106 | "key": "hawaii", 107 | "country":1 108 | } 109 | }, 110 | { 111 | "model": "geo.prefecture", 112 | "pk": 13, 113 | "fields": { 114 | "name": "Idaho", 115 | "key": "idaho", 116 | "country":1 117 | } 118 | }, 119 | { 120 | "model": "geo.prefecture", 121 | "pk": 14, 122 | "fields": { 123 | "name": "Illinois", 124 | "key": "illinois", 125 | "country":1 126 | } 127 | }, 128 | { 129 | "model": "geo.prefecture", 130 | "pk": 15, 131 | "fields": { 132 | "name": "Indiana", 133 | "key": "indiana", 134 | "country":1 135 | } 136 | }, 137 | { 138 | "model": "geo.prefecture", 139 | "pk": 200, 140 | "fields": { 141 | "name": "Hokkaido", 142 | "key": "hokkaido", 143 | "country":2 144 | } 145 | }, 146 | { 147 | "model": "geo.prefecture", 148 | "pk": 201, 149 | "fields": { 150 | "name": "Aomori", 151 | "key": "aomori", 152 | "country":2 153 | } 154 | }, 155 | { 156 | "model": "geo.prefecture", 157 | "pk": 202, 158 | "fields": { 159 | "name": "Akita", 160 | "key": "akita", 161 | "country":2 162 | } 163 | }, 164 | { 165 | "model": "geo.prefecture", 166 | "pk": 203, 167 | "fields": { 168 | "name": "Iwate", 169 | "key": "iwate", 170 | "country":2 171 | } 172 | }, 173 | { 174 | "model": "geo.prefecture", 175 | "pk": 204, 176 | "fields": { 177 | "name": "Fukushima", 178 | "key": "fukushima", 179 | "country":2 180 | } 181 | }, 182 | { 183 | "model": "geo.prefecture", 184 | "pk": 205, 185 | "fields": { 186 | "name": "Ibaraki", 187 | "key": "ibaraki", 188 | "country":2 189 | } 190 | }, 191 | { 192 | "model": "geo.prefecture", 193 | "pk": 206, 194 | "fields": { 195 | "name": "Chiba", 196 | "key": "chiba", 197 | "country":2 198 | } 199 | }, 200 | { 201 | "model": "geo.prefecture", 202 | "pk": 207, 203 | "fields": { 204 | "name": "Tokyo", 205 | "key": "tokyo", 206 | "country":2 207 | } 208 | }, 209 | { 210 | "model": "geo.prefecture", 211 | "pk": 208, 212 | "fields": { 213 | "name": "Kanagawa", 214 | "key": "kanagawa", 215 | "country":2 216 | } 217 | }, 218 | { 219 | "model": "geo.prefecture", 220 | "pk": 300, 221 | "fields": { 222 | "name": "Hubei", 223 | "key": "hubei", 224 | "country":3 225 | } 226 | }, 227 | { 228 | "model": "geo.prefecture", 229 | "pk": 400, 230 | "fields": { 231 | "name": "Taihoku", 232 | "key": "taihoku", 233 | "country":4 234 | } 235 | } 236 | ] -------------------------------------------------------------------------------- /djangopj/geo/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-06-09 10:11 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='Country', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('name', models.CharField(db_index=True, max_length=255)), 22 | ('key', models.CharField(db_index=True, max_length=2)), 23 | ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, null=True)), 24 | ('modified_at', models.DateTimeField(auto_now=True, db_index=True, null=True)), 25 | ], 26 | options={ 27 | 'verbose_name_plural': 'countries', 28 | }, 29 | ), 30 | migrations.CreateModel( 31 | name='SightseeingSpot', 32 | fields=[ 33 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 34 | ('name', models.CharField(db_index=True, max_length=255)), 35 | ('key', models.CharField(db_index=True, max_length=255)), 36 | ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, null=True)), 37 | ('modified_at', models.DateTimeField(auto_now=True, db_index=True, null=True)), 38 | ('country', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='geo.Country')), 39 | ], 40 | ), 41 | migrations.CreateModel( 42 | name='SightSeeingSpotReview', 43 | fields=[ 44 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 45 | ('name', models.CharField(db_index=True, max_length=255)), 46 | ('key', models.CharField(db_index=True, max_length=255)), 47 | ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, null=True)), 48 | ('modified_at', models.DateTimeField(auto_now=True, db_index=True, null=True)), 49 | ('sightseeingSpot', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='geo.SightseeingSpot')), 50 | ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), 51 | ], 52 | ), 53 | migrations.CreateModel( 54 | name='Prefecture', 55 | fields=[ 56 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 57 | ('name', models.CharField(db_index=True, max_length=255)), 58 | ('key', models.CharField(db_index=True, max_length=255)), 59 | ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, null=True)), 60 | ('modified_at', models.DateTimeField(auto_now=True, db_index=True, null=True)), 61 | ('country', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='geo.Country')), 62 | ], 63 | ), 64 | ] 65 | -------------------------------------------------------------------------------- /djangopj/geo/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/djangopj/geo/migrations/__init__.py -------------------------------------------------------------------------------- /djangopj/geo/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.utils import timezone 3 | from django.contrib.auth.models import User 4 | 5 | class Country(models.Model): 6 | name = models.CharField(max_length=255, db_index=True) 7 | key = models.CharField(max_length=2, db_index=True) 8 | created_at = models.DateTimeField(db_index=True, auto_now_add=True, null=True) 9 | modified_at = models.DateTimeField(db_index=True, auto_now=True, null=True) 10 | 11 | class Meta: 12 | verbose_name_plural = "countries" 13 | 14 | def publish(self): 15 | self.modified_at = timezone.now() 16 | self.save() 17 | 18 | def __str(self): 19 | return self.name 20 | 21 | 22 | class Prefecture(models.Model): 23 | name = models.CharField(max_length=255, db_index=True) 24 | key = models.CharField(max_length=255, db_index=True) 25 | country = models.ForeignKey(Country, on_delete=models.PROTECT, db_index=True) 26 | created_at = models.DateTimeField(db_index=True, auto_now_add=True, null=True) 27 | modified_at = models.DateTimeField(db_index=True, auto_now=True, null=True) 28 | 29 | def publish(self): 30 | self.modified_at = timezone.now() 31 | self.save() 32 | 33 | def __str(self): 34 | return self.name 35 | 36 | class SightseeingSpot(models.Model): 37 | name = models.CharField(max_length=255, db_index=True) 38 | key = models.CharField(max_length=255, db_index=True) 39 | country = models.ForeignKey(Country, on_delete=models.PROTECT, db_index=True) 40 | created_at = models.DateTimeField(db_index=True, auto_now_add=True, null=True) 41 | modified_at = models.DateTimeField(db_index=True, auto_now=True, null=True) 42 | 43 | def publish(self): 44 | self.modified_at = timezone.now() 45 | self.save() 46 | 47 | def __str(self): 48 | return self.name 49 | 50 | class SightSeeingSpotReview(models.Model): 51 | name = models.CharField(max_length=255, db_index=True) 52 | key = models.CharField(max_length=255, db_index=True) 53 | sightseeingSpot = models.ForeignKey(SightseeingSpot, on_delete=models.PROTECT, db_index=True) 54 | user = models.ForeignKey(User, on_delete=models.PROTECT, db_index=True) 55 | created_at = models.DateTimeField(db_index=True, auto_now_add=True, null=True) 56 | modified_at = models.DateTimeField(db_index=True, auto_now=True, null=True) 57 | 58 | def publish(self): 59 | self.modified_at = timezone.now() 60 | self.save() 61 | 62 | def __str(self): 63 | return self.name 64 | -------------------------------------------------------------------------------- /djangopj/geo/templates/geo/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Country list

5 | {% if page_obj %} 6 | 11 | {% else %} 12 |

No countries are available.
13 | Please follow instructions of README.md to import default data.
14 | ex. 15 |

16 | dweb python3 manage.py loaddata geo/fixtures/country.json;
17 | dweb python3 manage.py loaddata geo/fixtures/state.json;
18 | 
19 |

20 | {% endif %} 21 | 22 | 39 | {% endblock %} 40 | -------------------------------------------------------------------------------- /djangopj/geo/templates/geo/prefectures.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Prefectures list of {{ country_obj.name }}

5 | 6 | {% if page_obj %} 7 | 12 | {% else %} 13 | No states information for this country. 14 | {% endif %} 15 | 16 | 33 |
34 | Go back to country list. 35 | {% endblock %} -------------------------------------------------------------------------------- /djangopj/geo/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /djangopj/geo/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | from django.urls import path, include 3 | 4 | from . import views 5 | 6 | urlpatterns = [ 7 | url(r'^$', views.index, name='geo_index'), 8 | path('countries//', views.country_detail, name='country_detail') 9 | ] -------------------------------------------------------------------------------- /djangopj/geo/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from .models import Country 3 | from .models import Prefecture 4 | from pprint import pprint 5 | from django.core.paginator import Paginator 6 | 7 | # Create your views here. 8 | def index(request): 9 | pgsz = 3 10 | country_list = Country.objects.order_by('name') 11 | paginator = Paginator(country_list, pgsz) 12 | page_number = request.GET.get('page') 13 | page_obj = paginator.get_page(page_number) 14 | return render(request, 'geo/index.html', { 'page_obj': page_obj }) 15 | 16 | def country_detail(request, countryKey): 17 | pgsz = 3 18 | countrySingleRecord = Country.objects.get(key=countryKey) 19 | prefecture_list = Prefecture.objects.filter(country=countrySingleRecord.id).order_by('name') 20 | paginator = Paginator(prefecture_list, pgsz) 21 | page_number = request.GET.get('page') 22 | page_obj = paginator.get_page(page_number) 23 | return render(request, 'geo/prefectures.html', { 'page_obj': page_obj, 'country_obj':countrySingleRecord }) 24 | -------------------------------------------------------------------------------- /djangopj/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangopj.settings') 9 | try: 10 | from django.core.management import execute_from_command_line 11 | except ImportError as exc: 12 | raise ImportError( 13 | "Couldn't import Django. Are you sure it's installed and " 14 | "available on your PYTHONPATH environment variable? Did you " 15 | "forget to activate a virtual environment?" 16 | ) from exc 17 | execute_from_command_line(sys.argv) 18 | 19 | 20 | if __name__ == '__main__': 21 | main() 22 | -------------------------------------------------------------------------------- /djangopj/static/admin/css/changelists.css: -------------------------------------------------------------------------------- 1 | /* CHANGELISTS */ 2 | 3 | #changelist { 4 | display: flex; 5 | align-items: flex-start; 6 | justify-content: space-between; 7 | } 8 | 9 | #changelist .changelist-form-container { 10 | flex: 1 1 auto; 11 | min-width: 0; 12 | } 13 | 14 | #changelist table { 15 | width: 100%; 16 | } 17 | 18 | .change-list .hiddenfields { display:none; } 19 | 20 | .change-list .filtered table { 21 | border-right: none; 22 | } 23 | 24 | .change-list .filtered { 25 | min-height: 400px; 26 | } 27 | 28 | .change-list .filtered .results, .change-list .filtered .paginator, 29 | .filtered #toolbar, .filtered div.xfull { 30 | width: auto; 31 | } 32 | 33 | .change-list .filtered table tbody th { 34 | padding-right: 1em; 35 | } 36 | 37 | #changelist-form .results { 38 | overflow-x: auto; 39 | width: 100%; 40 | } 41 | 42 | #changelist .toplinks { 43 | border-bottom: 1px solid var(--hairline-color); 44 | } 45 | 46 | #changelist .paginator { 47 | color: var(--body-quiet-color); 48 | border-bottom: 1px solid var(--hairline-color); 49 | background: var(--body-bg); 50 | overflow: hidden; 51 | } 52 | 53 | /* CHANGELIST TABLES */ 54 | 55 | #changelist table thead th { 56 | padding: 0; 57 | white-space: nowrap; 58 | vertical-align: middle; 59 | } 60 | 61 | #changelist table thead th.action-checkbox-column { 62 | width: 1.5em; 63 | text-align: center; 64 | } 65 | 66 | #changelist table tbody td.action-checkbox { 67 | text-align: center; 68 | } 69 | 70 | #changelist table tfoot { 71 | color: var(--body-quiet-color); 72 | } 73 | 74 | /* TOOLBAR */ 75 | 76 | #toolbar { 77 | padding: 8px 10px; 78 | margin-bottom: 15px; 79 | border-top: 1px solid var(--hairline-color); 80 | border-bottom: 1px solid var(--hairline-color); 81 | background: var(--darkened-bg); 82 | color: var(--body-quiet-color); 83 | } 84 | 85 | #toolbar form input { 86 | border-radius: 4px; 87 | font-size: 14px; 88 | padding: 5px; 89 | color: var(--body-fg); 90 | } 91 | 92 | #toolbar #searchbar { 93 | height: 19px; 94 | border: 1px solid var(--border-color); 95 | padding: 2px 5px; 96 | margin: 0; 97 | vertical-align: top; 98 | font-size: 13px; 99 | max-width: 100%; 100 | } 101 | 102 | #toolbar #searchbar:focus { 103 | border-color: var(--body-quiet-color); 104 | } 105 | 106 | #toolbar form input[type="submit"] { 107 | border: 1px solid var(--border-color); 108 | font-size: 13px; 109 | padding: 4px 8px; 110 | margin: 0; 111 | vertical-align: middle; 112 | background: var(--body-bg); 113 | box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset; 114 | cursor: pointer; 115 | color: var(--body-fg); 116 | } 117 | 118 | #toolbar form input[type="submit"]:focus, 119 | #toolbar form input[type="submit"]:hover { 120 | border-color: var(--body-quiet-color); 121 | } 122 | 123 | #changelist-search img { 124 | vertical-align: middle; 125 | margin-right: 4px; 126 | } 127 | 128 | #changelist-search .help { 129 | word-break: break-word; 130 | } 131 | 132 | /* FILTER COLUMN */ 133 | 134 | #changelist-filter { 135 | flex: 0 0 240px; 136 | order: 1; 137 | background: var(--darkened-bg); 138 | border-left: none; 139 | margin: 0 0 0 30px; 140 | } 141 | 142 | #changelist-filter h2 { 143 | font-size: 14px; 144 | text-transform: uppercase; 145 | letter-spacing: 0.5px; 146 | padding: 5px 15px; 147 | margin-bottom: 12px; 148 | border-bottom: none; 149 | } 150 | 151 | #changelist-filter h3 { 152 | font-weight: 400; 153 | padding: 0 15px; 154 | margin-bottom: 10px; 155 | } 156 | 157 | #changelist-filter ul { 158 | margin: 5px 0; 159 | padding: 0 15px 15px; 160 | border-bottom: 1px solid var(--hairline-color); 161 | } 162 | 163 | #changelist-filter ul:last-child { 164 | border-bottom: none; 165 | } 166 | 167 | #changelist-filter li { 168 | list-style-type: none; 169 | margin-left: 0; 170 | padding-left: 0; 171 | } 172 | 173 | #changelist-filter a { 174 | display: block; 175 | color: var(--body-quiet-color); 176 | text-overflow: ellipsis; 177 | overflow-x: hidden; 178 | } 179 | 180 | #changelist-filter li.selected { 181 | border-left: 5px solid var(--hairline-color); 182 | padding-left: 10px; 183 | margin-left: -15px; 184 | } 185 | 186 | #changelist-filter li.selected a { 187 | color: var(--link-selected-fg); 188 | } 189 | 190 | #changelist-filter a:focus, #changelist-filter a:hover, 191 | #changelist-filter li.selected a:focus, 192 | #changelist-filter li.selected a:hover { 193 | color: var(--link-hover-color); 194 | } 195 | 196 | #changelist-filter #changelist-filter-clear a { 197 | font-size: 13px; 198 | padding-bottom: 10px; 199 | border-bottom: 1px solid var(--hairline-color); 200 | } 201 | 202 | /* DATE DRILLDOWN */ 203 | 204 | .change-list ul.toplinks { 205 | display: block; 206 | float: left; 207 | padding: 0; 208 | margin: 0; 209 | width: 100%; 210 | } 211 | 212 | .change-list ul.toplinks li { 213 | padding: 3px 6px; 214 | font-weight: bold; 215 | list-style-type: none; 216 | display: inline-block; 217 | } 218 | 219 | .change-list ul.toplinks .date-back a { 220 | color: var(--body-quiet-color); 221 | } 222 | 223 | .change-list ul.toplinks .date-back a:focus, 224 | .change-list ul.toplinks .date-back a:hover { 225 | color: var(--link-hover-color); 226 | } 227 | 228 | /* PAGINATOR */ 229 | 230 | .paginator { 231 | font-size: 13px; 232 | padding-top: 10px; 233 | padding-bottom: 10px; 234 | line-height: 22px; 235 | margin: 0; 236 | border-top: 1px solid var(--hairline-color); 237 | width: 100%; 238 | } 239 | 240 | .paginator a:link, .paginator a:visited { 241 | padding: 2px 6px; 242 | background: var(--button-bg); 243 | text-decoration: none; 244 | color: var(--button-fg); 245 | } 246 | 247 | .paginator a.showall { 248 | border: none; 249 | background: none; 250 | color: var(--link-fg); 251 | } 252 | 253 | .paginator a.showall:focus, .paginator a.showall:hover { 254 | background: none; 255 | color: var(--link-hover-color); 256 | } 257 | 258 | .paginator .end { 259 | margin-right: 6px; 260 | } 261 | 262 | .paginator .this-page { 263 | padding: 2px 6px; 264 | font-weight: bold; 265 | font-size: 13px; 266 | vertical-align: top; 267 | } 268 | 269 | .paginator a:focus, .paginator a:hover { 270 | color: white; 271 | background: var(--link-hover-color); 272 | } 273 | 274 | /* ACTIONS */ 275 | 276 | .filtered .actions { 277 | border-right: none; 278 | } 279 | 280 | #changelist table input { 281 | margin: 0; 282 | vertical-align: baseline; 283 | } 284 | 285 | #changelist table tbody tr.selected { 286 | background-color: var(--selected-row); 287 | } 288 | 289 | #changelist .actions { 290 | padding: 10px; 291 | background: var(--body-bg); 292 | border-top: none; 293 | border-bottom: none; 294 | line-height: 24px; 295 | color: var(--body-quiet-color); 296 | width: 100%; 297 | } 298 | 299 | #changelist .actions.selected { /* XXX Probably unused? */ 300 | background: var(--body-bg); 301 | border-top: 1px solid var(--body-bg); 302 | border-bottom: 1px solid #edecd6; 303 | } 304 | 305 | #changelist .actions span.all, 306 | #changelist .actions span.action-counter, 307 | #changelist .actions span.clear, 308 | #changelist .actions span.question { 309 | font-size: 13px; 310 | margin: 0 0.5em; 311 | } 312 | 313 | #changelist .actions:last-child { 314 | border-bottom: none; 315 | } 316 | 317 | #changelist .actions select { 318 | vertical-align: top; 319 | height: 24px; 320 | color: var(--body-fg); 321 | border: 1px solid var(--border-color); 322 | border-radius: 4px; 323 | font-size: 14px; 324 | padding: 0 0 0 4px; 325 | margin: 0; 326 | margin-left: 10px; 327 | } 328 | 329 | #changelist .actions select:focus { 330 | border-color: var(--body-quiet-color); 331 | } 332 | 333 | #changelist .actions label { 334 | display: inline-block; 335 | vertical-align: middle; 336 | font-size: 13px; 337 | } 338 | 339 | #changelist .actions .button { 340 | font-size: 13px; 341 | border: 1px solid var(--border-color); 342 | border-radius: 4px; 343 | background: var(--body-bg); 344 | box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset; 345 | cursor: pointer; 346 | height: 24px; 347 | line-height: 1; 348 | padding: 4px 8px; 349 | margin: 0; 350 | color: var(--body-fg); 351 | } 352 | 353 | #changelist .actions .button:focus, #changelist .actions .button:hover { 354 | border-color: var(--body-quiet-color); 355 | } 356 | -------------------------------------------------------------------------------- /djangopj/static/admin/css/dashboard.css: -------------------------------------------------------------------------------- 1 | /* DASHBOARD */ 2 | 3 | .dashboard .module table th { 4 | width: 100%; 5 | } 6 | 7 | .dashboard .module table td { 8 | white-space: nowrap; 9 | } 10 | 11 | .dashboard .module table td a { 12 | display: block; 13 | padding-right: .6em; 14 | } 15 | 16 | /* RECENT ACTIONS MODULE */ 17 | 18 | .module ul.actionlist { 19 | margin-left: 0; 20 | } 21 | 22 | ul.actionlist li { 23 | list-style-type: none; 24 | overflow: hidden; 25 | text-overflow: ellipsis; 26 | } 27 | -------------------------------------------------------------------------------- /djangopj/static/admin/css/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Roboto'; 3 | src: url('../fonts/Roboto-Bold-webfont.woff'); 4 | font-weight: 700; 5 | font-style: normal; 6 | } 7 | 8 | @font-face { 9 | font-family: 'Roboto'; 10 | src: url('../fonts/Roboto-Regular-webfont.woff'); 11 | font-weight: 400; 12 | font-style: normal; 13 | } 14 | 15 | @font-face { 16 | font-family: 'Roboto'; 17 | src: url('../fonts/Roboto-Light-webfont.woff'); 18 | font-weight: 300; 19 | font-style: normal; 20 | } 21 | -------------------------------------------------------------------------------- /djangopj/static/admin/css/login.css: -------------------------------------------------------------------------------- 1 | /* LOGIN FORM */ 2 | 3 | .login { 4 | background: var(--darkened-bg); 5 | height: auto; 6 | } 7 | 8 | .login #header { 9 | height: auto; 10 | padding: 15px 16px; 11 | justify-content: center; 12 | } 13 | 14 | .login #header h1 { 15 | font-size: 18px; 16 | margin: 0; 17 | } 18 | 19 | .login #header h1 a { 20 | color: var(--header-link-color); 21 | } 22 | 23 | .login #content { 24 | padding: 20px 20px 0; 25 | } 26 | 27 | .login #container { 28 | background: var(--body-bg); 29 | border: 1px solid var(--hairline-color); 30 | border-radius: 4px; 31 | overflow: hidden; 32 | width: 28em; 33 | min-width: 300px; 34 | margin: 100px auto; 35 | height: auto; 36 | } 37 | 38 | .login .form-row { 39 | padding: 4px 0; 40 | } 41 | 42 | .login .form-row label { 43 | display: block; 44 | line-height: 2em; 45 | } 46 | 47 | .login .form-row #id_username, .login .form-row #id_password { 48 | padding: 8px; 49 | width: 100%; 50 | box-sizing: border-box; 51 | } 52 | 53 | .login .submit-row { 54 | padding: 1em 0 0 0; 55 | margin: 0; 56 | text-align: center; 57 | } 58 | 59 | .login .password-reset-link { 60 | text-align: center; 61 | } 62 | -------------------------------------------------------------------------------- /djangopj/static/admin/css/nav_sidebar.css: -------------------------------------------------------------------------------- 1 | .sticky { 2 | position: sticky; 3 | top: 0; 4 | max-height: 100vh; 5 | } 6 | 7 | .toggle-nav-sidebar { 8 | z-index: 20; 9 | left: 0; 10 | display: flex; 11 | align-items: center; 12 | justify-content: center; 13 | flex: 0 0 23px; 14 | width: 23px; 15 | border: 0; 16 | border-right: 1px solid var(--hairline-color); 17 | background-color: var(--body-bg); 18 | cursor: pointer; 19 | font-size: 20px; 20 | color: var(--link-fg); 21 | padding: 0; 22 | } 23 | 24 | [dir="rtl"] .toggle-nav-sidebar { 25 | border-left: 1px solid var(--hairline-color); 26 | border-right: 0; 27 | } 28 | 29 | .toggle-nav-sidebar:hover, 30 | .toggle-nav-sidebar:focus { 31 | background-color: var(--darkened-bg); 32 | } 33 | 34 | #nav-sidebar { 35 | z-index: 15; 36 | flex: 0 0 275px; 37 | left: -276px; 38 | margin-left: -276px; 39 | border-top: 1px solid transparent; 40 | border-right: 1px solid var(--hairline-color); 41 | background-color: var(--body-bg); 42 | overflow: auto; 43 | } 44 | 45 | [dir="rtl"] #nav-sidebar { 46 | border-left: 1px solid var(--hairline-color); 47 | border-right: 0; 48 | left: 0; 49 | margin-left: 0; 50 | right: -276px; 51 | margin-right: -276px; 52 | } 53 | 54 | .toggle-nav-sidebar::before { 55 | content: '\00BB'; 56 | } 57 | 58 | .main.shifted .toggle-nav-sidebar::before { 59 | content: '\00AB'; 60 | } 61 | 62 | .main.shifted > #nav-sidebar { 63 | margin-left: 0; 64 | } 65 | 66 | [dir="rtl"] .main.shifted > #nav-sidebar { 67 | margin-right: 0; 68 | } 69 | 70 | #nav-sidebar .module th { 71 | width: 100%; 72 | overflow-wrap: anywhere; 73 | } 74 | 75 | #nav-sidebar .module th, 76 | #nav-sidebar .module caption { 77 | padding-left: 16px; 78 | } 79 | 80 | #nav-sidebar .module td { 81 | white-space: nowrap; 82 | } 83 | 84 | [dir="rtl"] #nav-sidebar .module th, 85 | [dir="rtl"] #nav-sidebar .module caption { 86 | padding-left: 8px; 87 | padding-right: 16px; 88 | } 89 | 90 | #nav-sidebar .current-app .section:link, 91 | #nav-sidebar .current-app .section:visited { 92 | color: var(--header-color); 93 | font-weight: bold; 94 | } 95 | 96 | #nav-sidebar .current-model { 97 | background: var(--selected-row); 98 | } 99 | 100 | .main > #nav-sidebar + .content { 101 | max-width: calc(100% - 23px); 102 | } 103 | 104 | .main.shifted > #nav-sidebar + .content { 105 | max-width: calc(100% - 299px); 106 | } 107 | 108 | @media (max-width: 767px) { 109 | #nav-sidebar, #toggle-nav-sidebar { 110 | display: none; 111 | } 112 | 113 | .main > #nav-sidebar + .content, 114 | .main.shifted > #nav-sidebar + .content { 115 | max-width: 100%; 116 | } 117 | } 118 | 119 | #nav-filter { 120 | width: 100%; 121 | box-sizing: border-box; 122 | padding: 2px 5px; 123 | margin: 5px 0; 124 | border: 1px solid var(--border-color); 125 | background-color: var(--darkened-bg); 126 | color: var(--body-fg); 127 | } 128 | 129 | #nav-filter:focus { 130 | border-color: var(--body-quiet-color); 131 | } 132 | 133 | #nav-filter.no-results { 134 | background: var(--message-error-bg); 135 | } 136 | 137 | #nav-sidebar table { 138 | width: 100%; 139 | } 140 | -------------------------------------------------------------------------------- /djangopj/static/admin/css/responsive_rtl.css: -------------------------------------------------------------------------------- 1 | /* TABLETS */ 2 | 3 | @media (max-width: 1024px) { 4 | [dir="rtl"] .colMS { 5 | margin-right: 0; 6 | } 7 | 8 | [dir="rtl"] #user-tools { 9 | text-align: right; 10 | } 11 | 12 | [dir="rtl"] #changelist .actions label { 13 | padding-left: 10px; 14 | padding-right: 0; 15 | } 16 | 17 | [dir="rtl"] #changelist .actions select { 18 | margin-left: 0; 19 | margin-right: 15px; 20 | } 21 | 22 | [dir="rtl"] .change-list .filtered .results, 23 | [dir="rtl"] .change-list .filtered .paginator, 24 | [dir="rtl"] .filtered #toolbar, 25 | [dir="rtl"] .filtered div.xfull, 26 | [dir="rtl"] .filtered .actions, 27 | [dir="rtl"] #changelist-filter { 28 | margin-left: 0; 29 | } 30 | 31 | [dir="rtl"] .inline-group ul.tools a.add, 32 | [dir="rtl"] .inline-group div.add-row a, 33 | [dir="rtl"] .inline-group .tabular tr.add-row td a { 34 | padding: 8px 26px 8px 10px; 35 | background-position: calc(100% - 8px) 9px; 36 | } 37 | 38 | [dir="rtl"] .related-widget-wrapper-link + .selector { 39 | margin-right: 0; 40 | margin-left: 15px; 41 | } 42 | 43 | [dir="rtl"] .selector .selector-filter label { 44 | margin-right: 0; 45 | margin-left: 8px; 46 | } 47 | 48 | [dir="rtl"] .object-tools li { 49 | float: right; 50 | } 51 | 52 | [dir="rtl"] .object-tools li + li { 53 | margin-left: 0; 54 | margin-right: 15px; 55 | } 56 | 57 | [dir="rtl"] .dashboard .module table td a { 58 | padding-left: 0; 59 | padding-right: 16px; 60 | } 61 | } 62 | 63 | /* MOBILE */ 64 | 65 | @media (max-width: 767px) { 66 | [dir="rtl"] .aligned .related-lookup, 67 | [dir="rtl"] .aligned .datetimeshortcuts { 68 | margin-left: 0; 69 | margin-right: 15px; 70 | } 71 | 72 | [dir="rtl"] .aligned ul { 73 | margin-right: 0; 74 | } 75 | 76 | [dir="rtl"] #changelist-filter { 77 | margin-left: 0; 78 | margin-right: 0; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /djangopj/static/admin/css/rtl.css: -------------------------------------------------------------------------------- 1 | /* GLOBAL */ 2 | 3 | th { 4 | text-align: right; 5 | } 6 | 7 | .module h2, .module caption { 8 | text-align: right; 9 | } 10 | 11 | .module ul, .module ol { 12 | margin-left: 0; 13 | margin-right: 1.5em; 14 | } 15 | 16 | .viewlink, .addlink, .changelink { 17 | padding-left: 0; 18 | padding-right: 16px; 19 | background-position: 100% 1px; 20 | } 21 | 22 | .deletelink { 23 | padding-left: 0; 24 | padding-right: 16px; 25 | background-position: 100% 1px; 26 | } 27 | 28 | .object-tools { 29 | float: left; 30 | } 31 | 32 | thead th:first-child, 33 | tfoot td:first-child { 34 | border-left: none; 35 | } 36 | 37 | /* LAYOUT */ 38 | 39 | #user-tools { 40 | right: auto; 41 | left: 0; 42 | text-align: left; 43 | } 44 | 45 | div.breadcrumbs { 46 | text-align: right; 47 | } 48 | 49 | #content-main { 50 | float: right; 51 | } 52 | 53 | #content-related { 54 | float: left; 55 | margin-left: -300px; 56 | margin-right: auto; 57 | } 58 | 59 | .colMS { 60 | margin-left: 300px; 61 | margin-right: 0; 62 | } 63 | 64 | /* SORTABLE TABLES */ 65 | 66 | table thead th.sorted .sortoptions { 67 | float: left; 68 | } 69 | 70 | thead th.sorted .text { 71 | padding-right: 0; 72 | padding-left: 42px; 73 | } 74 | 75 | /* dashboard styles */ 76 | 77 | .dashboard .module table td a { 78 | padding-left: .6em; 79 | padding-right: 16px; 80 | } 81 | 82 | /* changelists styles */ 83 | 84 | .change-list .filtered table { 85 | border-left: none; 86 | border-right: 0px none; 87 | } 88 | 89 | #changelist-filter { 90 | border-left: none; 91 | border-right: none; 92 | margin-left: 0; 93 | margin-right: 30px; 94 | } 95 | 96 | #changelist-filter li.selected { 97 | border-left: none; 98 | padding-left: 10px; 99 | margin-left: 0; 100 | border-right: 5px solid var(--hairline-color); 101 | padding-right: 10px; 102 | margin-right: -15px; 103 | } 104 | 105 | #changelist table tbody td:first-child, #changelist table tbody th:first-child { 106 | border-right: none; 107 | border-left: none; 108 | } 109 | 110 | /* FORMS */ 111 | 112 | .aligned label { 113 | padding: 0 0 3px 1em; 114 | float: right; 115 | } 116 | 117 | .submit-row { 118 | text-align: left 119 | } 120 | 121 | .submit-row p.deletelink-box { 122 | float: right; 123 | } 124 | 125 | .submit-row input.default { 126 | margin-left: 0; 127 | } 128 | 129 | .vDateField, .vTimeField { 130 | margin-left: 2px; 131 | } 132 | 133 | .aligned .form-row input { 134 | margin-left: 5px; 135 | } 136 | 137 | form .aligned p.help, form .aligned div.help { 138 | clear: right; 139 | } 140 | 141 | form .aligned ul { 142 | margin-right: 163px; 143 | margin-left: 0; 144 | } 145 | 146 | form ul.inline li { 147 | float: right; 148 | padding-right: 0; 149 | padding-left: 7px; 150 | } 151 | 152 | input[type=submit].default, .submit-row input.default { 153 | float: left; 154 | } 155 | 156 | fieldset .fieldBox { 157 | float: right; 158 | margin-left: 20px; 159 | margin-right: 0; 160 | } 161 | 162 | .errorlist li { 163 | background-position: 100% 12px; 164 | padding: 0; 165 | } 166 | 167 | .errornote { 168 | background-position: 100% 12px; 169 | padding: 10px 12px; 170 | } 171 | 172 | /* WIDGETS */ 173 | 174 | .calendarnav-previous { 175 | top: 0; 176 | left: auto; 177 | right: 10px; 178 | } 179 | 180 | .calendarnav-next { 181 | top: 0; 182 | right: auto; 183 | left: 10px; 184 | } 185 | 186 | .calendar caption, .calendarbox h2 { 187 | text-align: center; 188 | } 189 | 190 | .selector { 191 | float: right; 192 | } 193 | 194 | .selector .selector-filter { 195 | text-align: right; 196 | } 197 | 198 | .inline-deletelink { 199 | float: left; 200 | } 201 | 202 | form .form-row p.datetime { 203 | overflow: hidden; 204 | } 205 | 206 | .related-widget-wrapper { 207 | float: right; 208 | } 209 | 210 | /* MISC */ 211 | 212 | .inline-related h2, .inline-group h2 { 213 | text-align: right 214 | } 215 | 216 | .inline-related h3 span.delete { 217 | padding-right: 20px; 218 | padding-left: inherit; 219 | left: 10px; 220 | right: inherit; 221 | float:left; 222 | } 223 | 224 | .inline-related h3 span.delete label { 225 | margin-left: inherit; 226 | margin-right: 2px; 227 | } 228 | -------------------------------------------------------------------------------- /djangopj/static/admin/css/vendor/select2/LICENSE-SELECT2.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /djangopj/static/admin/fonts/README.txt: -------------------------------------------------------------------------------- 1 | Roboto webfont source: https://www.google.com/fonts/specimen/Roboto 2 | WOFF files extracted using https://github.com/majodev/google-webfonts-helper 3 | Weights used in this project: Light (300), Regular (400), Bold (700) 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/fonts/Roboto-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/djangopj/static/admin/fonts/Roboto-Bold-webfont.woff -------------------------------------------------------------------------------- /djangopj/static/admin/fonts/Roboto-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/djangopj/static/admin/fonts/Roboto-Light-webfont.woff -------------------------------------------------------------------------------- /djangopj/static/admin/fonts/Roboto-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/djangopj/static/admin/fonts/Roboto-Regular-webfont.woff -------------------------------------------------------------------------------- /djangopj/static/admin/img/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Code Charm Ltd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/README.txt: -------------------------------------------------------------------------------- 1 | All icons are taken from Font Awesome (http://fontawesome.io/) project. 2 | The Font Awesome font is licensed under the SIL OFL 1.1: 3 | - https://scripts.sil.org/OFL 4 | 5 | SVG icons source: https://github.com/encharm/Font-Awesome-SVG-PNG 6 | Font-Awesome-SVG-PNG is licensed under the MIT license (see file license 7 | in current folder). 8 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/calendar-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/gis/move_vertex_off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/gis/move_vertex_on.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-addlink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-alert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-changelink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-deletelink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-no.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-unknown-alt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-unknown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-viewlink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/icon-yes.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/inline-delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/selector-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/sorting-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/tooltag-add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/img/tooltag-arrowright.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/SelectBox.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const SelectBox = { 4 | cache: {}, 5 | init: function(id) { 6 | const box = document.getElementById(id); 7 | SelectBox.cache[id] = []; 8 | const cache = SelectBox.cache[id]; 9 | for (const node of box.options) { 10 | cache.push({value: node.value, text: node.text, displayed: 1}); 11 | } 12 | }, 13 | redisplay: function(id) { 14 | // Repopulate HTML select box from cache 15 | const box = document.getElementById(id); 16 | const scroll_value_from_top = box.scrollTop; 17 | box.innerHTML = ''; 18 | for (const node of SelectBox.cache[id]) { 19 | if (node.displayed) { 20 | const new_option = new Option(node.text, node.value, false, false); 21 | // Shows a tooltip when hovering over the option 22 | new_option.title = node.text; 23 | box.appendChild(new_option); 24 | } 25 | } 26 | box.scrollTop = scroll_value_from_top; 27 | }, 28 | filter: function(id, text) { 29 | // Redisplay the HTML select box, displaying only the choices containing ALL 30 | // the words in text. (It's an AND search.) 31 | const tokens = text.toLowerCase().split(/\s+/); 32 | for (const node of SelectBox.cache[id]) { 33 | node.displayed = 1; 34 | const node_text = node.text.toLowerCase(); 35 | for (const token of tokens) { 36 | if (!node_text.includes(token)) { 37 | node.displayed = 0; 38 | break; // Once the first token isn't found we're done 39 | } 40 | } 41 | } 42 | SelectBox.redisplay(id); 43 | }, 44 | delete_from_cache: function(id, value) { 45 | let delete_index = null; 46 | const cache = SelectBox.cache[id]; 47 | for (const [i, node] of cache.entries()) { 48 | if (node.value === value) { 49 | delete_index = i; 50 | break; 51 | } 52 | } 53 | cache.splice(delete_index, 1); 54 | }, 55 | add_to_cache: function(id, option) { 56 | SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1}); 57 | }, 58 | cache_contains: function(id, value) { 59 | // Check if an item is contained in the cache 60 | for (const node of SelectBox.cache[id]) { 61 | if (node.value === value) { 62 | return true; 63 | } 64 | } 65 | return false; 66 | }, 67 | move: function(from, to) { 68 | const from_box = document.getElementById(from); 69 | for (const option of from_box.options) { 70 | const option_value = option.value; 71 | if (option.selected && SelectBox.cache_contains(from, option_value)) { 72 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1}); 73 | SelectBox.delete_from_cache(from, option_value); 74 | } 75 | } 76 | SelectBox.redisplay(from); 77 | SelectBox.redisplay(to); 78 | }, 79 | move_all: function(from, to) { 80 | const from_box = document.getElementById(from); 81 | for (const option of from_box.options) { 82 | const option_value = option.value; 83 | if (SelectBox.cache_contains(from, option_value)) { 84 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1}); 85 | SelectBox.delete_from_cache(from, option_value); 86 | } 87 | } 88 | SelectBox.redisplay(from); 89 | SelectBox.redisplay(to); 90 | }, 91 | sort: function(id) { 92 | SelectBox.cache[id].sort(function(a, b) { 93 | a = a.text.toLowerCase(); 94 | b = b.text.toLowerCase(); 95 | if (a > b) { 96 | return 1; 97 | } 98 | if (a < b) { 99 | return -1; 100 | } 101 | return 0; 102 | } ); 103 | }, 104 | select_all: function(id) { 105 | const box = document.getElementById(id); 106 | for (const option of box.options) { 107 | option.selected = true; 108 | } 109 | } 110 | }; 111 | window.SelectBox = SelectBox; 112 | } 113 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/actions.js: -------------------------------------------------------------------------------- 1 | /*global gettext, interpolate, ngettext*/ 2 | 'use strict'; 3 | { 4 | function show(selector) { 5 | document.querySelectorAll(selector).forEach(function(el) { 6 | el.classList.remove('hidden'); 7 | }); 8 | } 9 | 10 | function hide(selector) { 11 | document.querySelectorAll(selector).forEach(function(el) { 12 | el.classList.add('hidden'); 13 | }); 14 | } 15 | 16 | function showQuestion(options) { 17 | hide(options.acrossClears); 18 | show(options.acrossQuestions); 19 | hide(options.allContainer); 20 | } 21 | 22 | function showClear(options) { 23 | show(options.acrossClears); 24 | hide(options.acrossQuestions); 25 | document.querySelector(options.actionContainer).classList.remove(options.selectedClass); 26 | show(options.allContainer); 27 | hide(options.counterContainer); 28 | } 29 | 30 | function reset(options) { 31 | hide(options.acrossClears); 32 | hide(options.acrossQuestions); 33 | hide(options.allContainer); 34 | show(options.counterContainer); 35 | } 36 | 37 | function clearAcross(options) { 38 | reset(options); 39 | const acrossInputs = document.querySelectorAll(options.acrossInput); 40 | acrossInputs.forEach(function(acrossInput) { 41 | acrossInput.value = 0; 42 | }); 43 | document.querySelector(options.actionContainer).classList.remove(options.selectedClass); 44 | } 45 | 46 | function checker(actionCheckboxes, options, checked) { 47 | if (checked) { 48 | showQuestion(options); 49 | } else { 50 | reset(options); 51 | } 52 | actionCheckboxes.forEach(function(el) { 53 | el.checked = checked; 54 | el.closest('tr').classList.toggle(options.selectedClass, checked); 55 | }); 56 | } 57 | 58 | function updateCounter(actionCheckboxes, options) { 59 | const sel = Array.from(actionCheckboxes).filter(function(el) { 60 | return el.checked; 61 | }).length; 62 | const counter = document.querySelector(options.counterContainer); 63 | // data-actions-icnt is defined in the generated HTML 64 | // and contains the total amount of objects in the queryset 65 | const actions_icnt = Number(counter.dataset.actionsIcnt); 66 | counter.textContent = interpolate( 67 | ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), { 68 | sel: sel, 69 | cnt: actions_icnt 70 | }, true); 71 | const allToggle = document.getElementById(options.allToggleId); 72 | allToggle.checked = sel === actionCheckboxes.length; 73 | if (allToggle.checked) { 74 | showQuestion(options); 75 | } else { 76 | clearAcross(options); 77 | } 78 | } 79 | 80 | const defaults = { 81 | actionContainer: "div.actions", 82 | counterContainer: "span.action-counter", 83 | allContainer: "div.actions span.all", 84 | acrossInput: "div.actions input.select-across", 85 | acrossQuestions: "div.actions span.question", 86 | acrossClears: "div.actions span.clear", 87 | allToggleId: "action-toggle", 88 | selectedClass: "selected" 89 | }; 90 | 91 | window.Actions = function(actionCheckboxes, options) { 92 | options = Object.assign({}, defaults, options); 93 | let list_editable_changed = false; 94 | let lastChecked = null; 95 | let shiftPressed = false; 96 | 97 | document.addEventListener('keydown', (event) => { 98 | shiftPressed = event.shiftKey; 99 | }); 100 | 101 | document.addEventListener('keyup', (event) => { 102 | shiftPressed = event.shiftKey; 103 | }); 104 | 105 | document.getElementById(options.allToggleId).addEventListener('click', function(event) { 106 | checker(actionCheckboxes, options, this.checked); 107 | updateCounter(actionCheckboxes, options); 108 | }); 109 | 110 | document.querySelectorAll(options.acrossQuestions + " a").forEach(function(el) { 111 | el.addEventListener('click', function(event) { 112 | event.preventDefault(); 113 | const acrossInputs = document.querySelectorAll(options.acrossInput); 114 | acrossInputs.forEach(function(acrossInput) { 115 | acrossInput.value = 1; 116 | }); 117 | showClear(options); 118 | }); 119 | }); 120 | 121 | document.querySelectorAll(options.acrossClears + " a").forEach(function(el) { 122 | el.addEventListener('click', function(event) { 123 | event.preventDefault(); 124 | document.getElementById(options.allToggleId).checked = false; 125 | clearAcross(options); 126 | checker(actionCheckboxes, options, false); 127 | updateCounter(actionCheckboxes, options); 128 | }); 129 | }); 130 | 131 | function affectedCheckboxes(target, withModifier) { 132 | const multiSelect = (lastChecked && withModifier && lastChecked !== target); 133 | if (!multiSelect) { 134 | return [target]; 135 | } 136 | const checkboxes = Array.from(actionCheckboxes); 137 | const targetIndex = checkboxes.findIndex(el => el === target); 138 | const lastCheckedIndex = checkboxes.findIndex(el => el === lastChecked); 139 | const startIndex = Math.min(targetIndex, lastCheckedIndex); 140 | const endIndex = Math.max(targetIndex, lastCheckedIndex); 141 | const filtered = checkboxes.filter((el, index) => (startIndex <= index) && (index <= endIndex)); 142 | return filtered; 143 | }; 144 | 145 | Array.from(document.getElementById('result_list').tBodies).forEach(function(el) { 146 | el.addEventListener('change', function(event) { 147 | const target = event.target; 148 | if (target.classList.contains('action-select')) { 149 | const checkboxes = affectedCheckboxes(target, shiftPressed); 150 | checker(checkboxes, options, target.checked); 151 | updateCounter(actionCheckboxes, options); 152 | lastChecked = target; 153 | } else { 154 | list_editable_changed = true; 155 | } 156 | }); 157 | }); 158 | 159 | document.querySelector('#changelist-form button[name=index]').addEventListener('click', function(event) { 160 | if (list_editable_changed) { 161 | const confirmed = confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost.")); 162 | if (!confirmed) { 163 | event.preventDefault(); 164 | } 165 | } 166 | }); 167 | 168 | const el = document.querySelector('#changelist-form input[name=_save]'); 169 | // The button does not exist if no fields are editable. 170 | if (el) { 171 | el.addEventListener('click', function(event) { 172 | if (document.querySelector('[name=action]').value) { 173 | const text = list_editable_changed 174 | ? gettext("You have selected an action, but you haven’t saved your changes to individual fields yet. Please click OK to save. You’ll need to re-run the action.") 175 | : gettext("You have selected an action, and you haven’t made any changes on individual fields. You’re probably looking for the Go button rather than the Save button."); 176 | if (!confirm(text)) { 177 | event.preventDefault(); 178 | } 179 | } 180 | }); 181 | } 182 | }; 183 | 184 | // Call function fn when the DOM is loaded and ready. If it is already 185 | // loaded, call the function now. 186 | // http://youmightnotneedjquery.com/#ready 187 | function ready(fn) { 188 | if (document.readyState !== 'loading') { 189 | fn(); 190 | } else { 191 | document.addEventListener('DOMContentLoaded', fn); 192 | } 193 | } 194 | 195 | ready(function() { 196 | const actionsEls = document.querySelectorAll('tr input.action-select'); 197 | if (actionsEls.length > 0) { 198 | Actions(actionsEls); 199 | } 200 | }); 201 | } 202 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/actions.min.js: -------------------------------------------------------------------------------- 1 | (function(a){var f;a.fn.actions=function(e){var b=a.extend({},a.fn.actions.defaults,e),g=a(this),k=!1,l=function(){a(b.acrossClears).hide();a(b.acrossQuestions).show();a(b.allContainer).hide()},m=function(){a(b.acrossClears).show();a(b.acrossQuestions).hide();a(b.actionContainer).toggleClass(b.selectedClass);a(b.allContainer).show();a(b.counterContainer).hide()},n=function(){a(b.acrossClears).hide();a(b.acrossQuestions).hide();a(b.allContainer).hide();a(b.counterContainer).show()},p=function(){n(); 2 | a(b.acrossInput).val(0);a(b.actionContainer).removeClass(b.selectedClass)},q=function(c){c?l():n();a(g).prop("checked",c).parent().parent().toggleClass(b.selectedClass,c)},h=function(){var c=a(g).filter(":checked").length,d=a(".action-counter").data("actionsIcnt");a(b.counterContainer).html(interpolate(ngettext("%(sel)s of %(cnt)s selected","%(sel)s of %(cnt)s selected",c),{sel:c,cnt:d},!0));a(b.allToggle).prop("checked",function(){if(c===g.length){var a=!0;l()}else a=!1,p();return a})};a(b.counterContainer).show(); 3 | a(this).filter(":checked").each(function(c){a(this).parent().parent().toggleClass(b.selectedClass);h();1===a(b.acrossInput).val()&&m()});a(b.allToggle).show().on("click",function(){q(a(this).prop("checked"));h()});a("a",b.acrossQuestions).on("click",function(c){c.preventDefault();a(b.acrossInput).val(1);m()});a("a",b.acrossClears).on("click",function(c){c.preventDefault();a(b.allToggle).prop("checked",!1);p();q(0);h()});f=null;a(g).on("click",function(c){c||(c=window.event);var d=c.target?c.target: 4 | c.srcElement;if(f&&a.data(f)!==a.data(d)&&!0===c.shiftKey){var e=!1;a(f).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked);a(g).each(function(){if(a.data(this)===a.data(f)||a.data(this)===a.data(d))e=e?!1:!0;e&&a(this).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked)})}a(d).parent().parent().toggleClass(b.selectedClass,d.checked);f=d;h()});a("form#changelist-form table#result_list tr").on("change","td:gt(0) :input",function(){k=!0}); 5 | a('form#changelist-form button[name="index"]').on("click",function(a){if(k)return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."))});a('form#changelist-form input[name="_save"]').on("click",function(c){var d=!1;a("select option:selected",b.actionContainer).each(function(){a(this).val()&&(d=!0)});if(d)return k?confirm(gettext("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action.")): 6 | confirm(gettext("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button."))})};a.fn.actions.defaults={actionContainer:"div.actions",counterContainer:"span.action-counter",allContainer:"div.actions span.all",acrossInput:"div.actions input.select-across",acrossQuestions:"div.actions span.question",acrossClears:"div.actions span.clear",allToggle:"#action-toggle",selectedClass:"selected"};a(document).ready(function(){var e= 7 | a("tr input.action-select");0 { 10 | return { 11 | term: params.term, 12 | page: params.page, 13 | app_label: element.dataset.appLabel, 14 | model_name: element.dataset.modelName, 15 | field_name: element.dataset.fieldName 16 | }; 17 | } 18 | } 19 | }); 20 | }); 21 | return this; 22 | }; 23 | 24 | $(function() { 25 | // Initialize all autocomplete widgets except the one in the template 26 | // form used when a new formset is added. 27 | $('.admin-autocomplete').not('[name*=__prefix__]').djangoAdminSelect2(); 28 | }); 29 | 30 | $(document).on('formset:added', (function() { 31 | return function(event, $newFormset) { 32 | return $newFormset.find('.admin-autocomplete').djangoAdminSelect2(); 33 | }; 34 | })(this)); 35 | } 36 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/calendar.js: -------------------------------------------------------------------------------- 1 | /*global gettext, pgettext, get_format, quickElement, removeChildren*/ 2 | /* 3 | calendar.js - Calendar functions by Adrian Holovaty 4 | depends on core.js for utility functions like removeChildren or quickElement 5 | */ 6 | 'use strict'; 7 | { 8 | // CalendarNamespace -- Provides a collection of HTML calendar-related helper functions 9 | const CalendarNamespace = { 10 | monthsOfYear: [ 11 | gettext('January'), 12 | gettext('February'), 13 | gettext('March'), 14 | gettext('April'), 15 | gettext('May'), 16 | gettext('June'), 17 | gettext('July'), 18 | gettext('August'), 19 | gettext('September'), 20 | gettext('October'), 21 | gettext('November'), 22 | gettext('December') 23 | ], 24 | monthsOfYearAbbrev: [ 25 | pgettext('abbrev. month January', 'Jan'), 26 | pgettext('abbrev. month February', 'Feb'), 27 | pgettext('abbrev. month March', 'Mar'), 28 | pgettext('abbrev. month April', 'Apr'), 29 | pgettext('abbrev. month May', 'May'), 30 | pgettext('abbrev. month June', 'Jun'), 31 | pgettext('abbrev. month July', 'Jul'), 32 | pgettext('abbrev. month August', 'Aug'), 33 | pgettext('abbrev. month September', 'Sep'), 34 | pgettext('abbrev. month October', 'Oct'), 35 | pgettext('abbrev. month November', 'Nov'), 36 | pgettext('abbrev. month December', 'Dec') 37 | ], 38 | daysOfWeek: [ 39 | pgettext('one letter Sunday', 'S'), 40 | pgettext('one letter Monday', 'M'), 41 | pgettext('one letter Tuesday', 'T'), 42 | pgettext('one letter Wednesday', 'W'), 43 | pgettext('one letter Thursday', 'T'), 44 | pgettext('one letter Friday', 'F'), 45 | pgettext('one letter Saturday', 'S') 46 | ], 47 | firstDayOfWeek: parseInt(get_format('FIRST_DAY_OF_WEEK')), 48 | isLeapYear: function(year) { 49 | return (((year % 4) === 0) && ((year % 100) !== 0 ) || ((year % 400) === 0)); 50 | }, 51 | getDaysInMonth: function(month, year) { 52 | let days; 53 | if (month === 1 || month === 3 || month === 5 || month === 7 || month === 8 || month === 10 || month === 12) { 54 | days = 31; 55 | } 56 | else if (month === 4 || month === 6 || month === 9 || month === 11) { 57 | days = 30; 58 | } 59 | else if (month === 2 && CalendarNamespace.isLeapYear(year)) { 60 | days = 29; 61 | } 62 | else { 63 | days = 28; 64 | } 65 | return days; 66 | }, 67 | draw: function(month, year, div_id, callback, selected) { // month = 1-12, year = 1-9999 68 | const today = new Date(); 69 | const todayDay = today.getDate(); 70 | const todayMonth = today.getMonth() + 1; 71 | const todayYear = today.getFullYear(); 72 | let todayClass = ''; 73 | 74 | // Use UTC functions here because the date field does not contain time 75 | // and using the UTC function variants prevent the local time offset 76 | // from altering the date, specifically the day field. For example: 77 | // 78 | // ``` 79 | // var x = new Date('2013-10-02'); 80 | // var day = x.getDate(); 81 | // ``` 82 | // 83 | // The day variable above will be 1 instead of 2 in, say, US Pacific time 84 | // zone. 85 | let isSelectedMonth = false; 86 | if (typeof selected !== 'undefined') { 87 | isSelectedMonth = (selected.getUTCFullYear() === year && (selected.getUTCMonth() + 1) === month); 88 | } 89 | 90 | month = parseInt(month); 91 | year = parseInt(year); 92 | const calDiv = document.getElementById(div_id); 93 | removeChildren(calDiv); 94 | const calTable = document.createElement('table'); 95 | quickElement('caption', calTable, CalendarNamespace.monthsOfYear[month - 1] + ' ' + year); 96 | const tableBody = quickElement('tbody', calTable); 97 | 98 | // Draw days-of-week header 99 | let tableRow = quickElement('tr', tableBody); 100 | for (let i = 0; i < 7; i++) { 101 | quickElement('th', tableRow, CalendarNamespace.daysOfWeek[(i + CalendarNamespace.firstDayOfWeek) % 7]); 102 | } 103 | 104 | const startingPos = new Date(year, month - 1, 1 - CalendarNamespace.firstDayOfWeek).getDay(); 105 | const days = CalendarNamespace.getDaysInMonth(month, year); 106 | 107 | let nonDayCell; 108 | 109 | // Draw blanks before first of month 110 | tableRow = quickElement('tr', tableBody); 111 | for (let i = 0; i < startingPos; i++) { 112 | nonDayCell = quickElement('td', tableRow, ' '); 113 | nonDayCell.className = "nonday"; 114 | } 115 | 116 | function calendarMonth(y, m) { 117 | function onClick(e) { 118 | e.preventDefault(); 119 | callback(y, m, this.textContent); 120 | } 121 | return onClick; 122 | } 123 | 124 | // Draw days of month 125 | let currentDay = 1; 126 | for (let i = startingPos; currentDay <= days; i++) { 127 | if (i % 7 === 0 && currentDay !== 1) { 128 | tableRow = quickElement('tr', tableBody); 129 | } 130 | if ((currentDay === todayDay) && (month === todayMonth) && (year === todayYear)) { 131 | todayClass = 'today'; 132 | } else { 133 | todayClass = ''; 134 | } 135 | 136 | // use UTC function; see above for explanation. 137 | if (isSelectedMonth && currentDay === selected.getUTCDate()) { 138 | if (todayClass !== '') { 139 | todayClass += " "; 140 | } 141 | todayClass += "selected"; 142 | } 143 | 144 | const cell = quickElement('td', tableRow, '', 'class', todayClass); 145 | const link = quickElement('a', cell, currentDay, 'href', '#'); 146 | link.addEventListener('click', calendarMonth(year, month)); 147 | currentDay++; 148 | } 149 | 150 | // Draw blanks after end of month (optional, but makes for valid code) 151 | while (tableRow.childNodes.length < 7) { 152 | nonDayCell = quickElement('td', tableRow, ' '); 153 | nonDayCell.className = "nonday"; 154 | } 155 | 156 | calDiv.appendChild(calTable); 157 | } 158 | }; 159 | 160 | // Calendar -- A calendar instance 161 | function Calendar(div_id, callback, selected) { 162 | // div_id (string) is the ID of the element in which the calendar will 163 | // be displayed 164 | // callback (string) is the name of a JavaScript function that will be 165 | // called with the parameters (year, month, day) when a day in the 166 | // calendar is clicked 167 | this.div_id = div_id; 168 | this.callback = callback; 169 | this.today = new Date(); 170 | this.currentMonth = this.today.getMonth() + 1; 171 | this.currentYear = this.today.getFullYear(); 172 | if (typeof selected !== 'undefined') { 173 | this.selected = selected; 174 | } 175 | } 176 | Calendar.prototype = { 177 | drawCurrent: function() { 178 | CalendarNamespace.draw(this.currentMonth, this.currentYear, this.div_id, this.callback, this.selected); 179 | }, 180 | drawDate: function(month, year, selected) { 181 | this.currentMonth = month; 182 | this.currentYear = year; 183 | 184 | if(selected) { 185 | this.selected = selected; 186 | } 187 | 188 | this.drawCurrent(); 189 | }, 190 | drawPreviousMonth: function() { 191 | if (this.currentMonth === 1) { 192 | this.currentMonth = 12; 193 | this.currentYear--; 194 | } 195 | else { 196 | this.currentMonth--; 197 | } 198 | this.drawCurrent(); 199 | }, 200 | drawNextMonth: function() { 201 | if (this.currentMonth === 12) { 202 | this.currentMonth = 1; 203 | this.currentYear++; 204 | } 205 | else { 206 | this.currentMonth++; 207 | } 208 | this.drawCurrent(); 209 | }, 210 | drawPreviousYear: function() { 211 | this.currentYear--; 212 | this.drawCurrent(); 213 | }, 214 | drawNextYear: function() { 215 | this.currentYear++; 216 | this.drawCurrent(); 217 | } 218 | }; 219 | window.Calendar = Calendar; 220 | window.CalendarNamespace = CalendarNamespace; 221 | } 222 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/cancel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | // Call function fn when the DOM is loaded and ready. If it is already 4 | // loaded, call the function now. 5 | // http://youmightnotneedjquery.com/#ready 6 | function ready(fn) { 7 | if (document.readyState !== 'loading') { 8 | fn(); 9 | } else { 10 | document.addEventListener('DOMContentLoaded', fn); 11 | } 12 | } 13 | 14 | ready(function() { 15 | function handleClick(event) { 16 | event.preventDefault(); 17 | const params = new URLSearchParams(window.location.search); 18 | if (params.has('_popup')) { 19 | window.close(); // Close the popup. 20 | } else { 21 | window.history.back(); // Otherwise, go back. 22 | } 23 | } 24 | 25 | document.querySelectorAll('.cancel-link').forEach(function(el) { 26 | el.addEventListener('click', handleClick); 27 | }); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/change_form.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const inputTags = ['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA']; 4 | const modelName = document.getElementById('django-admin-form-add-constants').dataset.modelName; 5 | if (modelName) { 6 | const form = document.getElementById(modelName + '_form'); 7 | for (const element of form.elements) { 8 | // HTMLElement.offsetParent returns null when the element is not 9 | // rendered. 10 | if (inputTags.includes(element.tagName) && !element.disabled && element.offsetParent) { 11 | element.focus(); 12 | break; 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/collapse.js: -------------------------------------------------------------------------------- 1 | /*global gettext*/ 2 | 'use strict'; 3 | { 4 | window.addEventListener('load', function() { 5 | // Add anchor tag for Show/Hide link 6 | const fieldsets = document.querySelectorAll('fieldset.collapse'); 7 | for (const [i, elem] of fieldsets.entries()) { 8 | // Don't hide if fields in this fieldset have errors 9 | if (elem.querySelectorAll('div.errors, ul.errorlist').length === 0) { 10 | elem.classList.add('collapsed'); 11 | const h2 = elem.querySelector('h2'); 12 | const link = document.createElement('a'); 13 | link.id = 'fieldsetcollapser' + i; 14 | link.className = 'collapse-toggle'; 15 | link.href = '#'; 16 | link.textContent = gettext('Show'); 17 | h2.appendChild(document.createTextNode(' (')); 18 | h2.appendChild(link); 19 | h2.appendChild(document.createTextNode(')')); 20 | } 21 | } 22 | // Add toggle to hide/show anchor tag 23 | const toggleFunc = function(ev) { 24 | if (ev.target.matches('.collapse-toggle')) { 25 | ev.preventDefault(); 26 | ev.stopPropagation(); 27 | const fieldset = ev.target.closest('fieldset'); 28 | if (fieldset.classList.contains('collapsed')) { 29 | // Show 30 | ev.target.textContent = gettext('Hide'); 31 | fieldset.classList.remove('collapsed'); 32 | } else { 33 | // Hide 34 | ev.target.textContent = gettext('Show'); 35 | fieldset.classList.add('collapsed'); 36 | } 37 | } 38 | }; 39 | document.querySelectorAll('fieldset.module').forEach(function(el) { 40 | el.addEventListener('click', toggleFunc); 41 | }); 42 | }); 43 | } 44 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/collapse.min.js: -------------------------------------------------------------------------------- 1 | (function(){var e=function(b,a){return b.nodeName===a.toUpperCase()?b:"BODY"===b.parentNode.nodeName?null:b.parentNode&&e(b.parentNode,a)};window.addEventListener("load",function(){for(var b=document.querySelectorAll("fieldset.collapse"),a=0;a= 12) ? 'PM' : 'AM', 111 | S: this.getTwoDigitSecond(), 112 | w: '0' + this.getDay(), 113 | x: this.toLocaleDateString(), 114 | X: this.toLocaleTimeString(), 115 | y: ('' + this.getFullYear()).substr(2, 4), 116 | Y: '' + this.getFullYear(), 117 | '%': '%' 118 | }; 119 | let result = '', i = 0; 120 | while (i < format.length) { 121 | if (format.charAt(i) === '%') { 122 | result = result + fields[format.charAt(i + 1)]; 123 | ++i; 124 | } 125 | else { 126 | result = result + format.charAt(i); 127 | } 128 | ++i; 129 | } 130 | return result; 131 | }; 132 | 133 | // ---------------------------------------------------------------------------- 134 | // String object extensions 135 | // ---------------------------------------------------------------------------- 136 | String.prototype.strptime = function(format) { 137 | const split_format = format.split(/[.\-/]/); 138 | const date = this.split(/[.\-/]/); 139 | let i = 0; 140 | let day, month, year; 141 | while (i < split_format.length) { 142 | switch (split_format[i]) { 143 | case "%d": 144 | day = date[i]; 145 | break; 146 | case "%m": 147 | month = date[i] - 1; 148 | break; 149 | case "%Y": 150 | year = date[i]; 151 | break; 152 | case "%y": 153 | // A %y value in the range of [00, 68] is in the current 154 | // century, while [69, 99] is in the previous century, 155 | // according to the Open Group Specification. 156 | if (parseInt(date[i], 10) >= 69) { 157 | year = date[i]; 158 | } else { 159 | year = (new Date(Date.UTC(date[i], 0))).getUTCFullYear() + 100; 160 | } 161 | break; 162 | } 163 | ++i; 164 | } 165 | // Create Date object from UTC since the parsed value is supposed to be 166 | // in UTC, not local time. Also, the calendar uses UTC functions for 167 | // date extraction. 168 | return new Date(Date.UTC(year, month, day)); 169 | }; 170 | } 171 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/inlines.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.fn.formset=function(c){var a=b.extend({},b.fn.formset.defaults,c),d=b(this);c=d.parent();var h=function(a,e,f){var c=new RegExp("("+e+"-(\\d+|__prefix__))");e=e+"-"+f;b(a).prop("for")&&b(a).prop("for",b(a).prop("for").replace(c,e));a.id&&(a.id=a.id.replace(c,e));a.name&&(a.name=a.name.replace(c,e))},g=b("#id_"+a.prefix+"-TOTAL_FORMS").prop("autocomplete","off"),k=parseInt(g.val(),10),e=b("#id_"+a.prefix+"-MAX_NUM_FORMS").prop("autocomplete","off"),f=""===e.val()||0'+a.addText+""),m=c.find("tr:last a")):(d.filter(":last").after('"),m=d.filter(":last").next().find("a")));m.on("click",function(f){f.preventDefault();f=b("#"+a.prefix+"-empty"); 3 | var c=f.clone(!0);c.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",a.prefix+"-"+k);c.is("tr")?c.children(":last").append('
'+a.deleteText+"
"):c.is("ul")||c.is("ol")?c.append('
  • '+a.deleteText+"
  • "):c.children(":first").append(''+a.deleteText+"");c.find("*").each(function(){h(this,a.prefix,g.val())});c.insertBefore(b(f)); 4 | b(g).val(parseInt(g.val(),10)+1);k+=1;""!==e.val()&&0>=e.val()-g.val()&&m.parent().hide();c.find("a."+a.deleteCssClass).on("click",function(f){f.preventDefault();c.remove();--k;a.removed&&a.removed(c);b(document).trigger("formset:removed",[c,a.prefix]);f=b("."+a.formCssClass);b("#id_"+a.prefix+"-TOTAL_FORMS").val(f.length);(""===e.val()||0 tr",b(c).tabularFormset(c,a.options)}})})})(django.jQuery); 11 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/jquery.init.js: -------------------------------------------------------------------------------- 1 | /*global jQuery:false*/ 2 | 'use strict'; 3 | /* Puts the included jQuery into our own namespace using noConflict and passing 4 | * it 'true'. This ensures that the included jQuery doesn't pollute the global 5 | * namespace (i.e. this preserves pre-existing values for both window.$ and 6 | * window.jQuery). 7 | */ 8 | window.django = {jQuery: jQuery.noConflict(true)}; 9 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/nav_sidebar.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const toggleNavSidebar = document.getElementById('toggle-nav-sidebar'); 4 | if (toggleNavSidebar !== null) { 5 | const navLinks = document.querySelectorAll('#nav-sidebar a'); 6 | function disableNavLinkTabbing() { 7 | for (const navLink of navLinks) { 8 | navLink.tabIndex = -1; 9 | } 10 | } 11 | function enableNavLinkTabbing() { 12 | for (const navLink of navLinks) { 13 | navLink.tabIndex = 0; 14 | } 15 | } 16 | function disableNavFilterTabbing() { 17 | document.getElementById('nav-filter').tabIndex = -1; 18 | } 19 | function enableNavFilterTabbing() { 20 | document.getElementById('nav-filter').tabIndex = 0; 21 | } 22 | 23 | const main = document.getElementById('main'); 24 | let navSidebarIsOpen = localStorage.getItem('django.admin.navSidebarIsOpen'); 25 | if (navSidebarIsOpen === null) { 26 | navSidebarIsOpen = 'true'; 27 | } 28 | if (navSidebarIsOpen === 'false') { 29 | disableNavLinkTabbing(); 30 | disableNavFilterTabbing(); 31 | } 32 | main.classList.toggle('shifted', navSidebarIsOpen === 'true'); 33 | 34 | toggleNavSidebar.addEventListener('click', function() { 35 | if (navSidebarIsOpen === 'true') { 36 | navSidebarIsOpen = 'false'; 37 | disableNavLinkTabbing(); 38 | disableNavFilterTabbing(); 39 | } else { 40 | navSidebarIsOpen = 'true'; 41 | enableNavLinkTabbing(); 42 | enableNavFilterTabbing(); 43 | } 44 | localStorage.setItem('django.admin.navSidebarIsOpen', navSidebarIsOpen); 45 | main.classList.toggle('shifted'); 46 | }); 47 | } 48 | 49 | function initSidebarQuickFilter() { 50 | const options = []; 51 | const navSidebar = document.getElementById('nav-sidebar'); 52 | if (!navSidebar) { 53 | return; 54 | } 55 | navSidebar.querySelectorAll('th[scope=row] a').forEach((container) => { 56 | options.push({title: container.innerHTML, node: container}); 57 | }); 58 | 59 | function checkValue(event) { 60 | let filterValue = event.target.value; 61 | if (filterValue) { 62 | filterValue = filterValue.toLowerCase(); 63 | } 64 | if (event.key === 'Escape') { 65 | filterValue = ''; 66 | event.target.value = ''; // clear input 67 | } 68 | let matches = false; 69 | for (const o of options) { 70 | let displayValue = ''; 71 | if (filterValue) { 72 | if (o.title.toLowerCase().indexOf(filterValue) === -1) { 73 | displayValue = 'none'; 74 | } else { 75 | matches = true; 76 | } 77 | } 78 | // show/hide parent 79 | o.node.parentNode.parentNode.style.display = displayValue; 80 | } 81 | if (!filterValue || matches) { 82 | event.target.classList.remove('no-results'); 83 | } else { 84 | event.target.classList.add('no-results'); 85 | } 86 | sessionStorage.setItem('django.admin.navSidebarFilterValue', filterValue); 87 | } 88 | 89 | const nav = document.getElementById('nav-filter'); 90 | nav.addEventListener('change', checkValue, false); 91 | nav.addEventListener('input', checkValue, false); 92 | nav.addEventListener('keyup', checkValue, false); 93 | 94 | const storedValue = sessionStorage.getItem('django.admin.navSidebarFilterValue'); 95 | if (storedValue) { 96 | nav.value = storedValue; 97 | checkValue({target: nav, key: ''}); 98 | } 99 | } 100 | window.initSidebarQuickFilter = initSidebarQuickFilter; 101 | initSidebarQuickFilter(); 102 | } 103 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/popup_response.js: -------------------------------------------------------------------------------- 1 | /*global opener */ 2 | 'use strict'; 3 | { 4 | const initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse); 5 | switch(initData.action) { 6 | case 'change': 7 | opener.dismissChangeRelatedObjectPopup(window, initData.value, initData.obj, initData.new_value); 8 | break; 9 | case 'delete': 10 | opener.dismissDeleteRelatedObjectPopup(window, initData.value); 11 | break; 12 | default: 13 | opener.dismissAddRelatedObjectPopup(window, initData.value, initData.obj); 14 | break; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/prepopulate.js: -------------------------------------------------------------------------------- 1 | /*global URLify*/ 2 | 'use strict'; 3 | { 4 | const $ = django.jQuery; 5 | $.fn.prepopulate = function(dependencies, maxLength, allowUnicode) { 6 | /* 7 | Depends on urlify.js 8 | Populates a selected field with the values of the dependent fields, 9 | URLifies and shortens the string. 10 | dependencies - array of dependent fields ids 11 | maxLength - maximum length of the URLify'd string 12 | allowUnicode - Unicode support of the URLify'd string 13 | */ 14 | return this.each(function() { 15 | const prepopulatedField = $(this); 16 | 17 | const populate = function() { 18 | // Bail if the field's value has been changed by the user 19 | if (prepopulatedField.data('_changed')) { 20 | return; 21 | } 22 | 23 | const values = []; 24 | $.each(dependencies, function(i, field) { 25 | field = $(field); 26 | if (field.val().length > 0) { 27 | values.push(field.val()); 28 | } 29 | }); 30 | prepopulatedField.val(URLify(values.join(' '), maxLength, allowUnicode)); 31 | }; 32 | 33 | prepopulatedField.data('_changed', false); 34 | prepopulatedField.on('change', function() { 35 | prepopulatedField.data('_changed', true); 36 | }); 37 | 38 | if (!prepopulatedField.val()) { 39 | $(dependencies.join(',')).on('keyup change focus', populate); 40 | } 41 | }); 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /djangopj/static/admin/js/prepopulate.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.fn.prepopulate=function(d,f,g){return this.each(function(){var a=b(this),h=function(){if(!a.data("_changed")){var e=[];b.each(d,function(a,c){c=b(c);01&&(u+="a"),u},inputTooShort:function(n){var e=n.minimum-n.input.length,u="Моля въведете още "+e+" символ";return e>1&&(u+="a"),u},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(n){var e="Можете да направите до "+n.maximum+" ";return n.maximum>1?e+="избора":e+="избор",e},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"},removeAllItems:function(){return"Премахнете всички елементи"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/bn.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/bs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/ca.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Si us plau, elimina "+n+" car";return r+=1==n?"àcter":"àcters"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Si us plau, introdueix "+n+" car";return r+=1==n?"àcter":"àcters"},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var n="Només es pot seleccionar "+e.maximum+" element";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"},removeAllItems:function(){return"Treu tots els elements"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/cs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/cs",[],function(){function e(e,n){switch(e){case 2:return n?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadejte o jeden znak méně.":t<=4?"Prosím, zadejte o "+e(t,!0)+" znaky méně.":"Prosím, zadejte o "+t+" znaků méně."},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadejte ještě jeden znak.":t<=4?"Prosím, zadejte ještě další "+e(t,!0)+" znaky.":"Prosím, zadejte ještě dalších "+t+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(n){var t=n.maximum;return 1==t?"Můžete zvolit jen jednu položku.":t<=4?"Můžete zvolit maximálně "+e(t,!1)+" položky.":"Můžete zvolit maximálně "+t+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"},removeAllItems:function(){return"Odstraňte všechny položky"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/da.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){return"Angiv venligst "+(e.input.length-e.maximum)+" tegn mindre"},inputTooShort:function(e){return"Angiv venligst "+(e.minimum-e.input.length)+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var n="Du kan kun vælge "+e.maximum+" emne";return 1!=e.maximum&&(n+="r"),n},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/de.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){return"Bitte "+(e.input.length-e.maximum)+" Zeichen weniger eingeben"},inputTooShort:function(e){return"Bitte "+(e.minimum-e.input.length)+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var n="Sie können nur "+e.maximum+" Element";return 1!=e.maximum&&(n+="e"),n+=" auswählen"},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"},removeAllItems:function(){return"Entferne alle Elemente"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/dsb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/el.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(n){var e=n.input.length-n.maximum,u="Παρακαλώ διαγράψτε "+e+" χαρακτήρ";return 1==e&&(u+="α"),1!=e&&(u+="ες"),u},inputTooShort:function(n){return"Παρακαλώ συμπληρώστε "+(n.minimum-n.input.length)+" ή περισσότερους χαρακτήρες"},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(n){var e="Μπορείτε να επιλέξετε μόνο "+n.maximum+" επιλογ";return 1==n.maximum&&(e+="ή"),1!=n.maximum&&(e+="ές"),e},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"},removeAllItems:function(){return"Καταργήστε όλα τα στοιχεία"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/en.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/es.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Por favor, elimine "+n+" car";return r+=1==n?"ácter":"acteres"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Por favor, introduzca "+n+" car";return r+=1==n?"ácter":"acteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var n="Sólo puede seleccionar "+e.maximum+" elemento";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Eliminar todos los elementos"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/et.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var n=e.input.length-e.maximum,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" vähem"},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" rohkem"},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var n="Saad vaid "+e.maximum+" tulemus";return 1==e.maximum?n+="e":n+="t",n+=" valida"},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"},removeAllItems:function(){return"Eemalda kõik esemed"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/eu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gutxiago"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gehiago"},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return 1===e.maximum?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"},removeAllItems:function(){return"Kendu elementu guztiak"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/fa.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(n){return"لطفاً "+(n.input.length-n.maximum)+" کاراکتر را حذف نمایید"},inputTooShort:function(n){return"لطفاً تعداد "+(n.minimum-n.input.length)+" کاراکتر یا بیشتر وارد نمایید"},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(n){return"شما تنها می‌توانید "+n.maximum+" آیتم را انتخاب نمایید"},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."},removeAllItems:function(){return"همه موارد را حذف کنید"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/fi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(n){return"Ole hyvä ja anna "+(n.input.length-n.maximum)+" merkkiä vähemmän"},inputTooShort:function(n){return"Ole hyvä ja anna "+(n.minimum-n.input.length)+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(n){return"Voit valita ainoastaan "+n.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"},removeAllItems:function(){return"Poista kaikki kohteet"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/fr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/gl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var n=e.input.length-e.maximum;return 1===n?"Elimine un carácter":"Elimine "+n+" caracteres"},inputTooShort:function(e){var n=e.minimum-e.input.length;return 1===n?"Engada un carácter":"Engada "+n+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return 1===e.maximum?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Elimina todos os elementos"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/he.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="נא למחוק ";return r+=1===e?"תו אחד":e+" תווים"},inputTooShort:function(n){var e=n.minimum-n.input.length,r="נא להכניס ";return r+=1===e?"תו אחד":e+" תווים",r+=" או יותר"},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(n){var e="באפשרותך לבחור עד ";return 1===n.maximum?e+="פריט אחד":e+=n.maximum+" פריטים",e},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"},removeAllItems:function(){return"הסר את כל הפריטים"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/hi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e+" अक्षर को हटा दें";return e>1&&(r=e+" अक्षरों को हटा दें "),r},inputTooShort:function(n){return"कृपया "+(n.minimum-n.input.length)+" या अधिक अक्षर दर्ज करें"},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(n){return"आप केवल "+n.maximum+" आइटम का चयन कर सकते हैं"},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."},removeAllItems:function(){return"सभी वस्तुओं को हटा दें"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/hr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hr",[],function(){function n(n){var e=" "+n+" znak";return n%10<5&&n%10>0&&(n%100<5||n%100>19)?n%10>1&&(e+="a"):e+="ova",e}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(e){return"Unesite "+n(e.input.length-e.maximum)},inputTooShort:function(e){return"Unesite još "+n(e.minimum-e.input.length)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(n){return"Maksimalan broj odabranih stavki je "+n.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Ukloni sve stavke"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/hsb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/hu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){return"Túl hosszú. "+(e.input.length-e.maximum)+" karakterrel több, mint kellene."},inputTooShort:function(e){return"Túl rövid. Még "+(e.minimum-e.input.length)+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"},removeAllItems:function(){return"Távolítson el minden elemet"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/hy.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/id.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(n){return"Hapuskan "+(n.input.length-n.maximum)+" huruf"},inputTooShort:function(n){return"Masukkan "+(n.minimum-n.input.length)+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(n){return"Anda hanya dapat memilih "+n.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Hapus semua item"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/is.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/is",[],function(){return{inputTooLong:function(n){var t=n.input.length-n.maximum,e="Vinsamlegast styttið texta um "+t+" staf";return t<=1?e:e+"i"},inputTooShort:function(n){var t=n.minimum-n.input.length,e="Vinsamlegast skrifið "+t+" staf";return t>1&&(e+="i"),e+=" í viðbót"},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(n){return"Þú getur aðeins valið "+n.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"},removeAllItems:function(){return"Fjarlægðu öll atriði"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/it.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Per favore cancella "+n+" caratter";return t+=1!==n?"i":"e"},inputTooShort:function(e){return"Per favore inserisci "+(e.minimum-e.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var n="Puoi selezionare solo "+e.maximum+" element";return 1!==e.maximum?n+="i":n+="o",n},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/ja.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.input.length-n.maximum+" 文字を削除してください"},inputTooShort:function(n){return"少なくとも "+(n.minimum-n.input.length)+" 文字を入力してください"},loadingMore:function(){return"読み込み中…"},maximumSelected:function(n){return n.maximum+" 件しか選択できません"},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"},removeAllItems:function(){return"すべてのアイテムを削除"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/ka.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/km.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(n){return"សូមលុបចេញ "+(n.input.length-n.maximum)+" អក្សរ"},inputTooShort:function(n){return"សូមបញ្ចូល"+(n.minimum-n.input.length)+" អក្សរ រឺ ច្រើនជាងនេះ"},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(n){return"អ្នកអាចជ្រើសរើសបានតែ "+n.maximum+" ជម្រើសប៉ុណ្ណោះ"},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."},removeAllItems:function(){return"លុបធាតុទាំងអស់"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/ko.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/lt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?i:t}return{inputTooLong:function(e){var i=e.input.length-e.maximum,t="Pašalinkite "+i+" simbol";return t+=n(i,"į","ius","ių")},inputTooShort:function(e){var i=e.minimum-e.input.length,t="Įrašykite dar "+i+" simbol";return t+=n(i,"į","ius","ių")},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(e){var i="Jūs galite pasirinkti tik "+e.maximum+" element";return i+=n(e.maximum,"ą","us","ų")},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"},removeAllItems:function(){return"Pašalinti visus elementus"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/lv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input.length-n.maximum,i="Lūdzu ievadiet par "+u;return(i+=" simbol"+e(u,"iem","u","iem"))+" mazāk"},inputTooShort:function(n){var u=n.minimum-n.input.length,i="Lūdzu ievadiet vēl "+u;return i+=" simbol"+e(u,"us","u","us")},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(n){var u="Jūs varat izvēlēties ne vairāk kā "+n.maximum;return u+=" element"+e(n.maximum,"us","u","us")},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"},removeAllItems:function(){return"Noņemt visus vienumus"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/mk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximum+" помалку карактер");return 1!==n.maximum&&(e+="и"),e},inputTooShort:function(n){var e=(n.minimum,n.input.length,"Ве молиме внесете уште "+n.maximum+" карактер");return 1!==n.maximum&&(e+="и"),e},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(n){var e="Можете да изберете само "+n.maximum+" ставк";return 1===n.maximum?e+="а":e+="и",e},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"},removeAllItems:function(){return"Отстрани ги сите предмети"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/ms.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(n){return"Sila hapuskan "+(n.input.length-n.maximum)+" aksara"},inputTooShort:function(n){return"Sila masukkan "+(n.minimum-n.input.length)+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(n){return"Anda hanya boleh memilih "+n.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Keluarkan semua item"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/nb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){return"Vennligst fjern "+(e.input.length-e.maximum)+" tegn"},inputTooShort:function(e){return"Vennligst skriv inn "+(e.minimum-e.input.length)+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/ne.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/nl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){return"Gelieve "+(e.input.length-e.maximum)+" karakters te verwijderen"},inputTooShort:function(e){return"Gelieve "+(e.minimum-e.input.length)+" of meer karakters in te voeren"},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var n=1==e.maximum?"kan":"kunnen",r="Er "+n+" maar "+e.maximum+" item";return 1!=e.maximum&&(r+="s"),r+=" worden geselecteerd"},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"},removeAllItems:function(){return"Verwijder alle items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/pl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1===n?e[0]:n>1&&n<=4?e[1]:n>=5?e[2]:void 0};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Usuń "+t+" "+r(t,n)},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Podaj przynajmniej "+t+" "+r(t,n)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(n){return"Możesz zaznaczyć tylko "+n.maximum+" "+r(n.maximum,e)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"},removeAllItems:function(){return"Usuń wszystkie przedmioty"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/ps.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/pt-BR.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/pt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/ro.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/ru.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/sk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadajte o jeden znak menej":t>=2&&t<=4?"Prosím, zadajte o "+e[t](!0)+" znaky menej":"Prosím, zadajte o "+t+" znakov menej"},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadajte ešte jeden znak":t<=4?"Prosím, zadajte ešte ďalšie "+e[t](!0)+" znaky":"Prosím, zadajte ešte ďalších "+t+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(n){return 1==n.maximum?"Môžete zvoliť len jednu položku":n.maximum>=2&&n.maximum<=4?"Môžete zvoliť najviac "+e[n.maximum](!1)+" položky":"Môžete zvoliť najviac "+n.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"},removeAllItems:function(){return"Odstráňte všetky položky"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/sl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/sq.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/sr-Cyrl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/sr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/sv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/th.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return"โปรดลบออก "+(n.input.length-n.maximum)+" ตัวอักษร"},inputTooShort:function(n){return"โปรดพิมพ์เพิ่มอีก "+(n.minimum-n.input.length)+" ตัวอักษร"},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(n){return"คุณสามารถเลือกได้ไม่เกิน "+n.maximum+" รายการ"},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"},removeAllItems:function(){return"ลบรายการทั้งหมด"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/tk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/tr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(n){return n.input.length-n.maximum+" karakter daha girmelisiniz"},inputTooShort:function(n){return"En az "+(n.minimum-n.input.length)+" karakter daha girmelisiniz"},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(n){return"Sadece "+n.maximum+" seçim yapabilirsiniz"},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"},removeAllItems:function(){return"Tüm öğeleri kaldır"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/uk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/vi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/vi",[],function(){return{inputTooLong:function(n){return"Vui lòng xóa bớt "+(n.input.length-n.maximum)+" ký tự"},inputTooShort:function(n){return"Vui lòng nhập thêm từ "+(n.minimum-n.input.length)+" ký tự trở lên"},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(n){return"Chỉ có thể chọn được "+n.maximum+" lựa chọn"},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"},removeAllItems:function(){return"Xóa tất cả các mục"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/zh-CN.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/select2/i18n/zh-TW.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /djangopj/static/admin/js/vendor/xregexp/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2007-2017 Steven Levithan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /djangopj/static/common/css/base.css: -------------------------------------------------------------------------------- 1 | 2 | * { 3 | margin: 0; 4 | } 5 | 6 | *, *:before, *:after { 7 | box-sizing: border-box; 8 | } 9 | 10 | 11 | body { 12 | margin: 40px; 13 | font-family: 'Open Sans', 'sans-serif'; 14 | background-color: #000033; 15 | } 16 | 17 | .header{ 18 | margin: 0; 19 | padding: 0; 20 | } 21 | 22 | .header-logo { 23 | float: left; 24 | } 25 | 26 | .header-list { 27 | float: right; 28 | } 29 | 30 | .header-list ul li{ 31 | display: inline; 32 | } 33 | 34 | h1, p { 35 | margin: 0 0 1em 0; 36 | } 37 | 38 | .wrapper { 39 | max-width: 1020px; 40 | margin: 0 20px; 41 | display: grid; 42 | grid-gap: 10px; 43 | } 44 | 45 | .wrapper > * { 46 | background-color: #FFFFFF; 47 | border-radius: 5px; 48 | padding: 20px; 49 | font-size: 150%; 50 | margin-bottom: 10px; 51 | } 52 | 53 | @supports (display: grid) { 54 | .wrapper > * { 55 | width: auto; 56 | margin: 0; 57 | } 58 | } 59 | 60 | 61 | @media screen and (min-width: 980px) { 62 | margin: 0px; 63 | .sidebar { 64 | float: left; 65 | width: 19.1489%; 66 | } 67 | 68 | .content { 69 | float: right; 70 | width: 100%; 71 | } 72 | 73 | .wrapper { 74 | margin: 0 auto; 75 | grid-template-columns: 1fr 3fr; 76 | } 77 | 78 | .header, .footer { 79 | grid-column: 1 / -1; 80 | clear: both; 81 | } 82 | } -------------------------------------------------------------------------------- /djangopj/templates/403.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %}403 Forbidden{% endblock %} 4 | 5 | {% block content %} 6 |
    7 |
    8 |

    403 Forbidden

    9 |
    10 |

    Sorry, it appears the page you were looking for is forbidden and not accessible.

    11 | {% if exception %} 12 |

    {{ exception }}

    13 | {% endif %} 14 |
    15 |
    16 |

    < Back

    17 |
    18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /djangopj/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %}404 Page Not Found{% endblock %} 4 | 5 | {% block content %} 6 |
    7 |
    8 |

    404 Page Not Found

    9 |

    The requested URL {{ request.get_full_path }} was not found on this server.

    10 |
    11 |
    12 |
    13 |

    < Back

    14 |
    15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /djangopj/templates/base.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | {% block title %}{% endblock %} 5 | 6 | 7 | 8 |
    9 |
    10 | 11 |
    12 | 21 |
    22 |
    23 | 24 |
    25 | {% block content %}{% endblock %} 26 |
    27 |
    28 | Source is available at github 29 |
    30 |
    31 | 32 | 33 | -------------------------------------------------------------------------------- /djangopj/templates/registration/logged_out.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %}Logout{% endblock %} 4 | 5 | {% block content %} 6 |

    Logged Out

    7 |

    Thanks for spending some quality time with the Web site today.

    8 |

    Log in again

    9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /djangopj/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 | {% if form.errors %} 6 |

    Your username and password didn't match. Please try again.

    7 | {% endif %} 8 | 9 | {% if next %} 10 | {% if user.is_authenticated %} 11 |

    Your account doesn't have access to this page. To proceed, 12 | please login with an account that has access.

    13 | {% else %} 14 |

    Please login to see this page.

    15 | {% endif %} 16 | {% endif %} 17 | 18 |
    19 | {% csrf_token %} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
    {{ form.username.label_tag }}{{ form.username }}
    {{ form.password.label_tag }}{{ form.password }}
    30 | 31 | 32 | 33 |
    34 | 35 | {# Assumes you setup the password_reset view in your URLconf #} 36 |

    Lost password?

    37 | 38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /djangopj/templates/registration/password_reset_complete.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %}Password reset complete{% endblock %} 4 | 5 | {% block content %} 6 |

    Password reset complete

    7 |

    Your new password has been set. You can log in now on the log in page.

    8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /djangopj/templates/registration/password_reset_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %}Enter new password{% endblock %} 4 | 5 | {% block content %} 6 | 7 | {% if validlink %} 8 | 9 |

    Set a new password!

    10 |
    11 | {% csrf_token %} 12 | {{ form.as_p }} 13 | 14 |
    15 | 16 | {% else %} 17 | 18 |

    {% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}

    19 | 20 | {% endif %} 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /djangopj/templates/registration/password_reset_done.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %}Email Sent{% endblock %} 4 | 5 | {% block content %} 6 |

    Check your inbox.

    7 |

    We've emailed you instructions for setting your password. You should receive the email shortly!

    8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /djangopj/templates/registration/password_reset_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %}Forgot Your Password?{% endblock %} 4 | 5 | {% block content %} 6 |

    Forgot your password?

    7 |

    Enter your email address below, and we'll email instructions for setting a new one.

    8 | 9 |
    10 | {% csrf_token %} 11 | {{ form.as_p }} 12 | 13 |
    14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /doc/img/Site_administration_Django_site_admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/doc/img/Site_administration_Django_site_admin.png -------------------------------------------------------------------------------- /doc/img/localhost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hikarine3/docker-django-postgresql/d196c5ee27124211749945862573af677cd37547/doc/img/localhost.png -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | web: 4 | build: . 5 | image: django_app_by_1stclass:1.2 6 | container_name: django_app_by_1stclass 7 | command: gunicorn djangopj.wsgi:application -w 2 -b :8000 8 | ports: 9 | - "8000:8000" 10 | links: 11 | - postgres:postgres 12 | restart: always 13 | volumes: 14 | - ./djangopj:/var/www/djangopj 15 | 16 | postgres: 17 | container_name: postgres_by_1stclass 18 | image: postgres:latest 19 | ports: 20 | - "5432:5432" 21 | restart: always 22 | volumes: 23 | # This data source path should be changed based on env 24 | - pgdata:/var/lib/postgresql/data 25 | - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d 26 | - ./backups/postgresql:/backup 27 | environment: 28 | - DB_NAME=${DB_NAME} 29 | - POSTGRES_USER=${POSTGRES_USER} 30 | - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} 31 | 32 | nginx: 33 | container_name: nginx_by_1stclass 34 | image: nginx:alpine 35 | links: 36 | - web:web 37 | ports: 38 | - "80:80" 39 | restart: always 40 | volumes: 41 | - ./djangopj:/var/www/djangopj 42 | - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf 43 | - ./_log/nginx:/var/log/nginx 44 | 45 | volumes: 46 | pgdata: 47 | -------------------------------------------------------------------------------- /nginx/conf/nginx.conf: -------------------------------------------------------------------------------- 1 | worker_processes auto; 2 | 3 | error_log /var/log/nginx/error.log warn; 4 | pid /var/run/nginx.pid; 5 | 6 | events { 7 | worker_connections 4096; ## Default: 1024 8 | } 9 | 10 | http { 11 | include /etc/nginx/mime.types; 12 | default_type application/octet-stream; 13 | log_format ltsv 'domain:$host\t' 14 | 'host:$remote_addr\t' 15 | 'user:$remote_user\t' 16 | 'time:$time_local\t' 17 | 'method:$request_method\t' 18 | 'path:$request_uri\t' 19 | 'protocol:$server_protocol\t' 20 | 'status:$status\t' 21 | 'size:$body_bytes_sent\t' 22 | 'referer:$http_referer\t' 23 | 'agent:$http_user_agent\t' 24 | 'response_time:$request_time\t' 25 | 'cookie:$http_cookie\t' 26 | 'set_cookie:$sent_http_set_cookie\t' 27 | 'upstream_addr:$upstream_addr\t' 28 | 'upstream_cache_status:$upstream_cache_status\t' 29 | 'upstream_response_time:$upstream_response_time'; 30 | access_log /var/log/nginx/access.log ltsv; 31 | sendfile on; 32 | tcp_nopush on; 33 | server_names_hash_bucket_size 128; # this seems to be required for some vhosts 34 | keepalive_timeout 65; 35 | gzip on; 36 | 37 | server { 38 | listen 80; 39 | server_name example.com 40 | ; 41 | location / { 42 | proxy_pass http://web:8000; 43 | proxy_set_header Host $host; 44 | proxy_set_header X-Real-IP $remote_addr; 45 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 46 | } 47 | location /static { 48 | alias /var/www/djangopj/static; 49 | } 50 | } 51 | # include /etc/nginx/conf.d/*.conf; 52 | } 53 | -------------------------------------------------------------------------------- /postgres/docker-entrypoint-initdb.d/myproject_web.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | psql -U postgres -c "CREATE USER $POSTGRES_USER PASSWORD '$POSTGRES_PASSWORD'" 3 | psql -U postgres -c "CREATE DATABASE $DB_NAME" 4 | psql -U postgres -c "GRANT ALL ON DATABASE $DB_NAME TO $POSTGRES_USER;" 5 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django~=4.0 2 | django-environ~=0.9 3 | gunicorn~=20.1 4 | psycopg2~=2.9 5 | -------------------------------------------------------------------------------- /set_venv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | source venv/bin/activate; 3 | 4 | --------------------------------------------------------------------------------