diff --git a/.gitignore b/.gitignore index 8a92444..cad0afc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ db.sqlite3 db1.sqlite3 __pycache__ migrations -venv \ No newline at end of file +venv +media \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 1b1ca42..c4cf80a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3 +FROM python:3.10 ENV PYTHONUNBUFFERED 1 diff --git a/docker-compose.yml b/docker-compose.yml index 6f53631..cf2f47f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,7 @@ services: - 8000:8000 volumes: - ./db/db.sqlite3:/app/db.sqlite3 + # - ./media:/app/ env_file: - ./.env @@ -16,5 +17,6 @@ services: - 80:80 volumes: - ./db/db.sqlite3:/app/db.sqlite3 + # - ./media:/app/ depends_on: - web \ No newline at end of file diff --git a/home/views.py b/home/views.py index 22d5a69..563ade5 100644 --- a/home/views.py +++ b/home/views.py @@ -298,7 +298,7 @@ def addLongRebateBill(request): text = "Allocation ID for the entered email does not exist" print(e) except: - text = "Email ID does not exist in the database. Please eneter the correct email ID" + text = "Email ID does not exist in the database. Please login using the correct email ID" request.session["text"] = text return redirect(request.path) text = request.session.get("text", "") diff --git a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24.pdf b/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24.pdf deleted file mode 100644 index 735600b..0000000 Binary files a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24.pdf and /dev/null differ diff --git a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_FAIxF0s.pdf b/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_FAIxF0s.pdf deleted file mode 100644 index 735600b..0000000 Binary files a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_FAIxF0s.pdf and /dev/null differ diff --git a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_WrRvMXb.pdf b/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_WrRvMXb.pdf deleted file mode 100644 index 735600b..0000000 Binary files a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_WrRvMXb.pdf and /dev/null differ diff --git a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_hPxi58p.pdf b/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_hPxi58p.pdf deleted file mode 100644 index 735600b..0000000 Binary files a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_hPxi58p.pdf and /dev/null differ diff --git a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_kvr4z71.pdf b/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_kvr4z71.pdf deleted file mode 100644 index 735600b..0000000 Binary files a/media/documents/PhD_and_PG_Admission_International_Students_Flyer_23-24_kvr4z71.pdf and /dev/null differ diff --git a/media/static/images/Aladdin.JPG b/media/static/images/Aladdin.JPG deleted file mode 100644 index 9a91e21..0000000 Binary files a/media/static/images/Aladdin.JPG and /dev/null differ diff --git a/media/static/images/Amul.JPG b/media/static/images/Amul.JPG deleted file mode 100644 index d2bafd0..0000000 Binary files a/media/static/images/Amul.JPG and /dev/null differ diff --git a/media/static/images/Amul_Parlor.JPG b/media/static/images/Amul_Parlor.JPG deleted file mode 100644 index 8127318..0000000 Binary files a/media/static/images/Amul_Parlor.JPG and /dev/null differ diff --git a/media/static/images/Asoosiate_Dining_Warden.jpg b/media/static/images/Asoosiate_Dining_Warden.jpg deleted file mode 100644 index d949dd0..0000000 Binary files a/media/static/images/Asoosiate_Dining_Warden.jpg and /dev/null differ diff --git a/media/static/images/Asoosiate_Dining_Warden_EVk7P9W.jpg b/media/static/images/Asoosiate_Dining_Warden_EVk7P9W.jpg deleted file mode 100644 index d949dd0..0000000 Binary files a/media/static/images/Asoosiate_Dining_Warden_EVk7P9W.jpg and /dev/null differ diff --git a/media/static/images/Bakelogy.JPG b/media/static/images/Bakelogy.JPG deleted file mode 100644 index 2aa8d6d..0000000 Binary files a/media/static/images/Bakelogy.JPG and /dev/null differ diff --git a/media/static/images/Bakeology.jpg b/media/static/images/Bakeology.jpg deleted file mode 100644 index 0de6753..0000000 Binary files a/media/static/images/Bakeology.jpg and /dev/null differ diff --git a/media/static/images/Committee_Member_1.png b/media/static/images/Committee_Member_1.png deleted file mode 100644 index 0c04468..0000000 Binary files a/media/static/images/Committee_Member_1.png and /dev/null differ diff --git a/media/static/images/Committee_Member_2.png.jpg b/media/static/images/Committee_Member_2.png.jpg deleted file mode 100644 index f5888b2..0000000 Binary files a/media/static/images/Committee_Member_2.png.jpg and /dev/null differ diff --git a/media/static/images/Cutting_edge.jpg b/media/static/images/Cutting_edge.jpg deleted file mode 100644 index 8fae898..0000000 Binary files a/media/static/images/Cutting_edge.jpg and /dev/null differ diff --git a/media/static/images/DSC09907.JPG b/media/static/images/DSC09907.JPG deleted file mode 100644 index bd11cbd..0000000 Binary files a/media/static/images/DSC09907.JPG and /dev/null differ diff --git a/media/static/images/DSC09907_54bsHKG.JPG b/media/static/images/DSC09907_54bsHKG.JPG deleted file mode 100644 index bd11cbd..0000000 Binary files a/media/static/images/DSC09907_54bsHKG.JPG and /dev/null differ diff --git a/media/static/images/DSC09908.JPG b/media/static/images/DSC09908.JPG deleted file mode 100644 index 5fd1e0f..0000000 Binary files a/media/static/images/DSC09908.JPG and /dev/null differ diff --git a/media/static/images/DSC09908_2kixziT.JPG b/media/static/images/DSC09908_2kixziT.JPG deleted file mode 100644 index 5fd1e0f..0000000 Binary files a/media/static/images/DSC09908_2kixziT.JPG and /dev/null differ diff --git a/media/static/images/DSC09909.JPG b/media/static/images/DSC09909.JPG deleted file mode 100644 index c710f43..0000000 Binary files a/media/static/images/DSC09909.JPG and /dev/null differ diff --git a/media/static/images/DSC09909_YWcU03b.JPG b/media/static/images/DSC09909_YWcU03b.JPG deleted file mode 100644 index c710f43..0000000 Binary files a/media/static/images/DSC09909_YWcU03b.JPG and /dev/null differ diff --git a/media/static/images/DSC09910_Ps4lp9e.JPG b/media/static/images/DSC09910_Ps4lp9e.JPG deleted file mode 100644 index e8e4681..0000000 Binary files a/media/static/images/DSC09910_Ps4lp9e.JPG and /dev/null differ diff --git a/media/static/images/DSC09910_Ps4lp9e_gh94aA9.JPG b/media/static/images/DSC09910_Ps4lp9e_gh94aA9.JPG deleted file mode 100644 index e8e4681..0000000 Binary files a/media/static/images/DSC09910_Ps4lp9e_gh94aA9.JPG and /dev/null differ diff --git a/media/static/images/DSC09911_F8UqzUJ.JPG b/media/static/images/DSC09911_F8UqzUJ.JPG deleted file mode 100644 index a2c38a6..0000000 Binary files a/media/static/images/DSC09911_F8UqzUJ.JPG and /dev/null differ diff --git a/media/static/images/DSC09913_SJSrIuf.JPG b/media/static/images/DSC09913_SJSrIuf.JPG deleted file mode 100644 index acd4429..0000000 Binary files a/media/static/images/DSC09913_SJSrIuf.JPG and /dev/null differ diff --git a/media/static/images/Electronic_Shop.JPG b/media/static/images/Electronic_Shop.JPG deleted file mode 100644 index 6d39790..0000000 Binary files a/media/static/images/Electronic_Shop.JPG and /dev/null differ diff --git a/media/static/images/IITI3.png b/media/static/images/IITI3.png deleted file mode 100644 index 32ccea8..0000000 Binary files a/media/static/images/IITI3.png and /dev/null differ diff --git a/media/static/images/IMG-7560.jpg b/media/static/images/IMG-7560.jpg deleted file mode 100644 index bf24721..0000000 Binary files a/media/static/images/IMG-7560.jpg and /dev/null differ diff --git a/media/static/images/Laundry.jpg b/media/static/images/Laundry.jpg deleted file mode 100644 index 40fa7d8..0000000 Binary files a/media/static/images/Laundry.jpg and /dev/null differ diff --git a/media/static/images/Ms_Laundary.JPG b/media/static/images/Ms_Laundary.JPG deleted file mode 100644 index 0287717..0000000 Binary files a/media/static/images/Ms_Laundary.JPG and /dev/null differ diff --git a/media/static/images/Pic_Lfresco1.jpg b/media/static/images/Pic_Lfresco1.jpg deleted file mode 100644 index cebd899..0000000 Binary files a/media/static/images/Pic_Lfresco1.jpg and /dev/null differ diff --git a/media/static/images/dining_Warden.jpg b/media/static/images/dining_Warden.jpg deleted file mode 100644 index b8a69f6..0000000 Binary files a/media/static/images/dining_Warden.jpg and /dev/null differ diff --git a/media/static/images/lalit.png b/media/static/images/lalit.png deleted file mode 100644 index e3e237c..0000000 Binary files a/media/static/images/lalit.png and /dev/null differ diff --git a/media/static/images/lalit_1tIEzDx.png b/media/static/images/lalit_1tIEzDx.png deleted file mode 100644 index e3e237c..0000000 Binary files a/media/static/images/lalit_1tIEzDx.png and /dev/null differ diff --git a/media/static/images/lalit_5sfWUPA.png b/media/static/images/lalit_5sfWUPA.png deleted file mode 100644 index e3e237c..0000000 Binary files a/media/static/images/lalit_5sfWUPA.png and /dev/null differ diff --git a/media/static/images/lalit_n2OgA71.png b/media/static/images/lalit_n2OgA71.png deleted file mode 100644 index e3e237c..0000000 Binary files a/media/static/images/lalit_n2OgA71.png and /dev/null differ diff --git a/media/static/images/lalit_oPgQj2W.png b/media/static/images/lalit_oPgQj2W.png deleted file mode 100644 index e3e237c..0000000 Binary files a/media/static/images/lalit_oPgQj2W.png and /dev/null differ diff --git a/media/static/images/mess_cover.jpg b/media/static/images/mess_cover.jpg deleted file mode 100644 index 77898ed..0000000 Binary files a/media/static/images/mess_cover.jpg and /dev/null differ diff --git a/media/static/images/teapost.jpg b/media/static/images/teapost.jpg deleted file mode 100644 index 5659c2f..0000000 Binary files a/media/static/images/teapost.jpg and /dev/null differ diff --git a/messWebsite/settings.py b/messWebsite/settings.py index ef361da..96b89df 100644 --- a/messWebsite/settings.py +++ b/messWebsite/settings.py @@ -193,9 +193,9 @@ DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.RawMediaCloudinaryStorage' DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage' +# MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') MEDIA_URL= '/media/' - # Default primary key field type # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field diff --git a/nginx/default.conf b/nginx/default.conf index ef97f98..3afda2a 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -10,9 +10,7 @@ server{ location /{ proxy_pass http://django; } - location /media { - autoindex on; - alias /home/myusername/myproject/media/; - } - + # location /media/ { + # alias /app/media/; + # } } \ No newline at end of file