Merge remote-tracking branch 'origin/feature/profile_page' into feature/registration

# Conflicts:
#	access_controller/urls.py
#	main/views.py
This commit is contained in:
Sokurov Idar
2021-02-08 19:12:51 +03:00
6 changed files with 150 additions and 10 deletions

View File

@@ -15,7 +15,6 @@ from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
@@ -27,7 +26,6 @@ DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
@@ -73,7 +71,6 @@ TEMPLATES = [
WSGI_APPLICATION = 'access_controller.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
@@ -84,7 +81,6 @@ DATABASES = {
}
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
@@ -103,7 +99,6 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
@@ -117,7 +112,6 @@ USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
@@ -127,3 +121,4 @@ STATICFILES_DIRS = [
]
MEDIA_ROOT = BASE_DIR / 'media'
MEDIA_URL = '/media/'

View File

@@ -13,12 +13,17 @@ 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.conf.urls.static import static
from django.contrib import admin
from django.urls import path
from main.views import Reg
from access_controller import settings
from main.views import *
urlpatterns = [
path('admin/', admin.site.urls, name='admin'),
path('register/', Reg.as_view(), name='registration'),
path('admin/', admin.site.urls),
path('profile/', profile_page, name="Profile"),
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)