diff --git a/Lab101/Lab/__init__.py b/Lab101/Lab/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Lab101/Lab/admin.py b/Lab101/Lab/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/Lab101/Lab/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/Lab101/Lab/apps.py b/Lab101/Lab/apps.py new file mode 100644 index 0000000..b8731fc --- /dev/null +++ b/Lab101/Lab/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class LabConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'Lab' diff --git a/Lab101/Lab/migrations/__init__.py b/Lab101/Lab/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Lab101/Lab/models.py b/Lab101/Lab/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/Lab101/Lab/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/Lab101/Lab/static/css/ai.css b/Lab101/Lab/static/css/ai.css new file mode 100644 index 0000000..2bad79b --- /dev/null +++ b/Lab101/Lab/static/css/ai.css @@ -0,0 +1,122 @@ +* { + box-sizing: border-box; +} + +body { + font-family: 'Georgia', serif; + line-height: 1.6; + color: #333; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + align-items: center; + background-color: #f9f9f9; +} + +header { + background: #003366; + color: #FFFFFF; + padding: 20px 50px; + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; +} + +.navigtion { + font-size: 1.1em; +} + +.navigtion a { + color: #FFFFFF; + margin: 0 15px; + position: relative; + text-decoration: none; +} + +.navigtion a::after { + content: ""; + position: absolute; + left: 0; + bottom: -6px; + width: 100%; + height: 3px; + background: #FFFFFF; + border-radius: 5px; + transform: scale(0); + transition: transform .5s; +} + +.navigtion a:hover::after { + transform: scale(1); +} + +.navigtion .Login { + width: 120px; + height: 40px; + background: transparent; + border: 2px solid #FFFFFF; + border-radius: 6px; + font-size: 1.1em; + color: #FFFFFF; + margin-left: 40px; + transition: background 0.5s, color 0.5s; +} + +.navigtion .Login:hover { + background: #FFFFFF; + color: #003366; +} + +main { + padding: 40px 20px; + max-width: 800px; + width: 100%; +} + +article { + background: #ffffff; + padding: 20px; + border-radius: 10px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); +} + +h1 { + font-size: 2.5em; + margin-bottom: 10px; +} + +h2 { + font-size: 2em; + margin-top: 30px; + margin-bottom: 10px; + border-bottom: 2px solid #003366; + padding-bottom: 5px; +} + +h3 { + font-size: 1.5em; + margin-top: 20px; +} + +p { + margin-bottom: 15px; +} + +.article-image { + width: 100%; + max-width: 600px; + border-radius: 5px; + margin: 20px 0; +} + +.References { + background: #e9ecef; + border: 1px solid #ddd; + padding: 15px; + border-radius: 10px; + margin-top: 20px; +} + + diff --git a/Lab101/Lab/static/css/cv.css b/Lab101/Lab/static/css/cv.css new file mode 100644 index 0000000..24da950 --- /dev/null +++ b/Lab101/Lab/static/css/cv.css @@ -0,0 +1,147 @@ +:root { + --primary-color: #A5B68D; + --secondary-color: #DA8359; + --background-color: #ECF0F1; + --text-color: #333; + --card-bg: #FFFFFF; +} + +body { + background-color: var(--background-color); + color: var(--text-color); + font-family: 'Arial', sans-serif; +} + +.resume-container { + max-width: 800px; + margin: auto; + padding: 20px; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); + background-color: var(--card-bg); + border-radius: 10px; +} + +header { + text-align: center; + padding: 30px 0; + background-color: var(--primary-color); + color: white; + border-radius: 10px 10px 0 0; +} + +h1 { + font-size: 36px; +} + +h2 { + font-size: 22px; +} + +.contact-info { + margin: 15px 0; +} + +.contact-info a { + color: white; + margin: 0 10px; + text-decoration: none; +} + +main { + padding: 20px 0; +} + +section { + margin-bottom: 20px; + padding: 15px; + background: var(--card-bg); + border-radius: 8px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); +} + +h3 { + font-size: 24px; + margin-bottom: 10px; + color: var(--secondary-color); +} + +.certifications { + margin: 20px 0; +} + +.certification-gallery { + display: flex; + overflow-x: auto; + scroll-snap-type: x mandatory; + padding: 10px 0; +} + +.certification-item { + flex: 0 0 auto; + width: 200px; + margin: 0 10px; + text-align: center; + scroll-snap-align: start; + transition: transform 0.3s ease; +} + +.certification-item:hover { + transform: scale(1.1); +} + +.certification-item img { + width: 100%; + height: auto; + border-radius: 8px; +} + +.certification-item p { + margin-top: 5px; + font-size: 16px; + color: var(--text-color); +} + +.notes { + position: fixed; + top: 20px; + right: 20px; + width: 300px; + padding: 15px; + background-color: var(--card-bg); + border-radius: 8px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); + transition: transform 0.3s ease; + opacity: 1; + animation: slideIn 0.5s ease forwards; +} + +@keyframes slideIn { + from { + opacity: 0; + transform: translateY(-20px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.notes:hover { + transform: scale(1.05); +} + +.note-video, +.note-image { + width: 100%; + border-radius: 5px; + margin-top: 10px; +} + +footer { + text-align: center; + padding: 30px; + background-color: var(--primary-color); + color: white; + border-radius: 0 0 10px 10px; + margin-top: 20px; +} diff --git a/Lab101/Lab/static/css/home.css b/Lab101/Lab/static/css/home.css new file mode 100644 index 0000000..f226ed1 --- /dev/null +++ b/Lab101/Lab/static/css/home.css @@ -0,0 +1,87 @@ +* { + box-sizing: border-box; +} + +@keyframes backgroundAnimation { + 0% { + background-color: #F4D9D0; + } + 50% { + background-color: #E1B7B1; + } + 100% { + background-color: #F4D9D0; + } +} + +body { + font-family: 'Arial', sans-serif; + line-height: 1.6; + background-color: #F4D9D0; + color: #333; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + align-items: center; + animation: backgroundAnimation 5s ease-in-out infinite; +} + +header { + background: #C75B7A; + color: #fff; + padding: 40px 20px; + display: flex; + justify-content: space-between; + text-align: center; + width: 100%; +} +.navigtion { + font-size: 1.1em; +} +.navigtion a { + color: #FFFFFF; + margin: 0 15px; + position: relative; + text-decoration: none; +} + +.navigtion a::after { + content: ""; + position: absolute; + left: 0; + bottom: -6px; + width: 100%; + height: 3px; + background: #FFFFFF; + border-radius: 5px; + transform: scale(0); + transition: transform .5s; +} + +.navigtion a:hover::after { + transform: scale(1); +} + +footer { + background: #C75B7A; + color: #fff; + padding: 20px 0; + text-align: center; + width: 100%; +} + +.button { + padding: 10px 20px; + background-color: #B1D690; + color: white; + border: none; + border-radius: 5px; + text-align: center; + text-decoration: none; + transition: background-color 0.3s; +} + +.button:hover { + background-color: #88C273; +} diff --git a/Lab101/Lab/static/css/pageTwo.css b/Lab101/Lab/static/css/pageTwo.css new file mode 100644 index 0000000..5249818 --- /dev/null +++ b/Lab101/Lab/static/css/pageTwo.css @@ -0,0 +1,156 @@ +* { + box-sizing: border-box; +} + +body { + font-family: 'Arial', sans-serif; + line-height: 1.6; + background-color: #F4D9D0; + color: #333; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + align-items: center; +} + +header { + background: #C75B7A; + color: #fff; + padding: 40px 20px; + text-align: center; + width: 100%; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); +} + +nav { + margin: 20px 0; +} + +nav a { + margin: 0 15px; + text-decoration: none; + color: #D9ABAB; + font-weight: bold; + transition: color 0.3s, transform 0.3s; +} + +nav a:hover { + color: #fff; + transform: scale(1.1); +} + +section { + max-width: 1000px; + width: 150%; + background: #ffffff; + padding: 30px; + margin: 20px; + border-radius: 10px; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); +} + +h2, h3 { + color: #C75B7A; + margin-top: 15px; + border-bottom: 2px solid #D9ABAB; + padding-bottom: 5px; +} + +p { + margin-bottom: 15px; +} + +button { + background: #D9ABAB; + color: #333; + border: none; + padding: 12px 20px; + cursor: pointer; + border-radius: 5px; + transition: background 0.3s, transform 0.3s, box-shadow 0.3s; +} + +button:hover { + background: #C75B7A; + transform: scale(1.05); + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); +} + +table { + width: 100%; + border-collapse: collapse; + margin: 20px 0; +} + +th, td { + padding: 15px; + border: 1px solid #ccc; + text-align: left; +} + +th { + background-color: #C75B7A; + color: #fff; + text-transform: uppercase; +} + +tr:nth-child(even) { + background-color: #f9f9f9; +} + +tr:hover { + background-color: #f1f1f1; +} + +footer { + text-align: center; + padding: 15px; + background: #D9ABAB; + color: #333; + width: 100%; + position: relative; + bottom: 0; + margin-top: auto; +} + + +.photo-gallery { + display: flex; + justify-content: space-between; + flex-wrap: wrap; +} + +.photo-card { + flex: 1 1 30%; + margin: 10px; + overflow: hidden; + position: relative; + height: 300px; + +} + +.photo-card img, +.photo-card video { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} +.photo-info { + text-align: center; + padding: 10px; + background: rgba(255, 255, 255, 0.8); +} + +.photo-info h3 { + margin: 0; + color: #C75B7A; +} + +.photo-info p { + margin: 5px 0 0; + color: #555; +} + + diff --git a/Lab101/Lab/static/images/AI.png b/Lab101/Lab/static/images/AI.png new file mode 100644 index 0000000..b547644 Binary files /dev/null and b/Lab101/Lab/static/images/AI.png differ diff --git a/Lab101/Lab/static/images/Code.png b/Lab101/Lab/static/images/Code.png new file mode 100644 index 0000000..98661ae Binary files /dev/null and b/Lab101/Lab/static/images/Code.png differ diff --git a/Lab101/Lab/static/images/Flowers.JPG b/Lab101/Lab/static/images/Flowers.JPG new file mode 100644 index 0000000..b6571b1 Binary files /dev/null and b/Lab101/Lab/static/images/Flowers.JPG differ diff --git a/Lab101/Lab/static/images/MongoDB.png b/Lab101/Lab/static/images/MongoDB.png new file mode 100644 index 0000000..e48880f Binary files /dev/null and b/Lab101/Lab/static/images/MongoDB.png differ diff --git a/Lab101/Lab/static/images/R.png b/Lab101/Lab/static/images/R.png new file mode 100644 index 0000000..843dac8 Binary files /dev/null and b/Lab101/Lab/static/images/R.png differ diff --git a/Lab101/Lab/static/images/capstone.png b/Lab101/Lab/static/images/capstone.png new file mode 100644 index 0000000..b2ae172 Binary files /dev/null and b/Lab101/Lab/static/images/capstone.png differ diff --git a/Lab101/Lab/static/images/data.png b/Lab101/Lab/static/images/data.png new file mode 100644 index 0000000..8eeb8c0 Binary files /dev/null and b/Lab101/Lab/static/images/data.png differ diff --git a/Lab101/Lab/static/images/machine.png b/Lab101/Lab/static/images/machine.png new file mode 100644 index 0000000..6d48da9 Binary files /dev/null and b/Lab101/Lab/static/images/machine.png differ diff --git a/Lab101/Lab/static/images/python.png b/Lab101/Lab/static/images/python.png new file mode 100644 index 0000000..b8981ec Binary files /dev/null and b/Lab101/Lab/static/images/python.png differ diff --git a/Lab101/Lab/static/images/star.jpeg b/Lab101/Lab/static/images/star.jpeg new file mode 100644 index 0000000..bb12db1 Binary files /dev/null and b/Lab101/Lab/static/images/star.jpeg differ diff --git a/Lab101/Lab/static/images/star2.jpeg b/Lab101/Lab/static/images/star2.jpeg new file mode 100644 index 0000000..2d586e2 Binary files /dev/null and b/Lab101/Lab/static/images/star2.jpeg differ diff --git a/Lab101/Lab/static/videos/anamel_vide.mov b/Lab101/Lab/static/videos/anamel_vide.mov new file mode 100644 index 0000000..2d9f901 Binary files /dev/null and b/Lab101/Lab/static/videos/anamel_vide.mov differ diff --git a/Lab101/Lab/static/videos/sea.MOV b/Lab101/Lab/static/videos/sea.MOV new file mode 100644 index 0000000..a05105c Binary files /dev/null and b/Lab101/Lab/static/videos/sea.MOV differ diff --git a/Lab101/Lab/static/videos/sky.mov b/Lab101/Lab/static/videos/sky.mov new file mode 100644 index 0000000..ff82977 Binary files /dev/null and b/Lab101/Lab/static/videos/sky.mov differ diff --git a/Lab101/Lab/static/videos/star.mov b/Lab101/Lab/static/videos/star.mov new file mode 100644 index 0000000..dcae108 Binary files /dev/null and b/Lab101/Lab/static/videos/star.mov differ diff --git a/Lab101/Lab/templates/Lab/ai.html b/Lab101/Lab/templates/Lab/ai.html new file mode 100644 index 0000000..111b472 --- /dev/null +++ b/Lab101/Lab/templates/Lab/ai.html @@ -0,0 +1,53 @@ + + + + + + The AI Revolution + {% load static %} + + + +
+ +

The AI Revolution

+
+ +
+
+
+

Understanding the AI Revolution

+

The AI revolution has fundamentally changed how people collect and process data, transforming business operations across various industries. At its core, AI systems rely on three major aspects: domain knowledge, data generation, and machine learning.

+ AI Image +
+ +
+

Three key attributes of AI technology.

+
Intelligent Decision Making
+

AI simulates human intelligence to quickly solve problems, learning from data to make accurate decisions while reducing human reliance.

+
Intentionality
+

Intentionality allows AI to derive insights from real-time information, reflecting the social context of its users. This sophistication sets it apart from traditional machines.

+
Adaptability and Prediction
+

Machine learning helps AI identify patterns and adapt to changes, enhancing its predictive capabilities, as demonstrated by Gmail's Smart Compose feature.

+ +
+ +
+

References:

+ +
+
+
+ + + + diff --git a/Lab101/Lab/templates/Lab/cv.html b/Lab101/Lab/templates/Lab/cv.html new file mode 100644 index 0000000..e45cb40 --- /dev/null +++ b/Lab101/Lab/templates/Lab/cv.html @@ -0,0 +1,120 @@ + + + + + + Resume of Alhanouf Aluhydan + {% load static %} + + + + +
+
+

Alhanouf Aluhydan

+

Computer Science

+ +
+ +
+
+

Profile

+

A motivated computer science graduate with a passion for software development and data analysis.

+
+ +
+

Experience

+
+

Data Science and Big Data COOP Training

+

Worked on data analysis using Python and R, utilized Tableau for data visualizations, and engaged with machine learning and big data using Apache Hadoop.

+
+
+ +
+

Education

+

Bachelor's Degree in Computer Science

+

University of Tabuk | 2018 - 2022

+
+ +
+

Technical Skills

+
    +
  • MongoDB
  • +
  • Tableau
  • +
  • C#, C++, Python
  • +
  • Data Analysis
  • +
  • Machine Learning
  • +
  • Big Data Technologies
  • +
+
+ +
+

Soft Skills

+
    +
  • Interpersonal Skills
  • +
  • Teamwork Skills
  • +
  • Quick Learner
  • +
  • Problem Solving
  • +
+
+ +
+

Interests

+
    +
  • Data Analysis
  • +
  • Data Science
  • +
+
+ +
+

Certifications

+ +
+
+ + + + +
+ + diff --git a/Lab101/Lab/templates/Lab/home.html b/Lab101/Lab/templates/Lab/home.html new file mode 100644 index 0000000..b64b4d8 --- /dev/null +++ b/Lab101/Lab/templates/Lab/home.html @@ -0,0 +1,24 @@ + + + + + + Things I Love + {% load static %} + + + + +
+

Assignment for HTML/CSS

+ +
+ + + + diff --git a/Lab101/Lab/templates/Lab/pageOne.html b/Lab101/Lab/templates/Lab/pageOne.html new file mode 100644 index 0000000..ca69caf --- /dev/null +++ b/Lab101/Lab/templates/Lab/pageOne.html @@ -0,0 +1,106 @@ + + + + + + Things I Love + {% load static %} + + +
+

Things I Love

+

Welcome to my personal page where I share the things I love!

+
+ + + +
+

My Cat

+

My cat's name is Star. She loves to play and jump around. One of her favorite activities is going for walks in the farm. She enjoys exploring the fields, sniffing the flowers, and chasing after butterflies.

+

Star is also very curious and loves to search for bugs. She spends hours pouncing on grasshoppers and inspecting every little critter she finds. Her adventurous spirit makes her a joy to watch!

+ + Star the cat + Star playing + +

Watch My Cat

+ + +

Leave a Comment:

+
+ {% csrf_token %} + + + + +
+ +

Comments:

+ + +

Return

+
+ +
+

Favorite Shows

+ + + + + + + + {% for show in favorite_shows %} + + + + + + + {% endfor %} +
TitleRatingBest EpisodeSeasons
{{ show.title }}{{ show.rating }}{{ show.best_episode }}{{ show.seasons }}
+

Return

+
+ +
+

Photography

+

While I'm not a professional photographer, I have a genuine passion for capturing beautiful moments through my lens.

+ +

Return

+
+ + diff --git a/Lab101/Lab/templates/Lab/pageTwo.html b/Lab101/Lab/templates/Lab/pageTwo.html new file mode 100644 index 0000000..ade01ee --- /dev/null +++ b/Lab101/Lab/templates/Lab/pageTwo.html @@ -0,0 +1,119 @@ + + + + + + Things I Love + {% load static %} + + + +
+

Things I Love

+

Welcome to my personal page where I share the things I love!

+
+ + + +
+

My Cat

+

My cat's name is Star. She loves to play and jump around. One of her favorite activities is going for walks on the farm. She enjoys exploring the fields, sniffing the flowers, and chasing after butterflies.

+

Star is also very curious and loves to search for bugs. She spends hours pouncing on grasshoppers and inspecting every little critter she finds. Her adventurous spirit makes her a joy to watch!

+ + + +

Leave a Comment:

+
+ {% csrf_token %} + + + + +
+ +

Comments:

+ + +

Return

+
+ +
+

Favorite Shows

+ + + + + + + + {% for show in favorite_shows %} + + + + + + + {% endfor %} +
TitleRatingBest EpisodeSeasons
{{ show.title }}{{ show.rating }}{{ show.best_episode }}{{ show.seasons }}
+

Return

+
+ +
+

Photography

+

While I'm not a professional photographer, I have a genuine passion for capturing beautiful moments through my lens.

+ +

Return

+
+ + + diff --git a/Lab101/Lab/tests.py b/Lab101/Lab/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/Lab101/Lab/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/Lab101/Lab/urls.py b/Lab101/Lab/urls.py new file mode 100644 index 0000000..57ee626 --- /dev/null +++ b/Lab101/Lab/urls.py @@ -0,0 +1,12 @@ +from django.urls import path +from . import views + +app_name = "Lab" + +urlpatterns = [ + path("", views.home_view, name= "home_view"), + path("html/introduction/", views.thingsIlove_view, name="thingsIlove_view"), + path("css/introduction/", views.thingsIlove_styled_view, name="thingsIlove_styled_view"), + path("article/ai/", views.ai_veiw, name="ai_veiw"), + path("careers/cv/",views.cv_veiw, name="cv_veiw"), +] diff --git a/Lab101/Lab/views.py b/Lab101/Lab/views.py new file mode 100644 index 0000000..0b633d6 --- /dev/null +++ b/Lab101/Lab/views.py @@ -0,0 +1,63 @@ +import os +from django.shortcuts import render +from django.http import HttpRequest + +def home_view(request: HttpRequest): + return render(request, "Lab/home.html") + +def save_comments_to_file(comments): + file_path = 'comments.txt' + with open(file_path, 'a') as file: + for comment in comments: + file.write(f"{comment['username']},{comment['email']},{comment['comment']}\n") + +def load_comments_from_file(): + comments = [] + file_path = 'comments.txt' + if os.path.exists(file_path): + with open(file_path, 'r') as file: + for line in file: + username, email, comment = line.strip().split(',') + comments.append({'username': username, 'email': email, 'comment': comment}) + return comments + +def get_context(request: HttpRequest): + comments = load_comments_from_file() + + if request.method == "POST": + username = request.POST.get('username') + email = request.POST.get('email') + comment = request.POST.get('comment') + + if username and email and comment: + comments.append({'username': username, 'email': email, 'comment': comment}) + save_comments_to_file(comments) + + favorite_shows = [ + {"title": "Dark", "rating": 8.7, "best_episode": "The Paradise", "seasons": 3}, + {"title": "The Last Kingdom", "rating": 8.5, "best_episode": "Season 3 Episode 8", "seasons": 6}, + {"title": "Vikings", "rating": 8.5, "best_episode": "All His Angels", "seasons": 6}, + {"title": "The Office", "rating": 9.0, "best_episode": "Dinner Party", "seasons": 9}, + {"title": "Brooklyn Nine-Nine", "rating": 8.4, "best_episode": "The Chopper", "seasons": 8}, + ] + + return { + 'comments': comments, + 'favorite_shows': favorite_shows + } + +def thingsIlove_view(request: HttpRequest): + context = get_context(request) + return render(request, "Lab/pageOne.html", context) + +def thingsIlove_styled_view(request: HttpRequest): + context = get_context(request) + return render(request, "Lab/pageTwo.html", context) + +def ai_veiw(request: HttpRequest): + + return render(request, "Lab/ai.html") + +def cv_veiw(request: HttpRequest): + + return render(request, "Lab/cv.html") \ No newline at end of file diff --git a/Lab101/Lab101/__init__.py b/Lab101/Lab101/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Lab101/Lab101/asgi.py b/Lab101/Lab101/asgi.py new file mode 100644 index 0000000..539c2ec --- /dev/null +++ b/Lab101/Lab101/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for Lab101 project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Lab101.settings') + +application = get_asgi_application() diff --git a/Lab101/Lab101/settings.py b/Lab101/Lab101/settings.py new file mode 100644 index 0000000..aaed879 --- /dev/null +++ b/Lab101/Lab101/settings.py @@ -0,0 +1,124 @@ +""" +Django settings for Lab101 project. + +Generated by 'django-admin startproject' using Django 5.1.2. + +For more information on this file, see +https://docs.djangoproject.com/en/5.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/5.1/ref/settings/ +""" + +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/5.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure---4ghidqq+mfqaa-4nq2j*r(!l-b_u+(x^^6raqq)w09ynwkp^' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'Lab' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'Lab101.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'Lab101.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/5.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/5.1/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/5.1/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/Lab101/Lab101/urls.py b/Lab101/Lab101/urls.py new file mode 100644 index 0000000..a4c249e --- /dev/null +++ b/Lab101/Lab101/urls.py @@ -0,0 +1,23 @@ +""" +URL configuration for Lab101 project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/5.1/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +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.contrib import admin +from django.urls import path ,include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', include('Lab.urls')) +] diff --git a/Lab101/Lab101/wsgi.py b/Lab101/Lab101/wsgi.py new file mode 100644 index 0000000..84f9fa2 --- /dev/null +++ b/Lab101/Lab101/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for Lab101 project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Lab101.settings') + +application = get_wsgi_application() diff --git a/Lab101/comments.txt b/Lab101/comments.txt new file mode 100644 index 0000000..7c5ec57 --- /dev/null +++ b/Lab101/comments.txt @@ -0,0 +1 @@ +alhanouf,alhanouf@gmail.com,cute !! diff --git a/Lab101/manage.py b/Lab101/manage.py new file mode 100755 index 0000000..894f7ed --- /dev/null +++ b/Lab101/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Lab101.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main()