From f8b57ddabd710c0ad7c9ccbdb2403aabd98fc4c9 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Tue, 12 Nov 2024 16:18:26 +0100 Subject: [PATCH] Primer commit --- Eventos/__init__.py | 0 Eventos/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 140 bytes Eventos/__pycache__/settings.cpython-312.pyc | Bin 0 -> 2518 bytes Eventos/asgi.py | 16 +++ Eventos/settings.py | 124 +++++++++++++++++++ Eventos/urls.py | 22 ++++ Eventos/wsgi.py | 16 +++ manage.py | 22 ++++ reservas/__init__.py | 0 reservas/admin.py | 3 + reservas/apps.py | 6 + reservas/migrations/__init__.py | 0 reservas/models.py | 3 + reservas/tests.py | 3 + reservas/views.py | 3 + 15 files changed, 218 insertions(+) create mode 100644 Eventos/__init__.py create mode 100644 Eventos/__pycache__/__init__.cpython-312.pyc create mode 100644 Eventos/__pycache__/settings.cpython-312.pyc create mode 100644 Eventos/asgi.py create mode 100644 Eventos/settings.py create mode 100644 Eventos/urls.py create mode 100644 Eventos/wsgi.py create mode 100755 manage.py create mode 100644 reservas/__init__.py create mode 100644 reservas/admin.py create mode 100644 reservas/apps.py create mode 100644 reservas/migrations/__init__.py create mode 100644 reservas/models.py create mode 100644 reservas/tests.py create mode 100644 reservas/views.py diff --git a/Eventos/__init__.py b/Eventos/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Eventos/__pycache__/__init__.cpython-312.pyc b/Eventos/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd9ec2e9932df4041c11766acf19812821b90a34 GIT binary patch literal 140 zcmX@j%ge<81kVbL(?RrO5P=Rpvj9b=GgLBYGWxA#C}INgK7-W!($>$&&rQ`&E=sM; z$uCH)(swOO%`3?-hSTx!nR%Hd@$q^EmA^P_a`RJ4b5iY!Sb=&Ofw&mN_{hx2$XLV- GWB~vp0U%WX literal 0 HcmV?d00001 diff --git a/Eventos/__pycache__/settings.cpython-312.pyc b/Eventos/__pycache__/settings.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..61d0122ac626061a4c774c000612b8ac3cd097b2 GIT binary patch literal 2518 zcmb7GOK;mo5GM70TUL}d}WS~HS0zJqHddaCnO0osnKwUxN?#|5j&Ft*VQokjWF#QqE=~q6Pl%7E28y5K#t-t(eNb^?4FUE=4_0-phY7vPsgIsPKL%wOtX z$zK(hU|X@$wy1S<%EXo>YaNr?)D4Q=#hRs?RM*hAv1HM)*c#TbAzBzw?LKuAd6*>; zsj^0ymS|XG%bQfs1Qu#cdY`^aFE0ap6-ZUxz?7^3zbaa?u2Jx{wq)=qEBI3g0LQj0 zt80E5-F32$HTAuvP%Zf~9w5$t+AFE{y1{Elh3p6opb`)1vgvlO2f~0!LUj zs9jO%Ve|j^GVtbDO-J- zb2ki=^<$lVf0k_Qo}R*UBiR%xf7%J0w5n@#(Hs85)HF8fB0OHmcyG$|(M&8NByTzn z2G)=_S@H^T3OKuoNvfv7>!b8dp&p*G2}PE6wnb?Nx`F;?)eu!&>$+8MPT>;cKBIev zV%mi)pubzO6;Hl2)j{NGsu^oRsO>4upP*tceBPFv9kw|gD? z_BkvK{1Q6GvhR#-kBijJ=o!pzrtNz(#>ZJa12EC$15S8_DL!YbB_~iSH#jH4)a!yb z3)kw+a;?hQxk!hD#pW zrC@(NriDzZI>L%cugD!}Cw*1M3aaK8oUkCk^(_caxC@u0BDW1cq}GWDf_t&Jas!*X zvWuNi7w#0zaw01X$GRulItV4K2o_FE@dVpm#gPLioqY8z}xcvj<@oRcb7xh9A} z0Oi3svGsDPRAD!m2J0jmwOUhXH7dngb=8SB+4XvbX|kM?-r&~Cu6?CkWZX(}q9vxu zxNbQo$F!QyggV1<8?{DBc)?W4psYawCM!&Jt;MXdLa|n2fv~*J3VaPpCeng{%gc|e zPRN}#d5F9T%thC`lPR&QOsmoqfVn2Dmf1?_7vjD9>iBS{u%)ZGAQ`x?=v{0V#sz&m zPF`wsxBnsX1XA2n@Ka+EugKX|FLA@h_*Hc4(I2${PCW4`%Kb7+VL%$Dj5pPkSUVJ^hXp9yYlOOrs5V_$ZF`pYG4-@l)=wW!Qx%d~ztVSUK literal 0 HcmV?d00001 diff --git a/Eventos/asgi.py b/Eventos/asgi.py new file mode 100644 index 0000000..765b5dd --- /dev/null +++ b/Eventos/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for Eventos project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Eventos.settings') + +application = get_asgi_application() diff --git a/Eventos/settings.py b/Eventos/settings.py new file mode 100644 index 0000000..97332c5 --- /dev/null +++ b/Eventos/settings.py @@ -0,0 +1,124 @@ +""" +Django settings for Eventos project. + +Generated by 'django-admin startproject' using Django 4.2.11. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/4.2/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-g$b0b8-cchtb+=cjj(ug&w7kfm6)imkrsyo_&k)5wdzy42v)mt' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'reservas', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'Eventos.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'Eventos.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/4.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/4.2/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/4.2/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/Eventos/urls.py b/Eventos/urls.py new file mode 100644 index 0000000..6ef4300 --- /dev/null +++ b/Eventos/urls.py @@ -0,0 +1,22 @@ +""" +URL configuration for Eventos project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/4.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.urls import path + +urlpatterns = [ + path('admin/', admin.site.urls), +] diff --git a/Eventos/wsgi.py b/Eventos/wsgi.py new file mode 100644 index 0000000..161c978 --- /dev/null +++ b/Eventos/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for Eventos project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Eventos.settings') + +application = get_wsgi_application() diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..2a8ce3b --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Eventos.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() diff --git a/reservas/__init__.py b/reservas/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/reservas/admin.py b/reservas/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/reservas/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/reservas/apps.py b/reservas/apps.py new file mode 100644 index 0000000..84b3d22 --- /dev/null +++ b/reservas/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ReservasConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'reservas' diff --git a/reservas/migrations/__init__.py b/reservas/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/reservas/models.py b/reservas/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/reservas/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/reservas/tests.py b/reservas/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/reservas/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/reservas/views.py b/reservas/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/reservas/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.