add: приложение hypn0_site

This commit is contained in:
2026-08-11 16:53:05 +03:00
parent 068a7cb01b
commit dae5610f4b
12 changed files with 63 additions and 3 deletions
View File
+3
View File
@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.
+13
View File
@@ -0,0 +1,13 @@
from django.apps import AppConfig
class Hypn0SiteConfig(AppConfig):
name = 'hypn0_site'
verbose_name = 'Сайт Hypn0'
def ready(self) -> None:
"""Инициализация Django Admin с кастомным заголовком и названиями."""
from django.contrib import admin
admin.site.site_header = 'Управление HYPN0'
admin.site.site_title = 'Hypn0 Administrator'
admin.site.index_title = 'Добро пожаловать в Hypn0'
+3
View File
@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.
+3
View File
@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.
+14
View File
@@ -0,0 +1,14 @@
from django.urls import path
from . import views
from hypn0 import settings
app_name = "hypn0_site"
urlpatterns = [
path("", views.index, name="index"),
]
if settings.DEBUG:
urlpatterns += [path('tmp/', views.tmp, name='web_tmp')]
+11
View File
@@ -0,0 +1,11 @@
from django.shortcuts import render
from django.http import HttpRequest, HttpResponse, Http404
# Create your views here.
def index(request: HttpRequest | None) -> HttpResponse:
return render(request, 'index.html', {})
def tmp(request: HttpRequest | None) -> HttpResponse:
return render(request, 'tmp.html', {})