diff --git a/home.html b/home.html new file mode 100644 index 00000000..a2708f12 --- /dev/null +++ b/home.html @@ -0,0 +1,447 @@ + + + + + + + + DevDocsHub - Home + + + + + + + + + +
+ + + + + + + + + +
+

Building The Future of + +

+
+
+

We aim to empower students by providing comprehensive resources, tutorials, and guidance on technical skills such as web development, software engineering, data analysis, and machine learning, helping them excel in their careers and contribute to the future of technology.

+
+
+
+
+

You can search about any topic as per your interest

+ +
+
+ + +
+
+ ... +
+
+ Programming Languages
+

Explore comprehensive documentation for a wide range of programming languages such as Python,Javascript,Java,C++, and more.

+ Read More +
+
+
+
+
+ ... +
+
Open + Source Projects
+

Find documentation for popular open-source projects like Linux, + Kubernetes,Docker and more. Get benefit from a global community of developers, users, + and enthusiasts.

+ Read More +
+
+
+
+
+ ... +
+
+ Tutorials & Guides
+

Access Step By Step tutorials and guides to help you get started with + new technologies to enhance you skills. These are designed to give you a space to engage + more actively with the course content.

+ Read More +
+
+
+ + +
+
+
+
+

Connect with us:

+
+ + + +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/tutorials.html b/tutorials.html new file mode 100644 index 00000000..b9d2af14 --- /dev/null +++ b/tutorials.html @@ -0,0 +1,120 @@ +{% extends "base.html" %} {% block title %}Tutorials & Guides{% endblock %} {% +block body %} + + + +
+

Tutorials for Programming Languages

+ +
+{% endblock %} diff --git a/urls.py b/urls.py new file mode 100644 index 00000000..85ab39b8 --- /dev/null +++ b/urls.py @@ -0,0 +1,21 @@ +from django.urls import path +from . import views + + +urlpatterns = [ + path("", views.home, name="home"), + path("about/", views.about, name="about"), + path("contact/", views.contact, name="contact"), + path( + "language//", + views.documentation_list, + name="documentation_list", + ), + path("search/", views.search_language, name="search_language"), + path( + "programming_languages_info/", + views.programming_languages_info, + name="programming_languages_info", + ), + path("tutorials/", views.tutorials, name="tutorials"), +] diff --git a/views.py b/views.py new file mode 100644 index 00000000..207214a0 --- /dev/null +++ b/views.py @@ -0,0 +1,44 @@ +from django.shortcuts import render +from .models import ProgrammingLanguage, Documentation +from django.shortcuts import get_object_or_404, redirect +from django.http import JsonResponse + + +def home(request): + languages = ProgrammingLanguage.objects.all() + return render(request, 'home.html', {'languages': languages}) + + +def documentation_list(request, language_id): + language = ProgrammingLanguage.objects.get(id=language_id) + docs = Documentation.objects.filter(language=language) + return render(request, 'docs_list.html', {'language': language, 'docs': docs}) + + +def search_language(request): + query = request.GET.get('name', '') + if query: + languages = ProgrammingLanguage.objects.filter(name__icontains=query) + if languages.exists(): + language = languages.first() + return redirect(language.official_website) + return JsonResponse({'error': 'No programming language found'}, status=404) + + +def about(request): + return render(request, 'html/about.html') + + +def contact(request): + return render(request, 'html/contact_us.html') + + +def programming_languages_info(request): + return render(request, 'programming_languages_info.html') + + + + + +def tutorials(request): + return render(request, "tutorials.html")