{"id":20469051,"url":"https://github.com/ghosts6/ticketsystem","last_synced_at":"2025-10-10T04:05:15.319Z","repository":{"id":217331520,"uuid":"742793734","full_name":"Ghosts6/TicketSystem","owner":"Ghosts6","description":"This repository contains the source code for a ticketing system developed using Django. The project was designed to help teams efficiently manage their time and streamline the handling of client requests.","archived":false,"fork":false,"pushed_at":"2024-09-27T17:29:06.000Z","size":36526,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T13:20:24.285Z","etag":null,"topics":["bash","django-orm","django-rest-framework","html-css-javascript","postgresql","ticketing-system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ghosts6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-13T11:43:15.000Z","updated_at":"2024-09-27T17:29:09.000Z","dependencies_parsed_at":"2024-01-19T12:38:31.649Z","dependency_job_id":"268e605b-b8d9-4969-9b79-f5ff1b49d591","html_url":"https://github.com/Ghosts6/TicketSystem","commit_stats":null,"previous_names":["ghosts6/local-website","ghosts6/ticketsystem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ghosts6/TicketSystem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghosts6%2FTicketSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghosts6%2FTicketSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghosts6%2FTicketSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghosts6%2FTicketSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ghosts6","download_url":"https://codeload.github.com/Ghosts6/TicketSystem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghosts6%2FTicketSystem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002678,"owners_count":26083440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","django-orm","django-rest-framework","html-css-javascript","postgresql","ticketing-system"],"created_at":"2024-11-15T14:07:45.913Z","updated_at":"2025-10-10T04:05:15.297Z","avatar_url":"https://github.com/Ghosts6.png","language":"Python","readme":"![baner](https://github.com/Ghosts6/Local-website/blob/main/img/Baner.png)\n\n# 💻Ticket-website:\n\nHere is the source code for my web project, a ticket system built with Django, DRF, ORM, and frontend technologies like HTML, CSS, and JavaScript. The system allows clients to create ticket requests for the IT team, who can receive and respond to them efficiently.\n\n🚨 Hint: For security and privacy reasons, I've made alterations to the code. For instance, certain functions like hashing and login different from the actual project. Additionally, I've replaced the company name, logo, and contact information in this representation to maintain confidentiality.\n\n[project.webm](https://github.com/Ghosts6/Local-website/assets/95994481/46b243b6-2994-43fd-8d4b-d0243a62ef08)\n\n\n# ℹ️Directory Structure:\nThis project is structured into two components: the web part (myTicket_v2) focuses on configuring project settings and assets, while the web application part (Ticket) is dedicated to page creation, path configuration, and associated views\n```bash\n|____myTicket_v2\n| |______pycache__\n| |____Template\n| |____Static\n| | |____js\n| | |____LineAwsome\n| | | |____scss\n| | | |____svg\n| | | |____css\n| | | |____fonts\n| | |____css\n| | |____img\n| | | |____favicon\n|____Ticket\n| |______pycache__\n| |____migrations\n| | |______pycache__\n|____staticfiles\n| |____js\n| |____LineAwsome\n| | |____scss\n| | |____svg\n| | |____css\n| | |____fonts\n| |____css\n| |____admin\n| | |____js\n| | | |____vendor\n| | | | |____jquery\n| | | | |____xregexp\n| | | | |____select2\n| | | | | |____i18n\n| | | |____admin\n| | |____css\n| | | |____vendor\n| | | | |____select2\n| | |____img\n| | | |____gis\n| |____img\n| | |____favicon\n| |____favicon\n|____fixture\n```\n\n# 👨‍💻Technology:\nI created this project using MySQL and PostgreSQL for the database, hosted on a Linux server within a  network, designed the interface with Figma and Canva, implemented the frontend with HTML, CSS, and JS, and developed the backend using Django and Python\n![Python](https://img.shields.io/badge/python-3670A0?style=plastic\u0026logo=python\u0026logoColor=ffdd54) ![Django](https://img.shields.io/badge/django-%23092E20.svg?style=plastic\u0026logo=django\u0026logoColor=white)![Flask](https://img.shields.io/badge/flask-%23000.svg?style=plastic\u0026logo=flask\u0026logoColor=white) ![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=plastic\u0026logo=javascript\u0026logoColor=%23F7DF1E)\n ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=plastic\u0026logo=html5\u0026logoColor=white) ![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=plastic\u0026logo=css3\u0026logoColor=white) ![MySQL](https://img.shields.io/badge/mysql-4479A1?style=plastic\u0026logo=mysql\u0026logoColor=white) ![PostgreSQL](https://img.shields.io/badge/postgresql-336791?style=plastic\u0026logo=postgresql\u0026logoColor=white) ![Linux](https://img.shields.io/badge/linux-FCC624?style=plastic\u0026logo=linux\u0026logoColor=black)\n ![Bash](https://img.shields.io/badge/bash-4EAA25?style=plastic\u0026logo=gnu-bash\u0026logoColor=white)\n\n\n\n# Bash:\nHere we have bash file i created to manage project inside linux host,with this files IT team can easily made action like start and stop service and etc...\n```bash\n#! /bin/bash\n\n# This bash file are created to help admin with management of webapplication \n# and it include file like start.sh stop.sh collect.sh and etc for manage service inside linux server host\n# Hint! to use this files at first we need make them excuyeable :\n# chmod +x file_name.sh\n\n#-----------------------------------------   start.sh   ----------------------------------------------------------\n# bash file to start services:   ./start.sh\necho \"applying migrations\"\npython3 manage.py makemigrations\npython3 manage.py migrate\n\necho \"starting project.....\"\npython3 manage.py runserver 0.0.0.0:8000\n#-----------------------------------------    stop.sh   ----------------------------------------------------------\n# bash file to stop services:   ./stop.sh\necho \"Stopping project...\"\nkill $(lsof -t -i:8000)\n#-----------------------------------------   collect.sh  ----------------------------------------------------------\n# bash file for collecting static file: ./collect.sh\necho \"Collecting static files ...\"\npython3 manage.py  collectstatic --noinput\n#-----------------------------------------     log.sh    ----------------------------------------------------------\n# bash file to return project logs: ./log.sh\necho \"Display logs.... \"\ntail -n 50 myTicket_v2/logs/error.log\n#----------------------------------------- custome_log.sh ----------------------------------------------------------\n# bash file to return custome log i create inside setting.py : ./costume_log.sh\necho \"setting.py custome log\"\n\ntail -n 50 myTicket_v2/mysitelog.txt\n```\n\n\n# Code-sample:\nLogin Page:\n\n[login.webm](https://github.com/Ghosts6/-website/assets/95994481/ae6b7eca-941c-4482-9bd0-376e2fa0d3a9)\n\n\n```html\n{%load static %}\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003cmeta charset=\"UTF-8\"\u003e\n  \u003clink rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"{% static 'img/favicon/favicon-32x32.png'%}\"\u003e\n  \u003clink rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"{% static 'img/favicon/favicon-16x16.png'%}\"\u003e\n  \u003clink rel=\"manifest\" href=\"/site.webmanifest\"\u003e\n  \u003clink rel=\"mask-icon\" href=\"/safari-pinned-tab.svg\" color=\"#5bbad5\"\u003e\n  \u003clink href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css\" rel=\"stylesheet\"\u003e\n  \u003clink href=\"{% static 'css/login.css' %}\" rel=\"stylesheet\"\u003e \n  \u003cmeta name=\"msapplication-TileColor\" content=\"#da532c\"\u003e\n  \u003cmeta name=\"theme-color\" content=\"#ffffff\"\u003e\n\u003ctitle\u003eLogin page\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\n\u003ca href=\"https://kiarashbashokian.com\" target=\"_blank\"\u003e\n  \u003cimg src=\"{% static 'img/Untitled-removebg-preview.png' %}\" alt=\"Your Logo\" class=\"logo\"\u003e\n\u003c/a\u003e\n\n\u003cdiv class=\"phone-icon\" id=\"phoneIcon\"\u003e\n    \u003ci class=\"fa-solid fa-phone icon\"\u003e\u003c/i\u003e\n    \u003cspan class=\"tooltip\" id=\"tooltip\"\u003eTelephone: num1 - num2 - num3\u003c/span\u003e\n\u003c/div\u003e\n\n\u003cdiv class=\"clock\" id=\"clock\"\u003e\n    \u003cspan class=\"clockMessage\" id=\"clockMessage\"\u003eIran Time Zone (GMT +3:30 hours)\u003c/span\u003e\n\u003c/div\u003e\n\n\u003cdiv id=\"particles-js\"\u003e\u003c/div\u003e\n\n\u003cform action=\"{% url 'login' %}\" method=\"post\"\u003e\n  {% csrf_token %}\n  \n  \u003cdiv class=\"login-container\"\u003e\n    \u003cdiv class=\"login-form\"\u003e\n      \u003cdiv class=\"input-container\"\u003e\n        \u003cinput type=\"text\" id=\"username\" name=\"username\" placeholder=\"Username\"\u003e\n      \u003c/div\u003e\n\n      \u003cdiv class=\"input-container\"\u003e\n        \u003cinput type=\"password\" id=\"password\" name=\"password\" placeholder=\"Password\"\u003e\n        \u003ci class=\"far fa-eye\" onclick=\"togglePassword()\"\u003e\u003c/i\u003e\n      \u003c/div\u003e\n\n      \u003cbutton id=\"loginButton\" type=\"submit\"\u003eLogin\u003c/button\u003e\n      \u003cp id=\"errorMessage\" style=\"display: none; color: red;\"\u003eIncorrect password or username\u003c/p\u003e\n      \u003cspan id=\"errorMessage\" style=\"display: none; color: red;\"\u003e\u003c/span\u003e\n              {% if error %}\n        \u003cp style=\"color: red;\"\u003e{{ error }}\u003c/p\u003e\n      \n      {% endif %}\n      \n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/form\u003e\n\n\u003cscript src=\"https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"{% static 'js/login.js' %}\"\u003e\u003c/script\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n```\n```css\nbody {\n  margin: 0;\n  padding: 0;\n  background-image: url('/static/img/Backgroundpic.png');\n  background-size: cover;\n  background-repeat: no-repeat;\n  background-attachment: fixed;\n  font-family: Arial, sans-serif;\n}\n.phone-icon {\n  position: fixed;\n  bottom: 20px;\n  left: 20px;\n  cursor: pointer;\n}\n\n.icon {\n  font-size: 60px;\n}\n\n.logo {\n  position: fixed;\n  top: 20px;\n  left: 20px;\n  width: 60px;\n  height: auto; \n}\n.tooltip {\n  display: none;\n  position: absolute;\n  background-color: rgba(0, 0, 0, 0.8);\n  color: white;\n  padding: 5px;\n  border-radius: 5px;\n  top: -70px;\n  left: 50%; \n  transform: translateX(-50%);\n}\n\n.clock {\n  position: fixed;\n  top: 20px;\n  right: 20px;\n  font-size: 24px;\n  color: white;\n  cursor: pointer;\n}\n\n.clockMessage {\n  display: none;\n  position: absolute;\n  background-color: rgba(0, 0, 0, 0.8);\n  color: white;\n  padding: 5px;\n  border-radius: 5px;\n  top: 30px;\n  right: -150px; \n  width: 200px; \n  text-align: center;\n}\n\n.clock:hover .clockMessage {\n  display: block;\n}\n\n.login-container {\n  height: 100vh;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.login-form {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.input-container {\n  margin-bottom: 20px;\n  display: flex;\n  align-items: center;\n}\n\ninput[type=\"text\"],\ninput[type=\"password\"] {\n  padding: 25px 20px;\n  border-radius: 30px; \n  border: 1px solid #ccc;\n  font-size: 18px;\n  width: 500px;\n}\n\ninput[type=\"text\"]:focus,\ninput[type=\"password\"]:focus {\n  outline: none;\n  border-color: #007bff;\n}\n\n.input-container {\n  position: relative;\n  margin-bottom: 40px;\n}\n\n#password {\n  padding-right: 35px; \n}\n\n#password:focus + i {\n  color: #007bff; \n}\n\n.fa-eye {\n  position: absolute;\n  right: 10px;\n  top: 50%;\n  transform: translateY(-50%);\n  cursor: pointer;\n  color: #999;\n}\n\n#loginButton {\n  padding: 25px 30px;\n  background-image: linear-gradient(90deg, #0097b2, #7ed957);\n  color: var(--black-color);\n  border: none;\n  border-radius: 30px;\n  font-size: 20px;\n  font-weight: bold; \n  width : 555px;\n  cursor: pointer;\n  transition: background-image 0.3s ease; \n}\n\n#loginButton:hover {\n\n  background-image: linear-gradient(90deg, #006f84, #5ca742); \n}\n\n#particles-js {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  z-index: -1; \n}\n\n.logo,\n.phone-icon,\n.clock,\n.login-container {\n  z-index: 1;\n}\n```\n```js\nfunction updateClock() {\n  const clock = document.getElementById('clock');\n  const iranTime = new Date().toeString('en-US', { timeZone: 'Asia/Tehran', hour12: false });\n  clock.textContent = iranTime.slice(-8);\n}\n\nsetInterval(updateClock, 1000);\n\nconst clockElement = document.getElementById('clock');\nconst clockMessage = document.getElementById('clockMessage');\nlet clickCount = 0;\n\nif (clockElement \u0026\u0026 clockMessage) {\n  clockElement.addEventListener('mouseenter', function() {\n    clockMessage.style.display = 'block';\n  });\n\n  clockElement.addEventListener('mouseleave', function() {\n    clockMessage.style.display = 'none';\n  });\n\n  clockElement.addEventListener('click', function() {\n    clickCount++;\n    if (clickCount \u003e= 5) {\n      alert(clockMessage.textContent);\n      clickCount = 0;\n    }\n  });\n} else {\n  console.error(\"Clock message element not found\");\n}\n\ndocument.getElementById('phoneIcon').addEventListener('click', function() {\n  const tooltip = document.getElementById('tooltip');\n  tooltip.style.display = tooltip.style.display === 'block' ? 'none' : 'block';\n});\n\nfunction togglePassword() {\n  const passwordField = document.getElementById('password');\n\n  if (passwordField.type === 'password') {\n    passwordField.type = 'text';\n  } else {\n    passwordField.type = 'password';\n  }\n}\n\nfunction togglePassword() {\n  const passwordField = document.getElementById('password');\n\n  if (passwordField.type === 'password') {\n    passwordField.type = 'text';\n  } else {\n    passwordField.type = 'password';\n  }\n}\n\nconst errorMessage = document.getElementById('errorMessage');\n\nfunction displayErrorMessage(message) {\n    errorMessage.textContent = message;\n    errorMessage.style.display = 'block';\n}\n\ndocument.getElementById('loginButton').addEventListener('click', function(event) {\n    event.preventDefault(); \n\n    const username = document.getElementById('username').value;\n    const password = document.getElementById('password').value;\n\n    if (!username || !password) {\n        displayErrorMessage('Fill in all the necessary data');\n        return;\n    }\n\n    event.currentTarget.closest('form').submit();\n});\n\n// Add Particle.js initialization\nparticlesJS(\"particles-js\", {\n  particles: {\n    number: { value: 80, density: { enable: true, value_area: 800 } },\n    color: { value: \"#ffffff\" },\n    shape: { type: \"circle\", stroke: { width: 0, color: \"#000000\" }, polygon: { nb_sides: 5 }, image: { src: \"img/github.svg\", width: 100, height: 100 } },\n    opacity: { value: 0.5, random: false, anim: { enable: false, speed: 1, opacity_min: 0.1, sync: false } },\n    size: { value: 3, random: true, anim: { enable: false, speed: 40, size_min: 0.1, sync: false } },\n    line_linked: { enable: true, distance: 150, color: \"#ffffff\", opacity: 0.4, width: 1 },\n    move: { enable: true, speed: 6, direction: \"none\", random: false, straight: false, out_mode: \"out\", bounce: false, attract: { enable: false, rotateX: 600, rotateY: 1200 } },\n  },\n  interactivity: {\n    detect_on: \"canvas\",\n    events: { onhover: { enable: true, mode: \"repulse\" }, onclick: { enable: true, mode: \"push\" }, resize: true },\n    modes: { grab: { distance: 400, line_linked: { opacity: 1 } }, bubble: { distance: 400, size: 40, duration: 2, opacity: 8, speed: 3 }, repulse: { distance: 200, duration: 0.4 }, push: { particles_nb: 4 }, remove: { particles_nb: 2 } },\n  },\n  retina_detect: true,\n});\n```\n```python\ndef user_login(request):\n    error_message = None\n    \n    if request.method == 'POST':\n        username = request.POST.get('username')\n        password = request.POST.get('password')\n\n        if not username or not password:\n            error_message = 'Fill in all the necessary data'\n        else:\n            user = authenticate(request, username=username, password=password)\n\n            if user is not None:\n                login(request, user)\n                if user.is_superuser:\n                    return redirect('admin:index')\n                else:\n                    return redirect('main')\n            else:\n                try:\n                    failed_login_user = User.objects.get(username=username)\n                    failed_login_user.profile.failed_login_attempts += 1\n                    failed_login_user.profile.last_login_attempt = timezone.now()\n                    failed_login_user.profile.save()\n\n                    if failed_login_user.profile.failed_login_attempts \u003e 10:\n                        lock_time = failed_login_user.profile.last_login_attempt + timedelta(minutes=5)\n                        if timezone.now() \u003c lock_time:\n                            return render(request, 'locked.html')\n                        else:\n                            failed_login_user.profile.failed_login_attempts = 0\n                            failed_login_user.profile.save()\n                except User.DoesNotExist:\n                    pass  \n                \n                error_message = 'Incorrect password or username'\n\n    return render(request, 'login.html', {'error': error_message})\n```\nMain Page:\n\n[main.webm](https://github.com/Ghosts6/-website/assets/95994481/e10e6b96-1475-4990-8974-df26c461abe7)\n\n\n```html\n{% load static %}\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003cmeta charset=\"UTF-8\"\u003e\n  \u003clink rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"{% static 'img/favicon/favicon-32x32.png'%}\"\u003e\n  \u003clink rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"{% static 'img/favicon/favicon-16x16.png'%}\"\u003e\n  \u003clink rel=\"manifest\" href=\"/site.webmanifest\"\u003e\n  \u003clink rel=\"mask-icon\" href=\"/safari-pinned-tab.svg\" color=\"#5bbad5\"\u003e\n  \u003clink href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css\" rel=\"stylesheet\"\u003e\n  \u003clink rel= \"stylesheet\" href= \"{% static 'LineAwsome/css/line-awesome.min.css' %}\" \u003e\n  \u003clink href=\"{% static 'css/main.css' %}\" rel=\"stylesheet\"\u003e \n  \u003cmeta name=\"msapplication-TileColor\" content=\"#da532c\"\u003e\n  \u003cmeta name=\"theme-color\" content=\"#ffffff\"\u003e\n\u003ctitle\u003eMain page\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\n\u003ca href=\"https://kiarashbashokian.com\" target=\"_blank\"\u003e\n  \u003cimg src=\"{% static 'img/Untitled-removebg-preview.png' %}\" alt=\"Your Logo\" class=\"logo\"\u003e\n\u003c/a\u003e\n\n\u003cdiv class=\"phone-icon\" id=\"phoneIcon\"\u003e\n    \u003ci class=\"fa-solid fa-phone icon\"\u003e\u003c/i\u003e\n    \u003cspan class=\"tooltip\" id=\"tooltip\"\u003eTelephone: num1 - num2 - num3\u003c/span\u003e\n\u003c/div\u003e\n\n\u003cdiv class=\"clock\" id=\"clock\"\u003e\n    \u003cspan class=\"clockMessage\" id=\"clockMessage\"\u003eIran Time Zone (GMT +3:30 hours)\u003c/span\u003e\n\u003c/div\u003e\n\n   \u003cdiv class=\"main-container\"\u003e\n    \u003cdiv class=\"form-container\"\u003e\n      \u003cform action=\"{% url 'main' %}\" method=\"post\" enctype=\"multipart/form-data\"\u003e\n        \u003cdiv class=\"input-container\"\u003e\n          \u003clabel for=\"name\"\u003eName:\u003c/label\u003e\n          \u003cinput type=\"text\" id=\"name\" name=\"name\" placeholder=\"Enter your name\"\u003e\n        \u003c/div\u003e\n\n        \u003cdiv class=\"input-container\"\u003e\n              \u003clabel for=\"last_name\"\u003eLast Name:\u003c/label\u003e\n              \u003cinput type=\"text\" id=\"last_name\" name=\"last_name\" placeholder=\"Enter your last name\"\u003e\n        \u003c/div\u003e\n\n        \u003cdiv class=\"input-container\"\u003e\n               \u003clabel for=\"department_name\"\u003eDepartment Name:\u003c/label\u003e\n               \u003cinput type=\"text\" id=\"department_name\" name=\"department_name\" placeholder=\"Enter your department name\"\u003e\n        \u003c/div\u003e\n        \n        \u003cdiv class=\"input-container\"\u003e\n          \u003clabel for=\"request_type\"\u003eRequest Type:\u003c/label\u003e\n          \u003cselect id=\"request_type\" name=\"request_type\" class=\"request-type-select\"\u003e\n          \u003coption value=\"\" selected disabled\u003eSelect type of request\u003c/option\u003e\n          \u003coption value=\"hardwareissue\"\u003eHardware Issue\u003c/option\u003e\n          \u003coption value=\"softwareissue\"\u003eSoftware Issue\u003c/option\u003e\n          \u003coption value=\"update\u0026upgrade\"\u003eUpdate \u0026 Upgrade\u003c/option\u003e\n          \u003coption value=\"boost\"\u003eBoost\u003c/option\u003e\n          \u003coption value=\"repair\"\u003eRepair\u003c/option\u003e\n          \u003coption value=\"installprogram\"\u003eInstall Program\u003c/option\u003e\n        \u003c/select\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"input-container\"\u003e\n    \u003clabel for=\"attachment\" id=\"attachLabel\"\u003e\n      \u003ci class=\"las la-paperclip\" id=\"attachIcon\"\u003e\u003c/i\u003e Attach file\n    \u003c/label\u003e\n    \u003cinput type=\"file\" id=\"attachment\" name=\"attachment\" style=\"display: none;\"\u003e\n      \u003c/div\u003e \n        \u003cdiv class=\"input-container\"\u003e\n             \u003clabel for=\"description\"\u003eDescription:\u003c/label\u003e\n             \u003ctextarea id=\"description\" name=\"description\" class=\"description-textarea\" placeholder=\"Enter description\"\u003e\u003c/textarea\u003e\n        \u003c/div\u003e\n\n        \u003c!-- CSRF token field (hidden) --\u003e\n        \u003cspan class=\"csrf-field\"\u003e{% csrf_token %}\u003c/span\u003e\n        \u003cbutton id=\"submitButton\" type=\"submit\"\u003eSubmit\u003c/button\u003e\n        \u003ca href=\"{% url 'status' %}\" class=\"ticket-history-button\"\u003eTicket History\u003c/a\u003e\n        \u003cspan id=\"errorMessage\" style=\"display: none; color: red;\"\u003e\u003c/span\u003e\n      \u003c/form\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\n\n\u003cscript src=\"{% static 'js/main.js' %}\"\u003e\u003c/script\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n```\n```css\nbody {\n  margin: 0;\n  padding: 0;\n  background-image: url('/static/img/Backgroundpic.png'); \n  background-size: cover;\n  background-repeat: no-repeat;\n  background-attachment: fixed;\n  font-family: Arial, sans-serif;\n}\n.phone-icon {\n  position: fixed;\n  bottom: 20px;\n  left: 20px;\n  cursor: pointer;\n}\n\n.icon {\n  font-size: 60px; \n}\n\n.logo {\n  position: fixed;\n  top: 20px;\n  left: 20px;\n  width: 60px;\n  height: auto; \n}\n.tooltip {\n  display: none;\n  position: absolute;\n  background-color: rgba(0, 0, 0, 0.8);\n  color: white;\n  padding: 5px;\n  border-radius: 5px;\n  top: -70px;\n  left: 50%; \n  transform: translateX(-50%);\n}\n\n.clock {\n  position: fixed;\n  top: 20px;\n  right: 20px;\n  font-size: 24px;\n  color: white;\n  cursor: pointer;\n}\n\n.clockMessage {\n  display: none;\n  position: absolute;\n  background-color: rgba(0, 0, 0, 0.8);\n  color: white;\n  padding: 5px;\n  border-radius: 5px;\n  top: 30px;\n  right: -150px; \n  width: 200px; \n  text-align: center;\n}\n\n.clock:hover .clockMessage {\n  display: block;\n}\n.main-container {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 100vh;\n  margin: 30px;\n}\n\n.form-container form {\n  padding: 0;\n  border: none; \n  margin: 30px;\n}\n\n.input-container {\n  margin-bottom: 15px;\n  display: flex;\n  flex-direction: column;\n  position: relative; \n}\n\n.input-container label {\n  margin-bottom: 5px;\n  font-weight: bold;\n  color: black;\n}\n\n.input-container input[type=\"text\"],\n.input-container select,\n.input-container textarea {\n  padding: 10px;\n  border: 1px solid #ccc;\n  border-radius: 30px; \n  font-size: 18px;\n  width: 500px;\n}\n\n.description-textarea {\n  padding: 10px;\n  border: 1px solid #ccc;\n  border-radius: 30px;\n  font-size: 18px;\n  width: 500px;\n  height: 150px; \n}\n\n.csrf-field {\n  display: none;\n}\n\n#submitButton {\n  height: 40px!important;\n  line-height: 10px;\n  padding: 25px 30px;\n  background-image: linear-gradient(90deg, #0097b2, #7ed957);\n  color: var(--black-color);\n  border: none;\n  border-radius: 30px;\n  font-size: 20px;\n  font-weight: bold;\n  width: 555px;\n  cursor: pointer;\n  transition: background-image 0.3s ease;\n}\n\n#submitButton:hover {\n  background-image: linear-gradient(90deg, #006f84, #5ca742);\n}\n#errorMessage {\n  display: none;\n  text-align: center;\n  margin-top: 10px;\n  color: red;\n  font-weight: bold;\n}\n\n#attachLabel {\n  cursor: pointer;\n  padding: 10px 20px;\n  background-color: #fff;\n  border-radius: 30px;\n  border: 2px solid #ccc;\n  height: auto;\n  width: 470px; \n  display: flex;\n  align-items: center;\n}\n\n#attachIcon {\n  font-size: 24px;\n  margin-right: 1px;\n}\n\n#attachIcon,\n.attach-text {\n  cursor: pointer;\n}\n\n#attachLabel:hover {\n  border-color: #0097b2;\n}\n\n.ticket-history-button {\n  margin-top: 10px; \n  padding: 5px;\n  height: 40px !important;\n  line-height: 40px;\n  background-image: linear-gradient(90deg, #0097b2, #7ed957);\n  color: var(--black-color);\n  border: none;\n  border-radius: 30px;\n  font-size: 16px;\n  font-weight: bold;\n  cursor: pointer;\n  transition: background-image 0.3s ease;\n  text-align: center;\n  text-decoration: none;\n  margin-top: 10px; \n  display: block;  \n}\n\n.ticket-history-button:hover {\n  background-image: linear-gradient(90deg, #006f84, #5ca742);\n\n}\n```\n```js\nfunction updateClock() {\n  const clock = document.getElementById('clock');\n  const iranTime = new Date().toeString('en-US', { timeZone: 'Asia/Tehran', hour12: false });\n  clock.textContent = iranTime.slice(-8);\n}\n\nsetInterval(updateClock, 1000);\n\nconst clockElement = document.getElementById('clock');\nconst clockMessage = document.getElementById('clockMessage');\nlet clickCount = 0;\n\nif (clockElement \u0026\u0026 clockMessage) {\n  clockElement.addEventListener('mouseenter', function() {\n    clockMessage.style.display = 'block';\n  });\n\n  clockElement.addEventListener('mouseleave', function() {\n    clockMessage.style.display = 'none';\n  });\n\n  clockElement.addEventListener('click', function() {\n    clickCount++;\n    if (clickCount \u003e= 5) {\n      alert(clockMessage.textContent);\n      clickCount = 0;\n    }\n  });\n} else {\n  console.error(\"Clock message element not found\");\n}\n\ndocument.getElementById('phoneIcon').addEventListener('click', function() {\n  const tooltip = document.getElementById('tooltip');\n  tooltip.style.display = tooltip.style.display === 'block' ? 'none' : 'block';\n});\n\ndocument.getElementById('submitButton').addEventListener('click', function(event) {\n    const inputFields = document.querySelectorAll('input[type=\"text\"], select, textarea');\n\n    let isFormValid = true;\n\n    inputFields.forEach(function(field) {\n        if (field.value.trim() === '') {\n            isFormValid = false;\n            field.style.border = '2px solid red'; \n        } else {\n            field.style.border = ''; \n        }\n    });\n\n    if (!isFormValid) {\n        const errorMessage = document.getElementById('errorMessage');\n        errorMessage.textContent = 'Fill all the fields';\n        errorMessage.style.display = 'block';\n        errorMessage.style.color = 'red';\n        event.preventDefault();  \n    }\n});\n```\n```python\ndef main(request):\n    if request.method == 'POST':\n        # Set the status field\n        request.POST = request.POST.copy()\n        request.POST['status'] = 'Pending'\n\n        form = TicketForm(request.POST, request.FILES)  \n\n        if form.is_valid():\n            name = form.cleaned_data['name']\n            lastname = form.cleaned_data['last_name']\n            department = form.cleaned_data['department_name']\n            request_type = form.cleaned_data['request_type']  \n            description = form.cleaned_data['description']\n            attachment = request.FILES.get('attachment')\n\n            ticket = Ticket(\n                user=request.user,\n                name=name,\n                last_name=lastname,\n                department_name=department,\n                request_type=request_type,\n                description=description,\n                attachment=attachment,\n                status='Pending',  \n            )\n            ticket.save()\n\n            return redirect('status')  \n    else:\n        form = TicketForm()\n\n    return render(request, 'main.html', {'form': form})\n\ndef locked(request):\n    return render(request, 'locked.html')\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghosts6%2Fticketsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghosts6%2Fticketsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghosts6%2Fticketsystem/lists"}