created login django app

This commit is contained in:
CDaut 2022-05-29 17:50:26 +02:00 committed by CDaut
parent c208f4adff
commit 22b616082b
13 changed files with 65 additions and 20 deletions

View file

@ -2,8 +2,8 @@ FROM python:3.10-alpine
ENV PYTHONBUFFERED 1
RUN apk update && apk upgrade
RUN mkdir "/gui_server"
WORKDIR "/gui_server"
ADD ./requirements.txt /gui_server/
RUN mkdir "/markdownblog"
WORKDIR "/markdownblog"
ADD ./requirements.txt /markdownblog/
RUN pip3 install -r requirements.txt
ADD ./ /gui_server/
ADD ./ /markdownblog/

View file

View file

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View file

@ -0,0 +1,6 @@
from django.apps import AppConfig
class LoginConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'login'

View file

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

View file

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View file

@ -0,0 +1,6 @@
from django.urls import path
from login.views import loginview
urlpatterns = [
path('login/', loginview)
]

View file

@ -0,0 +1,6 @@
from django.shortcuts import render
# Create your views here.
def loginview(request):
return render(request, 'login/login.html')

View file

@ -31,6 +31,8 @@ ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'login',
'markdownblog',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View file

@ -1,21 +1,7 @@
"""markdownblog URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.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
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('auth/', include('login.urls')),
]