Skip to content

Commit

Permalink
update total site
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafaelrn committed Aug 10, 2023
1 parent 3aeb0a5 commit 27f219f
Show file tree
Hide file tree
Showing 4,771 changed files with 888,377 additions and 622 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ services:

pg-admin:
image: dpage/pgadmin4
restart: always
depends_on:
- db
environment:
Expand Down
3 changes: 1 addition & 2 deletions src/site/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ FROM python:3.10
COPY . /app
WORKDIR /app

RUN pip install requests django Pillow psycopg2 coveralls

RUN pip install requests -r requirements.txt
EXPOSE 8000

CMD ["python", "manage.py", "runserver"]
1 change: 0 additions & 1 deletion src/site/erp/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
COMPANY_NAME = "Lua"
4 changes: 2 additions & 2 deletions src/site/erp/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
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.1/howto/deployment/asgi/
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", "erp.settings")
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'erp.settings')

application = get_asgi_application()
116 changes: 61 additions & 55 deletions src/site/erp/settings.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
"""
Django settings for erp project.
Generated by 'django-admin startproject' using Django 4.2.4.
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
from dotenv import load_dotenv
import os

def configure():
load_dotenv()

# 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.1/howto/deployment/checklist/
# 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-j603nv36$=$hh9_anz3%b#3y9qq8j(80$-!4yj8yrn-0pempl&"
SECRET_KEY = 'django-insecure-%f$ir=o^lf3_)(j&m)xf1^%c^vcm(joe)=$ykf3gegz5#c72&i'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
Expand All @@ -24,104 +32,102 @@ def configure():
# Application definition

INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"user",
"integrations",
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'usuarios'
]

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",
'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 = "erp.urls"
ROOT_URLCONF = 'erp.urls'

TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [os.path.join(BASE_DIR, "templates")],
"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",
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates' )],
'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 = "erp.wsgi.application"
WSGI_APPLICATION = 'erp.wsgi.application'


# Database
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "db",
"USER": "user",
"PASSWORD": "password",
"HOST": "",
"HOST": "localhost",
"PORT": "5432",
}
}


# Password validation
# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
# 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.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
{"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.1/topics/i18n/
# https://docs.djangoproject.com/en/4.2/topics/i18n/

LANGUAGE_CODE = "pt-br"
LANGUAGE_CODE = 'en-us'

TIME_ZONE = "America/Sao_Paulo"
TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/
# https://docs.djangoproject.com/en/4.2/howto/static-files/

STATIC_URL = "static/"
STATIC_URL = 'static/'

# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

AUTH_USER_MODEL = "user.UserClient"
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

# EMAIL

EMAIL_HOST = os.getenv("EMAIL_SMTP")
EMAIL_PORT = 465
EMAIL_HOST_USER = os.getenv("EMAIL_FROM")
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_PASSWORD")
EMAIL_USE_SSL = True
# Config Auth
AUTH_USER_MODEL = 'usuarios.Users'
23 changes: 18 additions & 5 deletions src/site/erp/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
"""
URL configuration for erp 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, include
from django.urls import path

urlpatterns = [
path("admin/", admin.site.urls),
path("user/", include("user.urls")),
path("integrations/", include("integrations.urls")),
path("", include("integrations.urls"))
path('admin/', admin.site.urls),
]
4 changes: 2 additions & 2 deletions src/site/erp/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
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.1/howto/deployment/wsgi/
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", "erp.settings")
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'erp.settings')

application = get_wsgi_application()
4 changes: 0 additions & 4 deletions src/site/integrations/admin.py

This file was deleted.

6 changes: 0 additions & 6 deletions src/site/integrations/apps.py

This file was deleted.

30 changes: 0 additions & 30 deletions src/site/integrations/migrations/0001_initial.py

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions src/site/integrations/models.py

This file was deleted.

42 changes: 0 additions & 42 deletions src/site/integrations/templates/integrations.html

This file was deleted.

6 changes: 0 additions & 6 deletions src/site/integrations/urls.py

This file was deleted.

Loading

0 comments on commit 27f219f

Please sign in to comment.