first commit

This commit is contained in:
Prrorr2 2023-12-09 09:35:08 +01:00
parent e6b559815d
commit e5462f3cd8
22 changed files with 141 additions and 4 deletions

BIN
db.sqlite3 Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,35 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-09 09:16+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: multilanguage/settings.py:34
msgid "English"
msgstr ""
#: multilanguage/settings.py:35
msgid "French"
msgstr ""
#: multilanguage/settings.py:36
msgid "Spanish"
msgstr ""
#: web/views.py:5
msgid "hola"
msgstr "hello"

Binary file not shown.

View File

@ -0,0 +1,35 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-09 09:16+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: multilanguage/settings.py:34
msgid "English"
msgstr ""
#: multilanguage/settings.py:35
msgid "French"
msgstr ""
#: multilanguage/settings.py:36
msgid "Spanish"
msgstr ""
#: web/views.py:5
msgid "hola"
msgstr "hola"

Binary file not shown.

View File

@ -0,0 +1,35 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-09 09:16+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: multilanguage/settings.py:34
msgid "English"
msgstr ""
#: multilanguage/settings.py:35
msgid "French"
msgstr ""
#: multilanguage/settings.py:36
msgid "Spanish"
msgstr ""
#: web/views.py:5
msgid "hola"
msgstr "(hola en frances)"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -11,7 +11,7 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
"""
from pathlib import Path
from django.utils.translation import gettext_lazy as _
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
@ -30,6 +30,11 @@ ALLOWED_HOSTS = []
# Application definition
LANGUAGES = (
('en', _('English')),
('fr', _('French')),
('es', _('Spanish')),
)
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
@ -44,6 +49,7 @@ MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
@ -121,3 +127,6 @@ STATIC_URL = 'static/'
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
LOCALE_PATHS = [
BASE_DIR / 'locale/',
]

View File

@ -16,7 +16,9 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path
urlpatterns = [
from django.conf.urls.i18n import i18n_patterns
from web.views import home
urlpatterns = i18n_patterns(
path('admin/', admin.site.urls),
]
path('', home)
)

0
web/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

3
web/admin.py Normal file
View File

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
web/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class WebConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'web'

View File

3
web/models.py Normal file
View File

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

3
web/tests.py Normal file
View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

6
web/views.py Normal file
View File

@ -0,0 +1,6 @@
from django.shortcuts import render, HttpResponse
from django.utils.translation import gettext_lazy as _
# Create your views here.
def home(request):
welcome = _("hola")
return HttpResponse(welcome)