Compare commits
11
Commits
cbdda613b7
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a364f60e5 | ||
|
|
55c9032946 | ||
|
|
e016462c9f | ||
|
|
1b4eb2d70f | ||
|
|
c86cae2216 | ||
|
|
73437a9a7a | ||
|
|
325e5d8891 | ||
|
|
b7aadda74c | ||
|
|
95d6b4adee | ||
|
|
59716deba1 | ||
|
|
c0653bb776 |
No files matched your search
Executable
+90
@@ -0,0 +1,90 @@
|
|||||||
|
### OSX ###
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
|
||||||
|
# Icon must end with two \r
|
||||||
|
Icon
|
||||||
|
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear on external disk
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
|
||||||
|
# Directories potentially created on remote AFP share
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
|
|
||||||
|
|
||||||
|
### Python ###
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
env/
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.coverage
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
|
||||||
|
### Django ###
|
||||||
|
*.log
|
||||||
|
*.pot
|
||||||
|
*.pyc
|
||||||
|
**__pycache__/
|
||||||
|
local_settings.py
|
||||||
|
|
||||||
|
.env
|
||||||
|
**/db.sqlite3
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
**/.idea/
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaScriptSettings">
|
||||||
|
<option name="languageLevel" value="ES6" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (Django)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
||||||
File mode changed.
+33
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="django" name="Django">
|
||||||
|
<configuration>
|
||||||
|
<option name="rootFolder" value="$MODULE_DIR$" />
|
||||||
|
<option name="settingsModule" value="news/settings.py" />
|
||||||
|
<option name="manageScript" value="$MODULE_DIR$/manage.py" />
|
||||||
|
<option name="environment" value="<map/>" />
|
||||||
|
<option name="doNotUseTestRunner" value="false" />
|
||||||
|
<option name="trackFilePattern" value="migrations" />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.7 (Django)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
<component name="TemplatesService">
|
||||||
|
<option name="TEMPLATE_CONFIGURATION" value="Django" />
|
||||||
|
<option name="TEMPLATE_FOLDERS">
|
||||||
|
<list>
|
||||||
|
<option value="$MODULE_DIR$/templates" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="TestRunnerService">
|
||||||
|
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Regular → Executable
BIN
Binary file not shown.
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
"""Django's command-line utility for administrative tasks."""
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'news.settings')
|
||||||
|
try:
|
||||||
|
from django.core.management import execute_from_command_line
|
||||||
|
except ImportError as exc:
|
||||||
|
raise ImportError(
|
||||||
|
"Couldn't import Django. Are you sure it's installed and "
|
||||||
|
"available on your PYTHONPATH environment variable? Did you "
|
||||||
|
"forget to activate a virtual environment?"
|
||||||
|
) from exc
|
||||||
|
execute_from_command_line(sys.argv)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
Regular → Executable
File mode changed.
Regular → Executable
+4
-2
@@ -20,7 +20,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|||||||
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = 'fl5b%@nhc2$@uyb)=w_2=#tf@q=%tc63r-4+njboarc*s5&3=e'
|
SECRET_KEY = 'a7-sm+iebhs_%pupu2emt!he8)x#u_l45vux&kbl6ze4hswfo5'
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
@@ -37,6 +37,8 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
'posts.apps.PostsConfig',
|
||||||
|
'rest_framework',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@@ -104,7 +106,7 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
||||||
|
|
||||||
LANGUAGE_CODE = 'en-us'
|
LANGUAGE_CODE = 'de-de'
|
||||||
|
|
||||||
TIME_ZONE = 'UTC'
|
TIME_ZONE = 'UTC'
|
||||||
|
|
||||||
|
|||||||
Regular → Executable
+4
-16
@@ -1,21 +1,9 @@
|
|||||||
"""news URL Configuration
|
|
||||||
|
|
||||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
||||||
https://docs.djangoproject.com/en/2.2/topics/http/urls/
|
|
||||||
Examples:
|
|
||||||
Function views
|
|
||||||
1. Add an import: from my_app import views
|
|
||||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
|
||||||
Class-based views
|
|
||||||
1. Add an import: from other_app.views import Home
|
|
||||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
|
||||||
Including another URLconf
|
|
||||||
1. Import the include() function: from django.urls import include, path
|
|
||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
||||||
"""
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path
|
from django.urls import path, include
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
path('posts/', include('posts.urls')),
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class PostsConfig(AppConfig):
|
||||||
|
name = 'posts'
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
from django import forms
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
|
||||||
|
class NoticeForm(forms.Form):
|
||||||
|
date_formats = ['%d.%m.%Y', '%d.%m.%y']
|
||||||
|
title = forms.CharField(label='Titel', max_length=80)
|
||||||
|
text = forms.CharField(label='Text', max_length=400)
|
||||||
|
start = forms.DateField(label='Von',
|
||||||
|
input_formats=date_formats,
|
||||||
|
initial=datetime.date.today)
|
||||||
|
end = forms.DateField(label='Bis',
|
||||||
|
input_formats=date_formats,
|
||||||
|
initial=datetime.date.today)
|
||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
# Generated by Django 2.2.7 on 2019-11-19 13:28
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Notice',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('notice_title', models.CharField(max_length=80)),
|
||||||
|
('notice_text', models.CharField(max_length=400)),
|
||||||
|
('pub_start', models.DateTimeField()),
|
||||||
|
('pub_end', models.DateTimeField()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
Regular → Executable
File mode changed.
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
|
# Create your models here.
|
||||||
|
class Notice(models.Model):
|
||||||
|
notice_title = models.CharField(max_length=80)
|
||||||
|
notice_text = models.CharField(max_length=400)
|
||||||
|
pub_start = models.DateTimeField()
|
||||||
|
pub_end = models.DateTimeField()
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from rest_framework import serializers
|
||||||
|
from .models import Notice
|
||||||
|
|
||||||
|
class NoticeSerializer(serializers.ModelSerializer):
|
||||||
|
class Meta:
|
||||||
|
model = Notice
|
||||||
|
fields = ('id', 'notice_title', 'notice_text', 'pub_start', 'pub_end')
|
||||||
Regular → Executable
File mode changed.
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
from django.urls import path
|
||||||
|
from . import views
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
path('', views.index, name='index'),
|
||||||
|
path('new', views.new, name='new'),
|
||||||
|
path('delete/<int:deleteId>', views.delete, name='delete'),
|
||||||
|
path('notices/', views.notice_list),
|
||||||
|
path('notices/<int:id>', views.notice_detail),
|
||||||
|
]
|
||||||
Regular → Executable
+73
-2
@@ -1,3 +1,74 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render, redirect
|
||||||
|
from .models import Notice
|
||||||
|
from django.utils import timezone
|
||||||
|
from .forms import NoticeForm
|
||||||
|
from .serializers import NoticeSerializer
|
||||||
|
from django.http import JsonResponse, HttpResponse
|
||||||
|
from rest_framework.parsers import JSONParser
|
||||||
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
|
|
||||||
# Create your views here.
|
|
||||||
|
def index(request):
|
||||||
|
notices = Notice.objects.all()
|
||||||
|
notices = notices.filter(pub_start__lte=timezone.now())
|
||||||
|
notices = notices.filter(pub_end__gte=timezone.now())
|
||||||
|
context = {"notices": notices}
|
||||||
|
return render(request, 'posts/index.html', context)
|
||||||
|
|
||||||
|
|
||||||
|
def new(request):
|
||||||
|
if request.method == "POST":
|
||||||
|
form = NoticeForm(request.POST)
|
||||||
|
if form.is_valid():
|
||||||
|
newNotice = Notice(notice_title=form.cleaned_data['title'],
|
||||||
|
notice_text=form.cleaned_data['text'],
|
||||||
|
pub_start=form.cleaned_data['start'],
|
||||||
|
pub_end=form.cleaned_data['end'])
|
||||||
|
newNotice.save()
|
||||||
|
return redirect('index')
|
||||||
|
context = {'form': NoticeForm()}
|
||||||
|
return render(request, 'posts/edit.html', context)
|
||||||
|
|
||||||
|
def delete(request, deleteId=None):
|
||||||
|
if deleteId != None:
|
||||||
|
delNotice = Notice.objects.get(id=deleteId)
|
||||||
|
if delNotice != None:
|
||||||
|
delNotice.delete()
|
||||||
|
return redirect('index')
|
||||||
|
@csrf_exempt
|
||||||
|
|
||||||
|
def notice_list(request):
|
||||||
|
if request.method == 'GET':
|
||||||
|
notices = Notice.objects.all()
|
||||||
|
serializer = NoticeSerializer(notices, many=True)
|
||||||
|
return JsonResponse(serializer.data, safe=False)
|
||||||
|
|
||||||
|
elif request.method == 'POST':
|
||||||
|
data = JSONParser().parse(request)
|
||||||
|
serializer = NoticeSerializer(data=data)
|
||||||
|
if serializer.is_valid():
|
||||||
|
serializer.save()
|
||||||
|
return JsonResponse(serializer.data, status=201)
|
||||||
|
return JsonResponse(serializer.errors, status=400)
|
||||||
|
@csrf_exempt
|
||||||
|
def notice_detail(request, id):
|
||||||
|
try:
|
||||||
|
notice = Notice.objects.get(id=id)
|
||||||
|
except Notice.DoesNotExist:
|
||||||
|
return HttpResponse(status=404)
|
||||||
|
|
||||||
|
if request.method == 'GET':
|
||||||
|
serializer = NoticeSerializer(notice)
|
||||||
|
return JsonResponse(serializer.data)
|
||||||
|
|
||||||
|
elif request.method == 'PUT':
|
||||||
|
data = JSONParser().parse(request)
|
||||||
|
serializer = NoticeSerializer(notice, data=data)
|
||||||
|
if serializer.is_valid():
|
||||||
|
serializer.save()
|
||||||
|
return JsonResponse(serializer.data)
|
||||||
|
return JsonResponse(serializer.errors, status=400)
|
||||||
|
|
||||||
|
elif request.method == 'DELETE':
|
||||||
|
notice.delete()
|
||||||
|
return HttpResponse(status=204)
|
||||||
Executable
+22
@@ -0,0 +1,22 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>{% block title %} Platzhalter {% endblock %}</title>
|
||||||
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||||
|
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||||
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
||||||
|
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
|
||||||
|
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
|
||||||
|
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{% block navigation %} Platzhalter {% endblock %}
|
||||||
|
{% block content %} Platzhalter {% endblock %}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
News
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{%block content %}
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<h1>Neue Nachricht</h1>
|
||||||
|
<form method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form.as_p }}
|
||||||
|
<button type="submit" class="save btn btn-default">Speichern</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
Executable
+26
@@ -0,0 +1,26 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
News
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
{% for notice in notices %}
|
||||||
|
<h3>{{ notice.notice_title }}</h3>
|
||||||
|
<p>{{ notice.notice_text }}</p>
|
||||||
|
<p><a href="{% url 'new' %}" class="btn btn-info" role="button">Neue Nachricht</a></p>
|
||||||
|
|
||||||
|
|
||||||
|
<p><a href= "{% url 'delete' deleteId=notice.id %}" class="btn btn-danger">
|
||||||
|
Meldung loeschen</a></p>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
Executable
+76
@@ -0,0 +1,76 @@
|
|||||||
|
# This file must be used with "source bin/activate" *from bash*
|
||||||
|
# you cannot run it directly
|
||||||
|
|
||||||
|
deactivate () {
|
||||||
|
# reset old environment variables
|
||||||
|
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
|
||||||
|
PATH="${_OLD_VIRTUAL_PATH:-}"
|
||||||
|
export PATH
|
||||||
|
unset _OLD_VIRTUAL_PATH
|
||||||
|
fi
|
||||||
|
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
|
||||||
|
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
|
||||||
|
export PYTHONHOME
|
||||||
|
unset _OLD_VIRTUAL_PYTHONHOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This should detect bash and zsh, which have a hash command that must
|
||||||
|
# be called to get it to forget past commands. Without forgetting
|
||||||
|
# past commands the $PATH changes we made may not be respected
|
||||||
|
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
||||||
|
hash -r
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
|
||||||
|
PS1="${_OLD_VIRTUAL_PS1:-}"
|
||||||
|
export PS1
|
||||||
|
unset _OLD_VIRTUAL_PS1
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset VIRTUAL_ENV
|
||||||
|
if [ ! "$1" = "nondestructive" ] ; then
|
||||||
|
# Self destruct!
|
||||||
|
unset -f deactivate
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# unset irrelevant variables
|
||||||
|
deactivate nondestructive
|
||||||
|
|
||||||
|
VIRTUAL_ENV="/Users/herrerahuezoul67409/PycharmProjects/Django/venv"
|
||||||
|
export VIRTUAL_ENV
|
||||||
|
|
||||||
|
_OLD_VIRTUAL_PATH="$PATH"
|
||||||
|
PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
# unset PYTHONHOME if set
|
||||||
|
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
|
||||||
|
# could use `if (set -u; : $PYTHONHOME) ;` in bash
|
||||||
|
if [ -n "${PYTHONHOME:-}" ] ; then
|
||||||
|
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
|
||||||
|
unset PYTHONHOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
|
||||||
|
_OLD_VIRTUAL_PS1="${PS1:-}"
|
||||||
|
if [ "x(venv) " != x ] ; then
|
||||||
|
PS1="(venv) ${PS1:-}"
|
||||||
|
else
|
||||||
|
if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
|
||||||
|
# special case for Aspen magic directories
|
||||||
|
# see http://www.zetadev.com/software/aspen/
|
||||||
|
PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
|
||||||
|
else
|
||||||
|
PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
export PS1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This should detect bash and zsh, which have a hash command that must
|
||||||
|
# be called to get it to forget past commands. Without forgetting
|
||||||
|
# past commands the $PATH changes we made may not be respected
|
||||||
|
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
||||||
|
hash -r
|
||||||
|
fi
|
||||||
Executable
+37
@@ -0,0 +1,37 @@
|
|||||||
|
# This file must be used with "source bin/activate.csh" *from csh*.
|
||||||
|
# You cannot run it directly.
|
||||||
|
# Created by Davide Di Blasi <davidedb@gmail.com>.
|
||||||
|
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
|
||||||
|
|
||||||
|
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate'
|
||||||
|
|
||||||
|
# Unset irrelevant variables.
|
||||||
|
deactivate nondestructive
|
||||||
|
|
||||||
|
setenv VIRTUAL_ENV "/Users/herrerahuezoul67409/PycharmProjects/Django/venv"
|
||||||
|
|
||||||
|
set _OLD_VIRTUAL_PATH="$PATH"
|
||||||
|
setenv PATH "$VIRTUAL_ENV/bin:$PATH"
|
||||||
|
|
||||||
|
|
||||||
|
set _OLD_VIRTUAL_PROMPT="$prompt"
|
||||||
|
|
||||||
|
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
|
||||||
|
if ("venv" != "") then
|
||||||
|
set env_name = "venv"
|
||||||
|
else
|
||||||
|
if (`basename "VIRTUAL_ENV"` == "__") then
|
||||||
|
# special case for Aspen magic directories
|
||||||
|
# see http://www.zetadev.com/software/aspen/
|
||||||
|
set env_name = `basename \`dirname "$VIRTUAL_ENV"\``
|
||||||
|
else
|
||||||
|
set env_name = `basename "$VIRTUAL_ENV"`
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
set prompt = "[$env_name] $prompt"
|
||||||
|
unset env_name
|
||||||
|
endif
|
||||||
|
|
||||||
|
alias pydoc python -m pydoc
|
||||||
|
|
||||||
|
rehash
|
||||||
Executable
+75
@@ -0,0 +1,75 @@
|
|||||||
|
# This file must be used with ". bin/activate.fish" *from fish* (http://fishshell.org)
|
||||||
|
# you cannot run it directly
|
||||||
|
|
||||||
|
function deactivate -d "Exit virtualenv and return to normal shell environment"
|
||||||
|
# reset old environment variables
|
||||||
|
if test -n "$_OLD_VIRTUAL_PATH"
|
||||||
|
set -gx PATH $_OLD_VIRTUAL_PATH
|
||||||
|
set -e _OLD_VIRTUAL_PATH
|
||||||
|
end
|
||||||
|
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
|
||||||
|
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
|
||||||
|
set -e _OLD_VIRTUAL_PYTHONHOME
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
|
||||||
|
functions -e fish_prompt
|
||||||
|
set -e _OLD_FISH_PROMPT_OVERRIDE
|
||||||
|
functions -c _old_fish_prompt fish_prompt
|
||||||
|
functions -e _old_fish_prompt
|
||||||
|
end
|
||||||
|
|
||||||
|
set -e VIRTUAL_ENV
|
||||||
|
if test "$argv[1]" != "nondestructive"
|
||||||
|
# Self destruct!
|
||||||
|
functions -e deactivate
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# unset irrelevant variables
|
||||||
|
deactivate nondestructive
|
||||||
|
|
||||||
|
set -gx VIRTUAL_ENV "/Users/herrerahuezoul67409/PycharmProjects/Django/venv"
|
||||||
|
|
||||||
|
set -gx _OLD_VIRTUAL_PATH $PATH
|
||||||
|
set -gx PATH "$VIRTUAL_ENV/bin" $PATH
|
||||||
|
|
||||||
|
# unset PYTHONHOME if set
|
||||||
|
if set -q PYTHONHOME
|
||||||
|
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
|
||||||
|
set -e PYTHONHOME
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
|
||||||
|
# fish uses a function instead of an env var to generate the prompt.
|
||||||
|
|
||||||
|
# save the current fish_prompt function as the function _old_fish_prompt
|
||||||
|
functions -c fish_prompt _old_fish_prompt
|
||||||
|
|
||||||
|
# with the original prompt function renamed, we can override with our own.
|
||||||
|
function fish_prompt
|
||||||
|
# Save the return status of the last command
|
||||||
|
set -l old_status $status
|
||||||
|
|
||||||
|
# Prompt override?
|
||||||
|
if test -n "(venv) "
|
||||||
|
printf "%s%s" "(venv) " (set_color normal)
|
||||||
|
else
|
||||||
|
# ...Otherwise, prepend env
|
||||||
|
set -l _checkbase (basename "$VIRTUAL_ENV")
|
||||||
|
if test $_checkbase = "__"
|
||||||
|
# special case for Aspen magic directories
|
||||||
|
# see http://www.zetadev.com/software/aspen/
|
||||||
|
printf "%s[%s]%s " (set_color -b blue white) (basename (dirname "$VIRTUAL_ENV")) (set_color normal)
|
||||||
|
else
|
||||||
|
printf "%s(%s)%s" (set_color -b blue white) (basename "$VIRTUAL_ENV") (set_color normal)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Restore the return status of the previous command.
|
||||||
|
echo "exit $old_status" | .
|
||||||
|
_old_fish_prompt
|
||||||
|
end
|
||||||
|
|
||||||
|
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
|
||||||
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/Users/khaloufam70043/Documents/news/venv/bin/python
|
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import re
|
import re
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/Users/khaloufam70043/Documents/news/venv/bin/python
|
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
||||||
from django.core import management
|
from django.core import management
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/Users/khaloufam70043/Documents/news/venv/bin/python
|
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
||||||
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install'
|
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install'
|
||||||
__requires__ = 'setuptools==39.1.0'
|
__requires__ = 'setuptools==39.1.0'
|
||||||
import re
|
import re
|
||||||
|
|||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
||||||
|
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7'
|
||||||
|
__requires__ = 'setuptools==39.1.0'
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from pkg_resources import load_entry_point
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||||
|
sys.exit(
|
||||||
|
load_entry_point('setuptools==39.1.0', 'console_scripts', 'easy_install-3.7')()
|
||||||
|
)
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
||||||
|
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip'
|
||||||
|
__requires__ = 'pip==10.0.1'
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from pkg_resources import load_entry_point
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||||
|
sys.exit(
|
||||||
|
load_entry_point('pip==10.0.1', 'console_scripts', 'pip')()
|
||||||
|
)
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#!/Users/khaloufam70043/Documents/news/venv/bin/python
|
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
||||||
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3'
|
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3'
|
||||||
__requires__ = 'pip==10.0.1'
|
__requires__ = 'pip==10.0.1'
|
||||||
import re
|
import re
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#!/Users/khaloufam70043/Documents/news/venv/bin/python
|
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
||||||
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7'
|
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7'
|
||||||
__requires__ = 'pip==10.0.1'
|
__requires__ = 'pip==10.0.1'
|
||||||
import re
|
import re
|
||||||
|
|||||||
Executable
BIN
Binary file not shown.
Executable
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from sqlparse.__main__ import main
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||||
|
sys.exit(main())
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -1 +0,0 @@
|
|||||||
django
|
|
||||||
Regular → Executable
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
from django.utils.version import get_version
|
from django.utils.version import get_version
|
||||||
|
|
||||||
VERSION = (2, 2, 6, 'final', 0)
|
VERSION = (2, 2, 7, 'final', 0)
|
||||||
|
|
||||||
__version__ = get_version(VERSION)
|
__version__ = get_version(VERSION)
|
||||||
|
|
||||||
|
|||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
"""
|
||||||
|
Invokes django-admin when the django module is run as a script.
|
||||||
|
|
||||||
|
Example: python -m django check
|
||||||
|
"""
|
||||||
|
from django.core import management
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
management.execute_from_command_line()
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from .config import AppConfig
|
||||||
|
from .registry import apps
|
||||||
|
|
||||||
|
__all__ = ['AppConfig', 'apps']
|
||||||
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
from django.core import management
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
management.execute_from_command_line()
|
||||||
+255
@@ -0,0 +1,255 @@
|
|||||||
|
"""
|
||||||
|
Settings and configuration for Django.
|
||||||
|
|
||||||
|
Read values from the module specified by the DJANGO_SETTINGS_MODULE environment
|
||||||
|
variable, and then from django.conf.global_settings; see the global_settings.py
|
||||||
|
for a list of all possible variables.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import importlib
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
import traceback
|
||||||
|
import warnings
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import django
|
||||||
|
from django.conf import global_settings
|
||||||
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
from django.utils.deprecation import (
|
||||||
|
RemovedInDjango30Warning, RemovedInDjango31Warning,
|
||||||
|
)
|
||||||
|
from django.utils.functional import LazyObject, empty
|
||||||
|
|
||||||
|
ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"
|
||||||
|
|
||||||
|
DEFAULT_CONTENT_TYPE_DEPRECATED_MSG = 'The DEFAULT_CONTENT_TYPE setting is deprecated.'
|
||||||
|
FILE_CHARSET_DEPRECATED_MSG = (
|
||||||
|
'The FILE_CHARSET setting is deprecated. Starting with Django 3.1, all '
|
||||||
|
'files read from disk must be UTF-8 encoded.'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class SettingsReference(str):
|
||||||
|
"""
|
||||||
|
String subclass which references a current settings value. It's treated as
|
||||||
|
the value in memory but serializes to a settings.NAME attribute reference.
|
||||||
|
"""
|
||||||
|
def __new__(self, value, setting_name):
|
||||||
|
return str.__new__(self, value)
|
||||||
|
|
||||||
|
def __init__(self, value, setting_name):
|
||||||
|
self.setting_name = setting_name
|
||||||
|
|
||||||
|
|
||||||
|
class LazySettings(LazyObject):
|
||||||
|
"""
|
||||||
|
A lazy proxy for either global Django settings or a custom settings object.
|
||||||
|
The user can manually configure settings prior to using them. Otherwise,
|
||||||
|
Django uses the settings module pointed to by DJANGO_SETTINGS_MODULE.
|
||||||
|
"""
|
||||||
|
def _setup(self, name=None):
|
||||||
|
"""
|
||||||
|
Load the settings module pointed to by the environment variable. This
|
||||||
|
is used the first time settings are needed, if the user hasn't
|
||||||
|
configured settings manually.
|
||||||
|
"""
|
||||||
|
settings_module = os.environ.get(ENVIRONMENT_VARIABLE)
|
||||||
|
if not settings_module:
|
||||||
|
desc = ("setting %s" % name) if name else "settings"
|
||||||
|
raise ImproperlyConfigured(
|
||||||
|
"Requested %s, but settings are not configured. "
|
||||||
|
"You must either define the environment variable %s "
|
||||||
|
"or call settings.configure() before accessing settings."
|
||||||
|
% (desc, ENVIRONMENT_VARIABLE))
|
||||||
|
|
||||||
|
self._wrapped = Settings(settings_module)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
# Hardcode the class name as otherwise it yields 'Settings'.
|
||||||
|
if self._wrapped is empty:
|
||||||
|
return '<LazySettings [Unevaluated]>'
|
||||||
|
return '<LazySettings "%(settings_module)s">' % {
|
||||||
|
'settings_module': self._wrapped.SETTINGS_MODULE,
|
||||||
|
}
|
||||||
|
|
||||||
|
def __getattr__(self, name):
|
||||||
|
"""Return the value of a setting and cache it in self.__dict__."""
|
||||||
|
if self._wrapped is empty:
|
||||||
|
self._setup(name)
|
||||||
|
val = getattr(self._wrapped, name)
|
||||||
|
self.__dict__[name] = val
|
||||||
|
return val
|
||||||
|
|
||||||
|
def __setattr__(self, name, value):
|
||||||
|
"""
|
||||||
|
Set the value of setting. Clear all cached values if _wrapped changes
|
||||||
|
(@override_settings does this) or clear single values when set.
|
||||||
|
"""
|
||||||
|
if name == '_wrapped':
|
||||||
|
self.__dict__.clear()
|
||||||
|
else:
|
||||||
|
self.__dict__.pop(name, None)
|
||||||
|
super().__setattr__(name, value)
|
||||||
|
|
||||||
|
def __delattr__(self, name):
|
||||||
|
"""Delete a setting and clear it from cache if needed."""
|
||||||
|
super().__delattr__(name)
|
||||||
|
self.__dict__.pop(name, None)
|
||||||
|
|
||||||
|
def configure(self, default_settings=global_settings, **options):
|
||||||
|
"""
|
||||||
|
Called to manually configure the settings. The 'default_settings'
|
||||||
|
parameter sets where to retrieve any unspecified values from (its
|
||||||
|
argument must support attribute access (__getattr__)).
|
||||||
|
"""
|
||||||
|
if self._wrapped is not empty:
|
||||||
|
raise RuntimeError('Settings already configured.')
|
||||||
|
holder = UserSettingsHolder(default_settings)
|
||||||
|
for name, value in options.items():
|
||||||
|
setattr(holder, name, value)
|
||||||
|
self._wrapped = holder
|
||||||
|
|
||||||
|
@property
|
||||||
|
def configured(self):
|
||||||
|
"""Return True if the settings have already been configured."""
|
||||||
|
return self._wrapped is not empty
|
||||||
|
|
||||||
|
@property
|
||||||
|
def DEFAULT_CONTENT_TYPE(self):
|
||||||
|
stack = traceback.extract_stack()
|
||||||
|
# Show a warning if the setting is used outside of Django.
|
||||||
|
# Stack index: -1 this line, -2 the caller.
|
||||||
|
filename, _line_number, _function_name, _text = stack[-2]
|
||||||
|
if not filename.startswith(os.path.dirname(django.__file__)):
|
||||||
|
warnings.warn(
|
||||||
|
DEFAULT_CONTENT_TYPE_DEPRECATED_MSG,
|
||||||
|
RemovedInDjango30Warning,
|
||||||
|
stacklevel=2,
|
||||||
|
)
|
||||||
|
return self.__getattr__('DEFAULT_CONTENT_TYPE')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def FILE_CHARSET(self):
|
||||||
|
stack = traceback.extract_stack()
|
||||||
|
# Show a warning if the setting is used outside of Django.
|
||||||
|
# Stack index: -1 this line, -2 the caller.
|
||||||
|
filename, _line_number, _function_name, _text = stack[-2]
|
||||||
|
if not filename.startswith(os.path.dirname(django.__file__)):
|
||||||
|
warnings.warn(
|
||||||
|
FILE_CHARSET_DEPRECATED_MSG,
|
||||||
|
RemovedInDjango31Warning,
|
||||||
|
stacklevel=2,
|
||||||
|
)
|
||||||
|
return self.__getattr__('FILE_CHARSET')
|
||||||
|
|
||||||
|
|
||||||
|
class Settings:
|
||||||
|
def __init__(self, settings_module):
|
||||||
|
# update this dict from global settings (but only for ALL_CAPS settings)
|
||||||
|
for setting in dir(global_settings):
|
||||||
|
if setting.isupper():
|
||||||
|
setattr(self, setting, getattr(global_settings, setting))
|
||||||
|
|
||||||
|
# store the settings module in case someone later cares
|
||||||
|
self.SETTINGS_MODULE = settings_module
|
||||||
|
|
||||||
|
mod = importlib.import_module(self.SETTINGS_MODULE)
|
||||||
|
|
||||||
|
tuple_settings = (
|
||||||
|
"INSTALLED_APPS",
|
||||||
|
"TEMPLATE_DIRS",
|
||||||
|
"LOCALE_PATHS",
|
||||||
|
)
|
||||||
|
self._explicit_settings = set()
|
||||||
|
for setting in dir(mod):
|
||||||
|
if setting.isupper():
|
||||||
|
setting_value = getattr(mod, setting)
|
||||||
|
|
||||||
|
if (setting in tuple_settings and
|
||||||
|
not isinstance(setting_value, (list, tuple))):
|
||||||
|
raise ImproperlyConfigured("The %s setting must be a list or a tuple. " % setting)
|
||||||
|
setattr(self, setting, setting_value)
|
||||||
|
self._explicit_settings.add(setting)
|
||||||
|
|
||||||
|
if not self.SECRET_KEY:
|
||||||
|
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
|
||||||
|
|
||||||
|
if self.is_overridden('DEFAULT_CONTENT_TYPE'):
|
||||||
|
warnings.warn(DEFAULT_CONTENT_TYPE_DEPRECATED_MSG, RemovedInDjango30Warning)
|
||||||
|
if self.is_overridden('FILE_CHARSET'):
|
||||||
|
warnings.warn(FILE_CHARSET_DEPRECATED_MSG, RemovedInDjango31Warning)
|
||||||
|
|
||||||
|
if hasattr(time, 'tzset') and self.TIME_ZONE:
|
||||||
|
# When we can, attempt to validate the timezone. If we can't find
|
||||||
|
# this file, no check happens and it's harmless.
|
||||||
|
zoneinfo_root = Path('/usr/share/zoneinfo')
|
||||||
|
zone_info_file = zoneinfo_root.joinpath(*self.TIME_ZONE.split('/'))
|
||||||
|
if zoneinfo_root.exists() and not zone_info_file.exists():
|
||||||
|
raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)
|
||||||
|
# Move the time zone info into os.environ. See ticket #2315 for why
|
||||||
|
# we don't do this unconditionally (breaks Windows).
|
||||||
|
os.environ['TZ'] = self.TIME_ZONE
|
||||||
|
time.tzset()
|
||||||
|
|
||||||
|
def is_overridden(self, setting):
|
||||||
|
return setting in self._explicit_settings
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return '<%(cls)s "%(settings_module)s">' % {
|
||||||
|
'cls': self.__class__.__name__,
|
||||||
|
'settings_module': self.SETTINGS_MODULE,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class UserSettingsHolder:
|
||||||
|
"""Holder for user configured settings."""
|
||||||
|
# SETTINGS_MODULE doesn't make much sense in the manually configured
|
||||||
|
# (standalone) case.
|
||||||
|
SETTINGS_MODULE = None
|
||||||
|
|
||||||
|
def __init__(self, default_settings):
|
||||||
|
"""
|
||||||
|
Requests for configuration variables not in this class are satisfied
|
||||||
|
from the module specified in default_settings (if possible).
|
||||||
|
"""
|
||||||
|
self.__dict__['_deleted'] = set()
|
||||||
|
self.default_settings = default_settings
|
||||||
|
|
||||||
|
def __getattr__(self, name):
|
||||||
|
if name in self._deleted:
|
||||||
|
raise AttributeError
|
||||||
|
return getattr(self.default_settings, name)
|
||||||
|
|
||||||
|
def __setattr__(self, name, value):
|
||||||
|
self._deleted.discard(name)
|
||||||
|
if name == 'DEFAULT_CONTENT_TYPE':
|
||||||
|
warnings.warn(DEFAULT_CONTENT_TYPE_DEPRECATED_MSG, RemovedInDjango30Warning)
|
||||||
|
elif name == 'FILE_CHARSET':
|
||||||
|
warnings.warn(FILE_CHARSET_DEPRECATED_MSG, RemovedInDjango31Warning)
|
||||||
|
super().__setattr__(name, value)
|
||||||
|
|
||||||
|
def __delattr__(self, name):
|
||||||
|
self._deleted.add(name)
|
||||||
|
if hasattr(self, name):
|
||||||
|
super().__delattr__(name)
|
||||||
|
|
||||||
|
def __dir__(self):
|
||||||
|
return sorted(
|
||||||
|
s for s in [*self.__dict__, *dir(self.default_settings)]
|
||||||
|
if s not in self._deleted
|
||||||
|
)
|
||||||
|
|
||||||
|
def is_overridden(self, setting):
|
||||||
|
deleted = (setting in self._deleted)
|
||||||
|
set_locally = (setting in self.__dict__)
|
||||||
|
set_on_default = getattr(self.default_settings, 'is_overridden', lambda s: False)(setting)
|
||||||
|
return deleted or set_locally or set_on_default
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return '<%(cls)s>' % {
|
||||||
|
'cls': self.__class__.__name__,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
settings = LazySettings()
|
||||||
Whitespace-only changes.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Whitespace-only changes.
@@ -0,0 +1,3 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
# Create your models here.
|
||||||
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
@@ -0,0 +1,575 @@
|
|||||||
|
"""
|
||||||
|
LANG_INFO is a dictionary structure to provide meta information about languages.
|
||||||
|
|
||||||
|
About name_local: capitalize it as if your language name was appearing
|
||||||
|
inside a sentence in your language.
|
||||||
|
The 'fallback' key can be used to specify a special fallback logic which doesn't
|
||||||
|
follow the traditional 'fr-ca' -> 'fr' fallback logic.
|
||||||
|
"""
|
||||||
|
|
||||||
|
LANG_INFO = {
|
||||||
|
'af': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'af',
|
||||||
|
'name': 'Afrikaans',
|
||||||
|
'name_local': 'Afrikaans',
|
||||||
|
},
|
||||||
|
'ar': {
|
||||||
|
'bidi': True,
|
||||||
|
'code': 'ar',
|
||||||
|
'name': 'Arabic',
|
||||||
|
'name_local': 'العربيّة',
|
||||||
|
},
|
||||||
|
'ast': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ast',
|
||||||
|
'name': 'Asturian',
|
||||||
|
'name_local': 'asturianu',
|
||||||
|
},
|
||||||
|
'az': {
|
||||||
|
'bidi': True,
|
||||||
|
'code': 'az',
|
||||||
|
'name': 'Azerbaijani',
|
||||||
|
'name_local': 'Azərbaycanca',
|
||||||
|
},
|
||||||
|
'be': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'be',
|
||||||
|
'name': 'Belarusian',
|
||||||
|
'name_local': 'беларуская',
|
||||||
|
},
|
||||||
|
'bg': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'bg',
|
||||||
|
'name': 'Bulgarian',
|
||||||
|
'name_local': 'български',
|
||||||
|
},
|
||||||
|
'bn': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'bn',
|
||||||
|
'name': 'Bengali',
|
||||||
|
'name_local': 'বাংলা',
|
||||||
|
},
|
||||||
|
'br': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'br',
|
||||||
|
'name': 'Breton',
|
||||||
|
'name_local': 'brezhoneg',
|
||||||
|
},
|
||||||
|
'bs': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'bs',
|
||||||
|
'name': 'Bosnian',
|
||||||
|
'name_local': 'bosanski',
|
||||||
|
},
|
||||||
|
'ca': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ca',
|
||||||
|
'name': 'Catalan',
|
||||||
|
'name_local': 'català',
|
||||||
|
},
|
||||||
|
'cs': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'cs',
|
||||||
|
'name': 'Czech',
|
||||||
|
'name_local': 'česky',
|
||||||
|
},
|
||||||
|
'cy': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'cy',
|
||||||
|
'name': 'Welsh',
|
||||||
|
'name_local': 'Cymraeg',
|
||||||
|
},
|
||||||
|
'da': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'da',
|
||||||
|
'name': 'Danish',
|
||||||
|
'name_local': 'dansk',
|
||||||
|
},
|
||||||
|
'de': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'de',
|
||||||
|
'name': 'German',
|
||||||
|
'name_local': 'Deutsch',
|
||||||
|
},
|
||||||
|
'dsb': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'dsb',
|
||||||
|
'name': 'Lower Sorbian',
|
||||||
|
'name_local': 'dolnoserbski',
|
||||||
|
},
|
||||||
|
'el': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'el',
|
||||||
|
'name': 'Greek',
|
||||||
|
'name_local': 'Ελληνικά',
|
||||||
|
},
|
||||||
|
'en': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'en',
|
||||||
|
'name': 'English',
|
||||||
|
'name_local': 'English',
|
||||||
|
},
|
||||||
|
'en-au': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'en-au',
|
||||||
|
'name': 'Australian English',
|
||||||
|
'name_local': 'Australian English',
|
||||||
|
},
|
||||||
|
'en-gb': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'en-gb',
|
||||||
|
'name': 'British English',
|
||||||
|
'name_local': 'British English',
|
||||||
|
},
|
||||||
|
'eo': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'eo',
|
||||||
|
'name': 'Esperanto',
|
||||||
|
'name_local': 'Esperanto',
|
||||||
|
},
|
||||||
|
'es': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'es',
|
||||||
|
'name': 'Spanish',
|
||||||
|
'name_local': 'español',
|
||||||
|
},
|
||||||
|
'es-ar': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'es-ar',
|
||||||
|
'name': 'Argentinian Spanish',
|
||||||
|
'name_local': 'español de Argentina',
|
||||||
|
},
|
||||||
|
'es-co': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'es-co',
|
||||||
|
'name': 'Colombian Spanish',
|
||||||
|
'name_local': 'español de Colombia',
|
||||||
|
},
|
||||||
|
'es-mx': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'es-mx',
|
||||||
|
'name': 'Mexican Spanish',
|
||||||
|
'name_local': 'español de Mexico',
|
||||||
|
},
|
||||||
|
'es-ni': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'es-ni',
|
||||||
|
'name': 'Nicaraguan Spanish',
|
||||||
|
'name_local': 'español de Nicaragua',
|
||||||
|
},
|
||||||
|
'es-ve': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'es-ve',
|
||||||
|
'name': 'Venezuelan Spanish',
|
||||||
|
'name_local': 'español de Venezuela',
|
||||||
|
},
|
||||||
|
'et': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'et',
|
||||||
|
'name': 'Estonian',
|
||||||
|
'name_local': 'eesti',
|
||||||
|
},
|
||||||
|
'eu': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'eu',
|
||||||
|
'name': 'Basque',
|
||||||
|
'name_local': 'Basque',
|
||||||
|
},
|
||||||
|
'fa': {
|
||||||
|
'bidi': True,
|
||||||
|
'code': 'fa',
|
||||||
|
'name': 'Persian',
|
||||||
|
'name_local': 'فارسی',
|
||||||
|
},
|
||||||
|
'fi': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'fi',
|
||||||
|
'name': 'Finnish',
|
||||||
|
'name_local': 'suomi',
|
||||||
|
},
|
||||||
|
'fr': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'fr',
|
||||||
|
'name': 'French',
|
||||||
|
'name_local': 'français',
|
||||||
|
},
|
||||||
|
'fy': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'fy',
|
||||||
|
'name': 'Frisian',
|
||||||
|
'name_local': 'frysk',
|
||||||
|
},
|
||||||
|
'ga': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ga',
|
||||||
|
'name': 'Irish',
|
||||||
|
'name_local': 'Gaeilge',
|
||||||
|
},
|
||||||
|
'gd': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'gd',
|
||||||
|
'name': 'Scottish Gaelic',
|
||||||
|
'name_local': 'Gàidhlig',
|
||||||
|
},
|
||||||
|
'gl': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'gl',
|
||||||
|
'name': 'Galician',
|
||||||
|
'name_local': 'galego',
|
||||||
|
},
|
||||||
|
'he': {
|
||||||
|
'bidi': True,
|
||||||
|
'code': 'he',
|
||||||
|
'name': 'Hebrew',
|
||||||
|
'name_local': 'עברית',
|
||||||
|
},
|
||||||
|
'hi': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'hi',
|
||||||
|
'name': 'Hindi',
|
||||||
|
'name_local': 'Hindi',
|
||||||
|
},
|
||||||
|
'hr': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'hr',
|
||||||
|
'name': 'Croatian',
|
||||||
|
'name_local': 'Hrvatski',
|
||||||
|
},
|
||||||
|
'hsb': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'hsb',
|
||||||
|
'name': 'Upper Sorbian',
|
||||||
|
'name_local': 'hornjoserbsce',
|
||||||
|
},
|
||||||
|
'hu': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'hu',
|
||||||
|
'name': 'Hungarian',
|
||||||
|
'name_local': 'Magyar',
|
||||||
|
},
|
||||||
|
'hy': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'hy',
|
||||||
|
'name': 'Armenian',
|
||||||
|
'name_local': 'հայերեն',
|
||||||
|
},
|
||||||
|
'ia': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ia',
|
||||||
|
'name': 'Interlingua',
|
||||||
|
'name_local': 'Interlingua',
|
||||||
|
},
|
||||||
|
'io': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'io',
|
||||||
|
'name': 'Ido',
|
||||||
|
'name_local': 'ido',
|
||||||
|
},
|
||||||
|
'id': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'id',
|
||||||
|
'name': 'Indonesian',
|
||||||
|
'name_local': 'Bahasa Indonesia',
|
||||||
|
},
|
||||||
|
'is': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'is',
|
||||||
|
'name': 'Icelandic',
|
||||||
|
'name_local': 'Íslenska',
|
||||||
|
},
|
||||||
|
'it': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'it',
|
||||||
|
'name': 'Italian',
|
||||||
|
'name_local': 'italiano',
|
||||||
|
},
|
||||||
|
'ja': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ja',
|
||||||
|
'name': 'Japanese',
|
||||||
|
'name_local': '日本語',
|
||||||
|
},
|
||||||
|
'ka': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ka',
|
||||||
|
'name': 'Georgian',
|
||||||
|
'name_local': 'ქართული',
|
||||||
|
},
|
||||||
|
'kab': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'kab',
|
||||||
|
'name': 'Kabyle',
|
||||||
|
'name_local': 'taqbaylit',
|
||||||
|
},
|
||||||
|
'kk': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'kk',
|
||||||
|
'name': 'Kazakh',
|
||||||
|
'name_local': 'Қазақ',
|
||||||
|
},
|
||||||
|
'km': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'km',
|
||||||
|
'name': 'Khmer',
|
||||||
|
'name_local': 'Khmer',
|
||||||
|
},
|
||||||
|
'kn': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'kn',
|
||||||
|
'name': 'Kannada',
|
||||||
|
'name_local': 'Kannada',
|
||||||
|
},
|
||||||
|
'ko': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ko',
|
||||||
|
'name': 'Korean',
|
||||||
|
'name_local': '한국어',
|
||||||
|
},
|
||||||
|
'lb': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'lb',
|
||||||
|
'name': 'Luxembourgish',
|
||||||
|
'name_local': 'Lëtzebuergesch',
|
||||||
|
},
|
||||||
|
'lt': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'lt',
|
||||||
|
'name': 'Lithuanian',
|
||||||
|
'name_local': 'Lietuviškai',
|
||||||
|
},
|
||||||
|
'lv': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'lv',
|
||||||
|
'name': 'Latvian',
|
||||||
|
'name_local': 'latviešu',
|
||||||
|
},
|
||||||
|
'mk': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'mk',
|
||||||
|
'name': 'Macedonian',
|
||||||
|
'name_local': 'Македонски',
|
||||||
|
},
|
||||||
|
'ml': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ml',
|
||||||
|
'name': 'Malayalam',
|
||||||
|
'name_local': 'Malayalam',
|
||||||
|
},
|
||||||
|
'mn': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'mn',
|
||||||
|
'name': 'Mongolian',
|
||||||
|
'name_local': 'Mongolian',
|
||||||
|
},
|
||||||
|
'mr': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'mr',
|
||||||
|
'name': 'Marathi',
|
||||||
|
'name_local': 'मराठी',
|
||||||
|
},
|
||||||
|
'my': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'my',
|
||||||
|
'name': 'Burmese',
|
||||||
|
'name_local': 'မြန်မာဘာသာ',
|
||||||
|
},
|
||||||
|
'nb': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'nb',
|
||||||
|
'name': 'Norwegian Bokmal',
|
||||||
|
'name_local': 'norsk (bokmål)',
|
||||||
|
},
|
||||||
|
'ne': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ne',
|
||||||
|
'name': 'Nepali',
|
||||||
|
'name_local': 'नेपाली',
|
||||||
|
},
|
||||||
|
'nl': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'nl',
|
||||||
|
'name': 'Dutch',
|
||||||
|
'name_local': 'Nederlands',
|
||||||
|
},
|
||||||
|
'nn': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'nn',
|
||||||
|
'name': 'Norwegian Nynorsk',
|
||||||
|
'name_local': 'norsk (nynorsk)',
|
||||||
|
},
|
||||||
|
'no': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'no',
|
||||||
|
'name': 'Norwegian',
|
||||||
|
'name_local': 'norsk',
|
||||||
|
},
|
||||||
|
'os': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'os',
|
||||||
|
'name': 'Ossetic',
|
||||||
|
'name_local': 'Ирон',
|
||||||
|
},
|
||||||
|
'pa': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'pa',
|
||||||
|
'name': 'Punjabi',
|
||||||
|
'name_local': 'Punjabi',
|
||||||
|
},
|
||||||
|
'pl': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'pl',
|
||||||
|
'name': 'Polish',
|
||||||
|
'name_local': 'polski',
|
||||||
|
},
|
||||||
|
'pt': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'pt',
|
||||||
|
'name': 'Portuguese',
|
||||||
|
'name_local': 'Português',
|
||||||
|
},
|
||||||
|
'pt-br': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'pt-br',
|
||||||
|
'name': 'Brazilian Portuguese',
|
||||||
|
'name_local': 'Português Brasileiro',
|
||||||
|
},
|
||||||
|
'ro': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ro',
|
||||||
|
'name': 'Romanian',
|
||||||
|
'name_local': 'Română',
|
||||||
|
},
|
||||||
|
'ru': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ru',
|
||||||
|
'name': 'Russian',
|
||||||
|
'name_local': 'Русский',
|
||||||
|
},
|
||||||
|
'sk': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'sk',
|
||||||
|
'name': 'Slovak',
|
||||||
|
'name_local': 'Slovensky',
|
||||||
|
},
|
||||||
|
'sl': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'sl',
|
||||||
|
'name': 'Slovenian',
|
||||||
|
'name_local': 'Slovenščina',
|
||||||
|
},
|
||||||
|
'sq': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'sq',
|
||||||
|
'name': 'Albanian',
|
||||||
|
'name_local': 'shqip',
|
||||||
|
},
|
||||||
|
'sr': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'sr',
|
||||||
|
'name': 'Serbian',
|
||||||
|
'name_local': 'српски',
|
||||||
|
},
|
||||||
|
'sr-latn': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'sr-latn',
|
||||||
|
'name': 'Serbian Latin',
|
||||||
|
'name_local': 'srpski (latinica)',
|
||||||
|
},
|
||||||
|
'sv': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'sv',
|
||||||
|
'name': 'Swedish',
|
||||||
|
'name_local': 'svenska',
|
||||||
|
},
|
||||||
|
'sw': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'sw',
|
||||||
|
'name': 'Swahili',
|
||||||
|
'name_local': 'Kiswahili',
|
||||||
|
},
|
||||||
|
'ta': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'ta',
|
||||||
|
'name': 'Tamil',
|
||||||
|
'name_local': 'தமிழ்',
|
||||||
|
},
|
||||||
|
'te': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'te',
|
||||||
|
'name': 'Telugu',
|
||||||
|
'name_local': 'తెలుగు',
|
||||||
|
},
|
||||||
|
'th': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'th',
|
||||||
|
'name': 'Thai',
|
||||||
|
'name_local': 'ภาษาไทย',
|
||||||
|
},
|
||||||
|
'tr': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'tr',
|
||||||
|
'name': 'Turkish',
|
||||||
|
'name_local': 'Türkçe',
|
||||||
|
},
|
||||||
|
'tt': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'tt',
|
||||||
|
'name': 'Tatar',
|
||||||
|
'name_local': 'Татарча',
|
||||||
|
},
|
||||||
|
'udm': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'udm',
|
||||||
|
'name': 'Udmurt',
|
||||||
|
'name_local': 'Удмурт',
|
||||||
|
},
|
||||||
|
'uk': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'uk',
|
||||||
|
'name': 'Ukrainian',
|
||||||
|
'name_local': 'Українська',
|
||||||
|
},
|
||||||
|
'ur': {
|
||||||
|
'bidi': True,
|
||||||
|
'code': 'ur',
|
||||||
|
'name': 'Urdu',
|
||||||
|
'name_local': 'اردو',
|
||||||
|
},
|
||||||
|
'vi': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'vi',
|
||||||
|
'name': 'Vietnamese',
|
||||||
|
'name_local': 'Tiếng Việt',
|
||||||
|
},
|
||||||
|
'zh-cn': {
|
||||||
|
'fallback': ['zh-hans'],
|
||||||
|
},
|
||||||
|
'zh-hans': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'zh-hans',
|
||||||
|
'name': 'Simplified Chinese',
|
||||||
|
'name_local': '简体中文',
|
||||||
|
},
|
||||||
|
'zh-hant': {
|
||||||
|
'bidi': False,
|
||||||
|
'code': 'zh-hant',
|
||||||
|
'name': 'Traditional Chinese',
|
||||||
|
'name_local': '繁體中文',
|
||||||
|
},
|
||||||
|
'zh-hk': {
|
||||||
|
'fallback': ['zh-hant'],
|
||||||
|
},
|
||||||
|
'zh-mo': {
|
||||||
|
'fallback': ['zh-hant'],
|
||||||
|
},
|
||||||
|
'zh-my': {
|
||||||
|
'fallback': ['zh-hans'],
|
||||||
|
},
|
||||||
|
'zh-sg': {
|
||||||
|
'fallback': ['zh-hans'],
|
||||||
|
},
|
||||||
|
'zh-tw': {
|
||||||
|
'fallback': ['zh-hant'],
|
||||||
|
},
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Whitespace-only changes.
@@ -0,0 +1,21 @@
|
|||||||
|
# This file is distributed under the same license as the Django package.
|
||||||
|
#
|
||||||
|
# The *_FORMAT strings use the Django date format syntax,
|
||||||
|
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
||||||
|
DATE_FORMAT = 'j F، Y'
|
||||||
|
TIME_FORMAT = 'g:i A'
|
||||||
|
# DATETIME_FORMAT =
|
||||||
|
YEAR_MONTH_FORMAT = 'F Y'
|
||||||
|
MONTH_DAY_FORMAT = 'j F'
|
||||||
|
SHORT_DATE_FORMAT = 'd/m/Y'
|
||||||
|
# SHORT_DATETIME_FORMAT =
|
||||||
|
# FIRST_DAY_OF_WEEK =
|
||||||
|
|
||||||
|
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
|
||||||
|
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
|
||||||
|
# DATE_INPUT_FORMATS =
|
||||||
|
# TIME_INPUT_FORMATS =
|
||||||
|
# DATETIME_INPUT_FORMATS =
|
||||||
|
DECIMAL_SEPARATOR = ','
|
||||||
|
THOUSAND_SEPARATOR = '.'
|
||||||
|
# NUMBER_GROUPING =
|
||||||
BIN
Binary file not shown.
+1212
File diff suppressed because it is too large.
Load diff
BIN
Binary file not shown.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
BIN
Binary file not shown.
Regular → Executable
File mode changed.
BIN
Binary file not shown.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Whitespace-only changes.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
+1259
File diff suppressed because it is too large.
Load diff
BIN
Binary file not shown.
+1211
File diff suppressed because it is too large.
Load diff
Whitespace-only changes.
@@ -0,0 +1,21 @@
|
|||||||
|
# This file is distributed under the same license as the Django package.
|
||||||
|
#
|
||||||
|
# The *_FORMAT strings use the Django date format syntax,
|
||||||
|
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
||||||
|
DATE_FORMAT = 'j. N Y.'
|
||||||
|
TIME_FORMAT = 'G:i'
|
||||||
|
DATETIME_FORMAT = 'j. N. Y. G:i T'
|
||||||
|
YEAR_MONTH_FORMAT = 'F Y.'
|
||||||
|
MONTH_DAY_FORMAT = 'j. F'
|
||||||
|
SHORT_DATE_FORMAT = 'Y M j'
|
||||||
|
# SHORT_DATETIME_FORMAT =
|
||||||
|
# FIRST_DAY_OF_WEEK =
|
||||||
|
|
||||||
|
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
|
||||||
|
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
|
||||||
|
# DATE_INPUT_FORMATS =
|
||||||
|
# TIME_INPUT_FORMATS =
|
||||||
|
# DATETIME_INPUT_FORMATS =
|
||||||
|
DECIMAL_SEPARATOR = ','
|
||||||
|
THOUSAND_SEPARATOR = '.'
|
||||||
|
# NUMBER_GROUPING =
|
||||||
Regular → Executable
File mode changed.
+1284
File diff suppressed because it is too large.
Load diff
Regular → Executable
File mode changed.
@@ -0,0 +1,30 @@
|
|||||||
|
# This file is distributed under the same license as the Django package.
|
||||||
|
#
|
||||||
|
# The *_FORMAT strings use the Django date format syntax,
|
||||||
|
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
||||||
|
DATE_FORMAT = r'j \d\e F \d\e Y'
|
||||||
|
TIME_FORMAT = 'G:i'
|
||||||
|
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\e\s G:i'
|
||||||
|
YEAR_MONTH_FORMAT = r'F \d\e\l Y'
|
||||||
|
MONTH_DAY_FORMAT = r'j \d\e F'
|
||||||
|
SHORT_DATE_FORMAT = 'd/m/Y'
|
||||||
|
SHORT_DATETIME_FORMAT = 'd/m/Y G:i'
|
||||||
|
FIRST_DAY_OF_WEEK = 1 # Monday
|
||||||
|
|
||||||
|
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
|
||||||
|
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
|
||||||
|
DATE_INPUT_FORMATS = [
|
||||||
|
# '31/12/2009', '31/12/09'
|
||||||
|
'%d/%m/%Y', '%d/%m/%y'
|
||||||
|
]
|
||||||
|
DATETIME_INPUT_FORMATS = [
|
||||||
|
'%d/%m/%Y %H:%M:%S',
|
||||||
|
'%d/%m/%Y %H:%M:%S.%f',
|
||||||
|
'%d/%m/%Y %H:%M',
|
||||||
|
'%d/%m/%y %H:%M:%S',
|
||||||
|
'%d/%m/%y %H:%M:%S.%f',
|
||||||
|
'%d/%m/%y %H:%M',
|
||||||
|
]
|
||||||
|
DECIMAL_SEPARATOR = ','
|
||||||
|
THOUSAND_SEPARATOR = '.'
|
||||||
|
NUMBER_GROUPING = 3
|
||||||
Regular → Executable
File mode changed.
+1310
File diff suppressed because it is too large.
Load diff
Whitespace-only changes.
Regular → Executable
File mode changed.
BIN
Binary file not shown.
+1274
File diff suppressed because it is too large.
Load diff
Whitespace-only changes.
@@ -0,0 +1,35 @@
|
|||||||
|
# This file is distributed under the same license as the Django package.
|
||||||
|
#
|
||||||
|
# The *_FORMAT strings use the Django date format syntax,
|
||||||
|
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
||||||
|
DATE_FORMAT = 'j F Y' # '25 Hydref 2006'
|
||||||
|
TIME_FORMAT = 'P' # '2:30 y.b.'
|
||||||
|
DATETIME_FORMAT = 'j F Y, P' # '25 Hydref 2006, 2:30 y.b.'
|
||||||
|
YEAR_MONTH_FORMAT = 'F Y' # 'Hydref 2006'
|
||||||
|
MONTH_DAY_FORMAT = 'j F' # '25 Hydref'
|
||||||
|
SHORT_DATE_FORMAT = 'd/m/Y' # '25/10/2006'
|
||||||
|
SHORT_DATETIME_FORMAT = 'd/m/Y P' # '25/10/2006 2:30 y.b.'
|
||||||
|
FIRST_DAY_OF_WEEK = 1 # 'Dydd Llun'
|
||||||
|
|
||||||
|
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
|
||||||
|
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
|
||||||
|
DATE_INPUT_FORMATS = [
|
||||||
|
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
|
||||||
|
]
|
||||||
|
DATETIME_INPUT_FORMATS = [
|
||||||
|
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
|
||||||
|
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
|
||||||
|
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
|
||||||
|
'%Y-%m-%d', # '2006-10-25'
|
||||||
|
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
|
||||||
|
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200'
|
||||||
|
'%d/%m/%Y %H:%M', # '25/10/2006 14:30'
|
||||||
|
'%d/%m/%Y', # '25/10/2006'
|
||||||
|
'%d/%m/%y %H:%M:%S', # '25/10/06 14:30:59'
|
||||||
|
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200'
|
||||||
|
'%d/%m/%y %H:%M', # '25/10/06 14:30'
|
||||||
|
'%d/%m/%y', # '25/10/06'
|
||||||
|
]
|
||||||
|
DECIMAL_SEPARATOR = '.'
|
||||||
|
THOUSAND_SEPARATOR = ','
|
||||||
|
NUMBER_GROUPING = 3
|
||||||
BIN
Binary file not shown.
Regular → Executable
File mode changed.
Whitespace-only changes.
@@ -0,0 +1,26 @@
|
|||||||
|
# This file is distributed under the same license as the Django package.
|
||||||
|
#
|
||||||
|
# The *_FORMAT strings use the Django date format syntax,
|
||||||
|
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
||||||
|
DATE_FORMAT = 'j. F Y'
|
||||||
|
TIME_FORMAT = 'H:i'
|
||||||
|
DATETIME_FORMAT = 'j. F Y H:i'
|
||||||
|
YEAR_MONTH_FORMAT = 'F Y'
|
||||||
|
MONTH_DAY_FORMAT = 'j. F'
|
||||||
|
SHORT_DATE_FORMAT = 'd.m.Y'
|
||||||
|
SHORT_DATETIME_FORMAT = 'd.m.Y H:i'
|
||||||
|
FIRST_DAY_OF_WEEK = 1
|
||||||
|
|
||||||
|
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
|
||||||
|
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
|
||||||
|
DATE_INPUT_FORMATS = [
|
||||||
|
'%d.%m.%Y', # '25.10.2006'
|
||||||
|
]
|
||||||
|
DATETIME_INPUT_FORMATS = [
|
||||||
|
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
|
||||||
|
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
|
||||||
|
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
|
||||||
|
]
|
||||||
|
DECIMAL_SEPARATOR = ','
|
||||||
|
THOUSAND_SEPARATOR = '.'
|
||||||
|
NUMBER_GROUPING = 3
|
||||||
Regular → Executable
File mode changed.
Loaded 100 of 4343 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user