Skip to content

Commit be3c448

Browse files
authored
Merge pull request #51 from ria2003/my-new-branch
Hostel Allocation System
2 parents 0734adb + e7c1348 commit be3c448

40 files changed

+1450
-0
lines changed

HostelAllocation/HostelAllocation/__init__.py

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
ASGI config for HostelAllocation 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', 'HostelAllocation.settings')
15+
16+
application = get_asgi_application()
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
"""
2+
Django settings for HostelAllocation project.
3+
4+
Generated by 'django-admin startproject' using Django 5.1.2.
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+
15+
BASE_DIR = Path(__file__).resolve().parent.parent
16+
17+
SECRET_KEY = 'django-insecure-==_5grwpnkip%-=y(opao5%#y56_(eb*1he(t3g32h)#bou(!d'
18+
19+
DEBUG = True
20+
21+
ALLOWED_HOSTS = []
22+
23+
INSTALLED_APPS = [
24+
'django.contrib.admin',
25+
'django.contrib.auth',
26+
'django.contrib.contenttypes',
27+
'django.contrib.sessions',
28+
'django.contrib.messages',
29+
'django.contrib.staticfiles',
30+
'hostel'
31+
]
32+
33+
MIDDLEWARE = [
34+
'django.middleware.security.SecurityMiddleware',
35+
'django.contrib.sessions.middleware.SessionMiddleware',
36+
'django.middleware.common.CommonMiddleware',
37+
'django.middleware.csrf.CsrfViewMiddleware',
38+
'django.contrib.auth.middleware.AuthenticationMiddleware',
39+
'django.contrib.messages.middleware.MessageMiddleware',
40+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
41+
]
42+
43+
ROOT_URLCONF = 'HostelAllocation.urls'
44+
45+
TEMPLATES = [
46+
{
47+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
48+
'DIRS': [],
49+
'APP_DIRS': True,
50+
'OPTIONS': {
51+
'context_processors': [
52+
'django.template.context_processors.debug',
53+
'django.template.context_processors.request',
54+
'django.contrib.auth.context_processors.auth',
55+
'django.contrib.messages.context_processors.messages',
56+
],
57+
},
58+
},
59+
]
60+
61+
WSGI_APPLICATION = 'HostelAllocation.wsgi.application'
62+
63+
64+
DATABASES = {
65+
'default': {
66+
'ENGINE': 'django.db.backends.sqlite3',
67+
'NAME': BASE_DIR / 'db.sqlite3',
68+
}
69+
}
70+
71+
72+
AUTH_PASSWORD_VALIDATORS = [
73+
{
74+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
75+
},
76+
{
77+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
78+
},
79+
{
80+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
81+
},
82+
{
83+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
84+
},
85+
]
86+
87+
88+
LANGUAGE_CODE = 'en-us'
89+
90+
TIME_ZONE = 'UTC'
91+
92+
USE_I18N = True
93+
94+
USE_TZ = True
95+
96+
97+
STATIC_URL = '/static/'
98+
99+
STATICFILES_DIRS = [
100+
BASE_DIR / 'hostel' / 'static'
101+
]
102+
103+
104+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""
2+
URL configuration for HostelAllocation 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 include, path
19+
from django.views.generic import RedirectView
20+
21+
urlpatterns = [
22+
path('admin/', admin.site.urls),
23+
path('hostel/', include('hostel.urls')),
24+
path('', RedirectView.as_view(url='/hostel/login/', permanent=False)),
25+
]
26+
27+
28+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
WSGI config for HostelAllocation 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', 'HostelAllocation.settings')
15+
16+
application = get_wsgi_application()

HostelAllocation/hostel/__init__.py

Whitespace-only changes.

HostelAllocation/hostel/admin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.

HostelAllocation/hostel/apps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.apps import AppConfig
2+
3+
4+
class HostelConfig(AppConfig):
5+
default_auto_field = 'django.db.models.BigAutoField'
6+
name = 'hostel'

HostelAllocation/hostel/management/__init__.py

Whitespace-only changes.

HostelAllocation/hostel/management/commands/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)