Skip to content

Commit

Permalink
new commit
Browse files Browse the repository at this point in the history
  • Loading branch information
khamed committed Jun 14, 2024
1 parent b9b316d commit 1f6be4d
Show file tree
Hide file tree
Showing 37 changed files with 1,044 additions and 0 deletions.
Empty file added base/__init__.py
Empty file.
Binary file added base/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added base/__pycache__/admin.cpython-310.pyc
Binary file not shown.
Binary file added base/__pycache__/apps.cpython-310.pyc
Binary file not shown.
Binary file added base/__pycache__/models.cpython-310.pyc
Binary file not shown.
Binary file added base/__pycache__/urls.cpython-310.pyc
Binary file not shown.
Binary file added base/__pycache__/views.cpython-310.pyc
Binary file not shown.
7 changes: 7 additions & 0 deletions base/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.contrib import admin

from .models import *


admin.site.register(VideoPrs)

6 changes: 6 additions & 0 deletions base/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class BaseConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'base'
23 changes: 23 additions & 0 deletions base/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.0.6 on 2024-06-12 19:42

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='VideoPrs',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('file_base', models.FileField(upload_to='video/')),
('file_pres', models.FileField(upload_to='results/')),
('file_cvs', models.FileField(upload_to='csv')),
],
),
]
Empty file added base/migrations/__init__.py
Empty file.
Binary file not shown.
Binary file added base/migrations/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
15 changes: 15 additions & 0 deletions base/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from django.db import models



class VideoPrs(models.Model) :
file_base = models.FileField(upload_to="video/")
file_pres = models.FileField(upload_to="results/")
file_cvs = models.FileField(upload_to="csvs")

def delete(self ,*args, **kwargs) :
self.file_base.delete(save=False)
self.file_pres.delete(save=False)
self.file_cvs.delete(save=False)
super().delete(*args, **kwargs)

17 changes: 17 additions & 0 deletions base/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 - Page Not Found</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-gray-100 flex items-center justify-center h-screen">
<div class="text-center">
<h1 class="text-6xl font-bold text-gray-800 mb-4">404</h1>
<p class="text-2xl text-gray-600 mb-8">Oops! Page Not Found Or No Data found</p>
<p class="text-lg text-gray-600 mb-8">We can't seem to find the page you're looking for.</p>
<a href="/" class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-700">Go Home</a>
</div>
</body>
</html>
87 changes: 87 additions & 0 deletions base/templates/contact.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Page</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet">
<style>
.navbar-item.active {
background-color: #007bff;
color: white;
}
</style>
</head>
<body class="bg-gray-100 flex flex-col min-h-screen">
<!-- Navbar -->
<nav class="bg-gray-800 p-4 text-white w-full">
<div class="container mx-auto flex justify-between items-center">
<!-- Logo -->
<a href="login.html" id="navbar-logo" class="flex items-center ">
<span class="text-lg font-bold">ASPR</span>
</a>
<div>
<a href="{% url "home" %}" class="navbar-item px-3 py-2 hover:bg-gray-700 rounded ">Home</a>
<a href="#" class="navbar-item px-3 py-2 hover:bg-gray-700 rounded">Upload</a>
<a href="{% url "test" %}" class="navbar-item px-3 py-2 hover:bg-gray-700 rounded">Test</a>
<a href="{% url "contact" %}" class="navbar-item px-3 py-2 hover:bg-gray-700 rounded active">Contact</a>
<a href="#" class="navbar-item px-3 py-2 hover:bg-indigo-700 bg-green-500 rounded">Login</a></div>
</div>
</nav>


<div class="flex flex-col items-center justify-center p-8 container mx-auto flex-grow">
<div class="flex flex-wrap md:flex-nowrap items-center w-full">
<!-- Contact form -->
<div class="bg-white p-8 rounded-lg shadow-lg w-full md:w-1/2 lg:w-2/5">

<h2 class="text-2xl font-bold mb-6 text-gray-800 text-center">Contact Us</h2>
<form action="#" method="POST">
<div class="mb-4">
<label for="name" class="block text-gray-700">Name</label>
<input type="text" id="name" name="name" class="w-full px-3 py-2 border rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-600" required>
</div>
<div class="mb-4">
<label for="email" class="block text-gray-700">Email</label>
<input type="email" id="email" name="email" class="w-full px-3 py-2 border rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-600" required>
</div>
<div class="mb-6">
<label for="message" class="block text-gray-700">Message</label>
<textarea id="message" name="message" class="w-full px-3 py-2 border rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-600" rows="5" required></textarea>
</div>
<div class="flex items-center justify-between">
<button type="submit" class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-700">Send Message</button>
</div>
</form>
</div>
<!-- Photo next to form -->
<div class="w-full md:w-1/2 lg:w-3/5 mt-6 md:mt-0 md:ml-6 flex justify-center">
<img src="{% static "img/Online%20tech%20talks-rafiki.svg" %}" alt="Contact Us Photo" class="rounded-lg">
</div>
</div>
</div>

<!-- Footer -->
<footer class="bg-gray-800 text-white py-4">
<div class="container mx-auto text-center">
&copy; 2024 Brand. All rights reserved.
</div>
</footer>

<!-- Tailwind CSS and JavaScript -->
<script>
function activateNavbarItem() {
const navbarItems = document.querySelectorAll('.navbar-item');
navbarItems.forEach(item => {
item.addEventListener('click', function() {
navbarItems.forEach(nav => nav.classList.remove('active'));
this.classList.add('active');
});
});
}

activateNavbarItem();
</script>
</body>
</html>
Loading

0 comments on commit 1f6be4d

Please sign in to comment.