Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django project restarted #1

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.pyc
.idea/workspace.xml
.gitignore
2 changes: 1 addition & 1 deletion .idea/cinema.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

128 changes: 99 additions & 29 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed cinema/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed cinema/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed cinema/__pycache__/settings.cpython-311.pyc
Binary file not shown.
Binary file removed cinema/__pycache__/settings.cpython-38.pyc
Binary file not shown.
Binary file removed cinema/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file removed cinema/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file removed cinema/__pycache__/wsgi.cpython-311.pyc
Binary file not shown.
Binary file removed cinema/__pycache__/wsgi.cpython-38.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion cinema/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
It exposes the ASGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/
"""

import os
Expand Down
38 changes: 21 additions & 17 deletions cinema/settings.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
"""
Django settings for cinema project.

Generated by 'django-admin startproject' using Django 4.2.10.
Generated by 'django-admin startproject' using Django 5.0.3.

For more information on this file, see
https://docs.djangoproject.com/en/4.2/topics/settings/
https://docs.djangoproject.com/en/5.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.2/ref/settings/
https://docs.djangoproject.com/en/5.0/ref/settings/
"""

from pathlib import Path
import logging

# 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/4.2/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-7-a@eb9$+hoho021q$euaq^ieoai@=070r-j&$lgnja^d2xu3&'
SECRET_KEY = 'django-insecure-#q%pz%^75961leq(4%4(c3t2r2-^b(oh458c_cdhhw^51rqefx'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['localhost']
ALLOWED_HOSTS = []


# Application definition

Expand All @@ -37,9 +38,9 @@
'django.contrib.messages',
'django.contrib.staticfiles',
'users',
'tickets',
'movies',
'screenings'
'screenings',
'tickets'
]

MIDDLEWARE = [
Expand All @@ -57,8 +58,7 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates']
,
'DIRS': ['templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand All @@ -73,12 +73,13 @@

WSGI_APPLICATION = 'cinema.wsgi.application'


# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'cinema',
'USER': 'admin',
'PASSWORD': 'admin',
Expand All @@ -87,8 +88,9 @@
}
}


# Password validation
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
Expand All @@ -105,8 +107,9 @@
},
]


# Internationalization
# https://docs.djangoproject.com/en/4.2/topics/i18n/
# https://docs.djangoproject.com/en/5.0/topics/i18n/

LANGUAGE_CODE = 'ru'

Expand All @@ -116,8 +119,9 @@

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/
# https://docs.djangoproject.com/en/5.0/howto/static-files/

STATIC_URL = 'static/'

Expand All @@ -126,7 +130,7 @@
]

# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

Expand Down
3 changes: 1 addition & 2 deletions cinema/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
URL configuration for cinema project.

The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
https://docs.djangoproject.com/en/5.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
Expand All @@ -16,7 +16,6 @@
"""
from django.contrib import admin
from django.urls import path, include

from django.conf import settings
from django.conf.urls.static import static

Expand Down
Empty file removed cinema/views.py
Empty file.
2 changes: 1 addition & 1 deletion cinema/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/
"""

import os
Expand Down
Binary file removed movies/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed movies/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed movies/__pycache__/admin.cpython-311.pyc
Binary file not shown.
Binary file removed movies/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file removed movies/__pycache__/apps.cpython-311.pyc
Binary file not shown.
Binary file removed movies/__pycache__/apps.cpython-38.pyc
Binary file not shown.
Binary file removed movies/__pycache__/models.cpython-311.pyc
Binary file not shown.
Binary file removed movies/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file removed movies/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file removed movies/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file removed movies/__pycache__/views.cpython-311.pyc
Binary file not shown.
Binary file removed movies/__pycache__/views.cpython-38.pyc
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.
Binary file not shown.
Binary file not shown.
Binary file removed movies/migrations/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed movies/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading