Prathamesh Sable commited on
Commit
13fb29e
·
1 Parent(s): ecb607d

Django project start

Browse files
MultiFileChatting/MultiFileChatting/__init__.py ADDED
File without changes
MultiFileChatting/MultiFileChatting/asgi.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ASGI config for MultiFileChatting project.
3
+
4
+ It exposes the ASGI callable as a module-level variable named ``application``.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/
8
+ """
9
+
10
+ import os
11
+
12
+ from django.core.asgi import get_asgi_application
13
+
14
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'MultiFileChatting.settings')
15
+
16
+ application = get_asgi_application()
MultiFileChatting/MultiFileChatting/settings.py ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Django settings for MultiFileChatting project.
3
+
4
+ Generated by 'django-admin startproject' using Django 5.1.4.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/5.1/topics/settings/
8
+
9
+ For the full list of settings and their values, see
10
+ https://docs.djangoproject.com/en/5.1/ref/settings/
11
+ """
12
+
13
+ from pathlib import Path
14
+ import os
15
+ import dotenv
16
+
17
+ # Load environment variables from .env file
18
+ dotenv.load_dotenv()
19
+
20
+ # Build paths inside the project like this: BASE_DIR / 'subdir'.
21
+ BASE_DIR = Path(__file__).resolve().parent.parent
22
+
23
+
24
+ # Quick-start development settings - unsuitable for production
25
+ # See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
26
+
27
+ # SECURITY WARNING: keep the secret key used in production secret!
28
+ SECRET_KEY = os.getenv('SECRET_KEY')
29
+
30
+ # SECURITY WARNING: don't run with debug turned on in production!
31
+ DEBUG = os.getenv('DEBUG').lower() == 'true'
32
+
33
+ ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS').split(',')
34
+
35
+
36
+ # Application definition
37
+
38
+ INSTALLED_APPS = [
39
+ 'django.contrib.admin',
40
+ 'django.contrib.auth',
41
+ 'django.contrib.contenttypes',
42
+ 'django.contrib.sessions',
43
+ 'django.contrib.messages',
44
+ 'django.contrib.staticfiles',
45
+ ]
46
+
47
+ MIDDLEWARE = [
48
+ 'django.middleware.security.SecurityMiddleware',
49
+ 'django.contrib.sessions.middleware.SessionMiddleware',
50
+ 'django.middleware.common.CommonMiddleware',
51
+ 'django.middleware.csrf.CsrfViewMiddleware',
52
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
53
+ 'django.contrib.messages.middleware.MessageMiddleware',
54
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
55
+ ]
56
+
57
+ ROOT_URLCONF = 'MultiFileChatting.urls'
58
+
59
+ TEMPLATES = [
60
+ {
61
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
62
+ 'DIRS': [],
63
+ 'APP_DIRS': True,
64
+ 'OPTIONS': {
65
+ 'context_processors': [
66
+ 'django.template.context_processors.debug',
67
+ 'django.template.context_processors.request',
68
+ 'django.contrib.auth.context_processors.auth',
69
+ 'django.contrib.messages.context_processors.messages',
70
+ ],
71
+ },
72
+ },
73
+ ]
74
+
75
+ WSGI_APPLICATION = 'MultiFileChatting.wsgi.application'
76
+
77
+
78
+ # Database
79
+ # https://docs.djangoproject.com/en/5.1/ref/settings/#databases
80
+
81
+ DATABASES = {
82
+ 'default': {
83
+ 'ENGINE': 'django.db.backends.sqlite3',
84
+ 'NAME': BASE_DIR / 'db.sqlite3',
85
+ }
86
+ }
87
+
88
+
89
+ # Password validation
90
+ # https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
91
+
92
+ AUTH_PASSWORD_VALIDATORS = [
93
+ {
94
+ 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
95
+ },
96
+ {
97
+ 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
98
+ },
99
+ {
100
+ 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
101
+ },
102
+ {
103
+ 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
104
+ },
105
+ ]
106
+
107
+
108
+ # Internationalization
109
+ # https://docs.djangoproject.com/en/5.1/topics/i18n/
110
+
111
+ LANGUAGE_CODE = 'en-us'
112
+
113
+ TIME_ZONE = 'UTC'
114
+
115
+ USE_I18N = True
116
+
117
+ USE_TZ = True
118
+
119
+
120
+ # Static files (CSS, JavaScript, Images)
121
+ # https://docs.djangoproject.com/en/5.1/howto/static-files/
122
+
123
+ STATIC_URL = 'static/'
124
+
125
+ # Default primary key field type
126
+ # https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
127
+
128
+ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
MultiFileChatting/MultiFileChatting/urls.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ URL configuration for MultiFileChatting project.
3
+
4
+ The `urlpatterns` list routes URLs to views. For more information please see:
5
+ https://docs.djangoproject.com/en/5.1/topics/http/urls/
6
+ Examples:
7
+ Function views
8
+ 1. Add an import: from my_app import views
9
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
10
+ Class-based views
11
+ 1. Add an import: from other_app.views import Home
12
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
13
+ Including another URLconf
14
+ 1. Import the include() function: from django.urls import include, path
15
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
16
+ """
17
+ from django.contrib import admin
18
+ from django.urls import path
19
+
20
+ urlpatterns = [
21
+ path('admin/', admin.site.urls),
22
+ ]
MultiFileChatting/MultiFileChatting/wsgi.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ WSGI config for MultiFileChatting project.
3
+
4
+ It exposes the WSGI callable as a module-level variable named ``application``.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/
8
+ """
9
+
10
+ import os
11
+
12
+ from django.core.wsgi import get_wsgi_application
13
+
14
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'MultiFileChatting.settings')
15
+
16
+ application = get_wsgi_application()
MultiFileChatting/manage.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ """Django's command-line utility for administrative tasks."""
3
+ import os
4
+ import sys
5
+
6
+
7
+ def main():
8
+ """Run administrative tasks."""
9
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'MultiFileChatting.settings')
10
+ try:
11
+ from django.core.management import execute_from_command_line
12
+ except ImportError as exc:
13
+ raise ImportError(
14
+ "Couldn't import Django. Are you sure it's installed and "
15
+ "available on your PYTHONPATH environment variable? Did you "
16
+ "forget to activate a virtual environment?"
17
+ ) from exc
18
+ execute_from_command_line(sys.argv)
19
+
20
+
21
+ if __name__ == '__main__':
22
+ main()