Skip to content
Snippets Groups Projects
Commit 43307c03 authored by Neda Moeini's avatar Neda Moeini
Browse files

Restructure the project layout

parent ff892831
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 14 deletions
recursive-include file_validator/templates * recursive-include sage_validation/file_validator/templates *
recursive-include theme/static * recursive-include sage_validation/file_validator/static *
recursive-include theme/templates * recursive-include sage_validation/theme/static *
include manage.py recursive-include sage_validation/theme/templates *
\ No newline at end of file \ No newline at end of file
File moved
File moved
File moved
...@@ -6,4 +6,4 @@ class FileValidatorConfig(AppConfig): ...@@ -6,4 +6,4 @@ class FileValidatorConfig(AppConfig):
"""App configuration for file_validator.""" """App configuration for file_validator."""
default_auto_field = "django.db.models.BigAutoField" default_auto_field = "django.db.models.BigAutoField"
name = "file_validator" name = "sage_validation.file_validator"
File moved
File moved
File moved
"""Urls for the file_validator app.""" """Urls for the file_validator app."""
from django.urls import path from django.urls import path
from file_validator.views import CSVUploadView from sage_validation.file_validator.views import CSVUploadView
urlpatterns = [ urlpatterns = [
path("upload/", CSVUploadView.as_view(), name="upload-file"), path("upload/", CSVUploadView.as_view(), name="upload-file"),
......
...@@ -4,7 +4,7 @@ from django.shortcuts import render ...@@ -4,7 +4,7 @@ from django.shortcuts import render
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.views.generic.edit import FormView from django.views.generic.edit import FormView
from file_validator.forms import CSVUploadForm from sage_validation.file_validator.forms import CSVUploadForm
def index_view(request: HttpRequest) -> HttpResponse: def index_view(request: HttpRequest) -> HttpResponse:
......
...@@ -12,7 +12,7 @@ import os ...@@ -12,7 +12,7 @@ import os
from pathlib import Path from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
...@@ -36,10 +36,10 @@ INSTALLED_APPS = [ ...@@ -36,10 +36,10 @@ INSTALLED_APPS = [
] ]
THIRD_PARTY_APPS = [ THIRD_PARTY_APPS = [
"tailwind", "tailwind",
"theme", "sage_validation.theme",
] ]
LOCAL_APPS = [ LOCAL_APPS = [
"file_validator", "sage_validation.file_validator",
] ]
INSTALLED_APPS += THIRD_PARTY_APPS + LOCAL_APPS INSTALLED_APPS += THIRD_PARTY_APPS + LOCAL_APPS
...@@ -54,7 +54,7 @@ MIDDLEWARE = [ ...@@ -54,7 +54,7 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware",
] ]
ROOT_URLCONF = "root.urls" ROOT_URLCONF = "sage_validation.urls"
TEMPLATES = [ TEMPLATES = [
{ {
...@@ -72,7 +72,7 @@ TEMPLATES = [ ...@@ -72,7 +72,7 @@ TEMPLATES = [
}, },
] ]
WSGI_APPLICATION = "root.wsgi.application" WSGI_APPLICATION = "sage_validation.wsgi.application"
# Database # Database
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases # https://docs.djangoproject.com/en/5.1/ref/settings/#databases
...@@ -129,5 +129,5 @@ TAILWIND_APP_NAME = "theme" ...@@ -129,5 +129,5 @@ TAILWIND_APP_NAME = "theme"
STATIC_ROOT = BASE_DIR / "staticfiles" STATIC_ROOT = BASE_DIR / "staticfiles"
STATICFILES_DIRS = [ STATICFILES_DIRS = [
BASE_DIR / "static", BASE_DIR / "sage_validation/static",
] ]
File moved
File moved
File moved
...@@ -2,4 +2,4 @@ from django.apps import AppConfig ...@@ -2,4 +2,4 @@ from django.apps import AppConfig
class ThemeConfig(AppConfig): class ThemeConfig(AppConfig):
name = 'theme' name = 'sage_validation.theme'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment