diff --git a/Pipfile b/Pipfile index d035381..365e6ea 100644 --- a/Pipfile +++ b/Pipfile @@ -5,6 +5,7 @@ name = "pypi" [packages] django = "4.1" +django-pipeline = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index d9de711..73c599d 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "6e083d21ae729f05292ed8d38994c39ad2c02808466a03b60ca48d029f95d26c" + "sha256": "20e0e61a140c2a2e5a120e614e8197a4019fe20020b436c81e0b923e68d65148" }, "pipfile-spec": 6, "requires": { @@ -26,11 +26,19 @@ }, "django": { "hashes": [ - "sha256:4b214a05fe4c99476e99e2445c8b978c8369c18d4dea8e22ec412862715ad763", - "sha256:ff56ebd7ead0fd5dbe06fe157b0024a7aaea2e0593bb3785fb594cf94dad58ef" + "sha256:bceb0fe1a386781af0788cae4108622756cd05e7775448deec04a71ddf87685d", + "sha256:c6fe7ebe7c017fe59f1029821dae0acb5a2ddcd6c9a0138fd20a8bfefac914bc" ], "index": "pypi", - "version": "==4.1.5" + "version": "==4.1.6" + }, + "django-pipeline": { + "hashes": [ + "sha256:b0f2748d43e4e773033f563ac0e8c3b2d47b88320abf726eb83e35a7172bf83a", + "sha256:deb278d151c6cc8de3d3eec5e70d8a21527000dd58b616215deba2fa9a51c7e2" + ], + "index": "pypi", + "version": "==2.0.9" }, "sqlparse": { "hashes": [ diff --git a/iaso/apps/auth/urls.py b/iaso/apps/auth/urls.py new file mode 100644 index 0000000..00c2810 --- /dev/null +++ b/iaso/apps/auth/urls.py @@ -0,0 +1,8 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path("", views.index, name="index"), + path("login/", views.login, name="login"), + path("logout/", views.logout, name="logout"), +] \ No newline at end of file diff --git a/iaso/apps/auth/views.py b/iaso/apps/auth/views.py index 30a6414..c37fd82 100644 --- a/iaso/apps/auth/views.py +++ b/iaso/apps/auth/views.py @@ -12,4 +12,10 @@ def index(request): "form": form } - return render(request, 'auth/login.html', context=context) \ No newline at end of file + return render(request, 'auth/login.html', context=context) + +def login(request): + return render(request, 'auth/login.html') + +def logout(request): + return render(request, 'auth/logout.html') \ No newline at end of file diff --git a/iaso/settings/__init__.py b/iaso/settings/__init__.py index 70291ac..39bb739 100644 --- a/iaso/settings/__init__.py +++ b/iaso/settings/__init__.py @@ -10,8 +10,13 @@ BASE_DIR = Path(__file__).resolve().parent.parent # Application definition INSTALLED_APPS = [ + # iaso "iaso.apps.users", + # packages + "pipeline", + + # django "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", @@ -35,7 +40,7 @@ ROOT_URLCONF = "iaso.urls" TEMPLATES = [ { "BACKEND": "django.template.backends.django.DjangoTemplates", - "DIRS": [], + 'DIRS': [BASE_DIR / 'templates'], "APP_DIRS": True, "OPTIONS": { "context_processors": [ @@ -92,6 +97,23 @@ STATICFILES_DIRS = ( BASE_DIR / 'static/', ) +STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage' + +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + 'pipeline.finders.PipelineFinder', +) + + +PIPELINE = { + "CSS_COMPRESSOR": None, + "COMPILERS": ["pipeline.compilers.sass.SASSCompiler"], + "STYLESHEETS": { + + } +} + MEDIA_ROOT = BASE_DIR / 'media/' MEDIA_URL = '/media/' diff --git a/iaso/static/css/base.css b/iaso/static/css/base.css deleted file mode 100644 index 44b5059..0000000 --- a/iaso/static/css/base.css +++ /dev/null @@ -1 +0,0 @@ -/* base.css */ \ No newline at end of file diff --git a/iaso/static/css/base.scss b/iaso/static/css/base.scss new file mode 100644 index 0000000..0b7bb7c --- /dev/null +++ b/iaso/static/css/base.scss @@ -0,0 +1 @@ +/* base.scss */ \ No newline at end of file diff --git a/iaso/static/css/login.scss b/iaso/static/css/login.scss new file mode 100644 index 0000000..a4b5318 --- /dev/null +++ b/iaso/static/css/login.scss @@ -0,0 +1,3 @@ +* { + color: red +} \ No newline at end of file diff --git a/iaso/templates/auth/login.html b/iaso/templates/auth/login.html new file mode 100644 index 0000000..3ce7ff4 --- /dev/null +++ b/iaso/templates/auth/login.html @@ -0,0 +1,30 @@ +{% extends "base_page.html" %} +{% load static %} +{% load pipeline %} + +{% block title %} + {{ block.super }} - login +{% endblock %} + +{% block css %} + {{ block.super }} + + {% stylesheet 'login' %} +{% endblock %} + +{% block body %} +