mirror of
https://github.com/tvastri-studio/iaso.git
synced 2025-04-09 22:40:16 -04:00
feat: added django-pipeline and login templating
This commit is contained in:
parent
65f0c03770
commit
9920bf248c
1
Pipfile
1
Pipfile
|
@ -5,6 +5,7 @@ name = "pypi"
|
|||
|
||||
[packages]
|
||||
django = "4.1"
|
||||
django-pipeline = "*"
|
||||
|
||||
[dev-packages]
|
||||
|
||||
|
|
16
Pipfile.lock
generated
16
Pipfile.lock
generated
|
@ -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": [
|
||||
|
|
8
iaso/apps/auth/urls.py
Normal file
8
iaso/apps/auth/urls.py
Normal file
|
@ -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"),
|
||||
]
|
|
@ -12,4 +12,10 @@ def index(request):
|
|||
"form": form
|
||||
}
|
||||
|
||||
return render(request, 'auth/login.html', context=context)
|
||||
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')
|
|
@ -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/'
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/* base.css */
|
1
iaso/static/css/base.scss
Normal file
1
iaso/static/css/base.scss
Normal file
|
@ -0,0 +1 @@
|
|||
/* base.scss */
|
3
iaso/static/css/login.scss
Normal file
3
iaso/static/css/login.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
* {
|
||||
color: red
|
||||
}
|
30
iaso/templates/auth/login.html
Normal file
30
iaso/templates/auth/login.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% extends "base_page.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - login
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" href="{% static 'dist/skeleton.css' %}">
|
||||
{% stylesheet 'login' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="login">
|
||||
<h1 id="logo"
|
||||
style="margin-bottom: 10px; color: #000000!important; text-shadow: -0px 0 #DDE3EB, 0 0px #DDE3EB, 0px 0 #DDE3EB, 0 -0px #DDE3EB!important;">
|
||||
iaso</h1>
|
||||
<form method="POST" action="?i=redirect&r=YToxOntzOjE6ImkiO3M6NDoibWFpbiI7fQ=="><input type="text" name="user"
|
||||
style="background: url(https://i.imgur.com/a80wRzt.png) no-repeat scroll 7px 3px; padding-left: 30px; background-size: 17px; width: 184px; margin-bottom: 10px;"><input
|
||||
type="password" name="pass"
|
||||
style="background: url(https://i.imgur.com/Z2JxXsv.png) no-repeat scroll 7px 4px; padding-left: 30px; background-size: 16px; width: 184px; margin-bottom: 10px;"><input
|
||||
type="submit" value="Access">
|
||||
<blockquote style="border-left: 0px">
|
||||
<p style="margin-bottom: 10px; font-size: 15px;">Gladness becomes Weeping</p><cite>Amos Tutuola</cite>
|
||||
</blockquote>
|
||||
</form><a href="?i=forget" id="forget">don't remember your pass?</a>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,6 +1,7 @@
|
|||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
]
|
||||
path("", include("iaso.apps.auth.urls")),
|
||||
]
|
Loading…
Reference in New Issue
Block a user