Ведется разработка скелета
This commit is contained in:
parent
3ea9659f0b
commit
5ad964a082
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +0,0 @@
|
|||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.index, name='index')
|
||||
]
|
|
@ -1,4 +0,0 @@
|
|||
from django.http import HttpResponse
|
||||
|
||||
def index(request):
|
||||
return HttpResponse('<h1>Hello world!</h1>')
|
|
@ -11,18 +11,16 @@ https://docs.djangoproject.com/en/4.1/ref/settings/
|
|||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import os, sys
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
PROJECT_ROOT = os.path.dirname(__file__)
|
||||
sys.path.insert(0, os.path.join(PROJECT_ROOT, 'apps'))
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-&35w=2x@*pa4ck7jq9)38f-a*=tz=w(fu*=&z3u3mxy@q%eo@r'
|
||||
SECRET_KEY = 'django-insecure-e5_t(3qi0zd$42t*akukbr5^*@#znl-x-xxej94!*!!9g%0nwj'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
@ -33,6 +31,7 @@ ALLOWED_HOSTS = []
|
|||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'main',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
|
@ -77,6 +76,14 @@ WSGI_APPLICATION = 'djangosite.wsgi.application'
|
|||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'django',
|
||||
'USER': 'dhaverd',
|
||||
'PASSWORD': 'Dha.Verd506763',
|
||||
'HOST': '192.168.0.105',
|
||||
'PORT': 3306,
|
||||
},
|
||||
'workout': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'workout',
|
||||
'USER': 'dhaverd',
|
||||
|
|
|
@ -17,6 +17,6 @@ from django.contrib import admin
|
|||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('articles/', include('articles.urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
path('', include('main.urls'))
|
||||
]
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ArticlesConfig(AppConfig):
|
||||
class MainConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'articles'
|
||||
name = 'main'
|
Binary file not shown.
|
@ -0,0 +1,9 @@
|
|||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.index),
|
||||
path('servers', views.servers),
|
||||
path('mychat', views.mychat),
|
||||
path('workout', views.workout)
|
||||
]
|
|
@ -0,0 +1,19 @@
|
|||
from django.shortcuts import render
|
||||
from django.http import HttpResponse
|
||||
|
||||
|
||||
# Create your views here.
|
||||
def index(request):
|
||||
return HttpResponse('<a href="localhost:8000/servers/">Сервера</a>')
|
||||
|
||||
|
||||
def servers(request):
|
||||
return HttpResponse('server list')
|
||||
|
||||
|
||||
def mychat(request):
|
||||
return HttpResponse('mychat info')
|
||||
|
||||
|
||||
def workout(request):
|
||||
return HttpResponse('workout task list')
|
Loading…
Reference in New Issue