Version 1.0

This commit is contained in:
2024-10-09 21:10:49 +02:00
commit 03efc31923
620 changed files with 67495 additions and 0 deletions

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 AccountsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'accounts'

View File

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

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index</title>
<link rel="stylesheet" href="{% static 'css/style.css' %}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css" integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls" crossorigin="anonymous">
</head>
<body>
<div class="content">
{% block content %}
{% endblock %}
</div>
</body>
</html>

View File

@@ -0,0 +1,9 @@
{% extends "accounts/base.html" %}
{% block content %}
<form method="post" class="pure-form">
{% csrf_token %}
{{ form }}<br/>
<button type="submit" class="pure-button pure-button-primary">Register</button>
</form>
{% endblock %}

View File

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

View File

@@ -0,0 +1,7 @@
from django.urls import path
from .views import RegistrationView
urlpatterns = [
path("registration", RegistrationView.as_view(), name="registration" )
]

View File

@@ -0,0 +1,12 @@
from django.contrib.auth.forms import UserCreationForm
from django.shortcuts import render
from django.urls import reverse_lazy
from django.views.generic import CreateView
# Create your views here.
class RegistrationView(CreateView):
form_class = UserCreationForm
success_url = reverse_lazy("login")
template_name = "accounts/registration.html"