From 70f77e3930fac94f27327317292bc2438fac61e3 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 2 Apr 2024 16:23:03 +0000 Subject: [PATCH] initial commit --- .gitignore | 2 ++ .idea/.gitignore | 3 +++ .idea/beasyproject.iml | 12 ++++++++++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/misc.xml | 7 +++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ authentication/__init__.py | 0 authentication/admin.py | 3 +++ authentication/apps.py | 6 ++++++ authentication/migrations/__init__.py | 0 authentication/models.py | 3 +++ authentication/tests.py | 3 +++ authentication/views.py | 3 +++ beasyproject/__init__.py | 0 beasyproject/asgi.py | 16 ++++++++++++++++ beasyproject/settings.py | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ beasyproject/urls.py | 22 ++++++++++++++++++++++ beasyproject/wsgi.py | 16 ++++++++++++++++ manage.py | 22 ++++++++++++++++++++++ requirements.txt | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 21 files changed, 336 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/beasyproject.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 authentication/__init__.py create mode 100644 authentication/admin.py create mode 100644 authentication/apps.py create mode 100644 authentication/migrations/__init__.py create mode 100644 authentication/models.py create mode 100644 authentication/tests.py create mode 100644 authentication/views.py create mode 100644 beasyproject/__init__.py create mode 100644 beasyproject/asgi.py create mode 100644 beasyproject/settings.py create mode 100644 beasyproject/urls.py create mode 100644 beasyproject/wsgi.py create mode 100755 manage.py create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47ee56a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +b_env +__pycache__ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/beasyproject.iml b/.idea/beasyproject.iml new file mode 100644 index 0000000..8b8c395 --- /dev/null +++ b/.idea/beasyproject.iml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..a6218fe --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..10f5ed8 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/authentication/__init__.py b/authentication/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/authentication/__init__.py diff --git a/authentication/admin.py b/authentication/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/authentication/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/authentication/apps.py b/authentication/apps.py new file mode 100644 index 0000000..8bab8df --- /dev/null +++ b/authentication/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AuthenticationConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'authentication' diff --git a/authentication/migrations/__init__.py b/authentication/migrations/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/authentication/migrations/__init__.py diff --git a/authentication/models.py b/authentication/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/authentication/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/authentication/tests.py b/authentication/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/authentication/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/authentication/views.py b/authentication/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/authentication/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/beasyproject/__init__.py b/beasyproject/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/beasyproject/__init__.py diff --git a/beasyproject/asgi.py b/beasyproject/asgi.py new file mode 100644 index 0000000..dd53ef0 --- /dev/null +++ b/beasyproject/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for beasyproject 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/5.0/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'beasyproject.settings') + +application = get_asgi_application() diff --git a/beasyproject/settings.py b/beasyproject/settings.py new file mode 100644 index 0000000..c72adcc --- /dev/null +++ b/beasyproject/settings.py @@ -0,0 +1,124 @@ +""" +Django settings for beasyproject project. + +Generated by 'django-admin startproject' using Django 5.0.3. + +For more information on this file, see +https://docs.djangoproject.com/en/5.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/5.0/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/5.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-hexgz7uk1kb4)3e=e#!7d*@u^%p1sxu%zdqz#$q+r3*u362^k1' + +# 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', + 'authentication', +] + +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 = 'beasyproject.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 = 'beasyproject.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/5.0/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/5.0/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/5.0/topics/i18n/ + +LANGUAGE_CODE = 'fr-fr' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/5.0/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/beasyproject/urls.py b/beasyproject/urls.py new file mode 100644 index 0000000..84da65b --- /dev/null +++ b/beasyproject/urls.py @@ -0,0 +1,22 @@ +""" +URL configuration for beasyproject project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/5.0/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/beasyproject/wsgi.py b/beasyproject/wsgi.py new file mode 100644 index 0000000..1afcf4e --- /dev/null +++ b/beasyproject/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for beasyproject 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/5.0/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'beasyproject.settings') + +application = get_wsgi_application() diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..70d61e8 --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'beasyproject.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/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0115122 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,74 @@ +apturl==0.5.2 +asgiref==3.5.0 +bcrypt==3.2.0 +blinker==1.4 +Brlapi==0.8.3 +certifi==2020.6.20 +chardet==4.0.0 +click==8.0.3 +colorama==0.4.4 +command-not-found==0.3 +cryptography==3.4.8 +cupshelpers==1.0 +dbus-python==1.2.18 +defer==1.0.6 +distro==1.7.0 +distro-info==1.1+ubuntu0.2 +Django==3.2.12 +duplicity==0.8.21 +fasteners==0.14.1 +future==0.18.2 +httplib2==0.20.2 +idna==3.3 +importlib-metadata==4.6.4 +jeepney==0.7.1 +keyring==23.5.0 +language-selector==0.1 +launchpadlib==1.10.16 +lazr.restfulclient==0.14.4 +lazr.uri==1.0.6 +lockfile==0.12.2 +louis==3.20.0 +macaroonbakery==1.3.1 +Mako==1.1.3 +MarkupSafe==2.0.1 +monotonic==1.6 +more-itertools==8.10.0 +netifaces==0.11.0 +oauthlib==3.2.0 +olefile==0.46 +paramiko==2.9.3 +pexpect==4.8.0 +Pillow==9.0.1 +protobuf==3.12.4 +ptyprocess==0.7.0 +pycairo==1.20.1 +pycups==2.0.1 +PyGObject==3.42.1 +PyJWT==2.3.0 +pymacaroons==0.13.0 +PyNaCl==1.5.0 +pyparsing==2.4.7 +pyRFC3339==1.1 +python-apt==2.4.0+ubuntu3 +python-dateutil==2.8.1 +python-debian==0.1.43+ubuntu1.1 +pytz==2022.1 +pyxdg==0.27 +PyYAML==5.4.1 +reportlab==3.6.8 +requests==2.25.1 +SecretStorage==3.3.1 +six==1.16.0 +sqlparse==0.4.2 +systemd-python==234 +ubuntu-advantage-tools==8001 +ubuntu-drivers-common==0.0.0 +ufw==0.36.1 +unattended-upgrades==0.1 +urllib3==1.26.5 +usb-creator==0.3.7 +wadllib==1.3.6 +xdg==5 +xkit==0.0.0 +zipp==1.0.0 -- libgit2 0.27.1