diff --git a/Assets/MYContribution/mydjangoproject/db.sqlite3 b/Assets/MYContribution/mydjangoproject/db.sqlite3 new file mode 100644 index 0000000..e69de29 diff --git a/Assets/MYContribution/mydjangoproject/manage.py b/Assets/MYContribution/mydjangoproject/manage.py new file mode 100644 index 0000000..b01f30e --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/manage.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mydjangoproject.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() diff --git a/Assets/MYContribution/mydjangoproject/myapp/__init__.py b/Assets/MYContribution/mydjangoproject/myapp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Assets/MYContribution/mydjangoproject/myapp/__pycache__/__init__.cpython-37.pyc b/Assets/MYContribution/mydjangoproject/myapp/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..99d0738 Binary files /dev/null and b/Assets/MYContribution/mydjangoproject/myapp/__pycache__/__init__.cpython-37.pyc differ diff --git a/Assets/MYContribution/mydjangoproject/myapp/__pycache__/urls.cpython-37.pyc b/Assets/MYContribution/mydjangoproject/myapp/__pycache__/urls.cpython-37.pyc new file mode 100644 index 0000000..b4b0e38 Binary files /dev/null and b/Assets/MYContribution/mydjangoproject/myapp/__pycache__/urls.cpython-37.pyc differ diff --git a/Assets/MYContribution/mydjangoproject/myapp/__pycache__/views.cpython-37.pyc b/Assets/MYContribution/mydjangoproject/myapp/__pycache__/views.cpython-37.pyc new file mode 100644 index 0000000..1fb5b9d Binary files /dev/null and b/Assets/MYContribution/mydjangoproject/myapp/__pycache__/views.cpython-37.pyc differ diff --git a/Assets/MYContribution/mydjangoproject/myapp/admin.py b/Assets/MYContribution/mydjangoproject/myapp/admin.py new file mode 100644 index 0000000..ea5d68b --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/myapp/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/Assets/MYContribution/mydjangoproject/myapp/apps.py b/Assets/MYContribution/mydjangoproject/myapp/apps.py new file mode 100644 index 0000000..1e6e0e1 --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/myapp/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class MyappConfig(AppConfig): + name = 'myapp' diff --git a/Assets/MYContribution/mydjangoproject/myapp/migrations/__init__.py b/Assets/MYContribution/mydjangoproject/myapp/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Assets/MYContribution/mydjangoproject/myapp/models.py b/Assets/MYContribution/mydjangoproject/myapp/models.py new file mode 100644 index 0000000..fd18c6e --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/myapp/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/Assets/MYContribution/mydjangoproject/myapp/tests.py b/Assets/MYContribution/mydjangoproject/myapp/tests.py new file mode 100644 index 0000000..de8bdc0 --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/myapp/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/Assets/MYContribution/mydjangoproject/myapp/urls.py b/Assets/MYContribution/mydjangoproject/myapp/urls.py new file mode 100644 index 0000000..4f9cd93 --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/myapp/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('index/', views.index, name = 'index'), + path('home/', views.home, name = 'home') +] diff --git a/Assets/MYContribution/mydjangoproject/myapp/views.py b/Assets/MYContribution/mydjangoproject/myapp/views.py new file mode 100644 index 0000000..316e0ca --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/myapp/views.py @@ -0,0 +1,11 @@ +from django.shortcuts import render +from django.http import HttpResponse +# Create your views here. +def index(request): + # return HttpResponse("Hello This is my first django project" + return render(request, "index.html") +def home(request): + if request.method == "POST": + name = request.POST['keyword'] + print(name) + return HttpResponse(name) diff --git a/Assets/MYContribution/mydjangoproject/mydjangoproject/__init__.py b/Assets/MYContribution/mydjangoproject/mydjangoproject/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/__init__.cpython-37.pyc b/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..b9bddf6 Binary files /dev/null and b/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/__init__.cpython-37.pyc differ diff --git a/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/settings.cpython-37.pyc b/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/settings.cpython-37.pyc new file mode 100644 index 0000000..12014e7 Binary files /dev/null and b/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/settings.cpython-37.pyc differ diff --git a/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/urls.cpython-37.pyc b/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/urls.cpython-37.pyc new file mode 100644 index 0000000..4ff0ad3 Binary files /dev/null and b/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/urls.cpython-37.pyc differ diff --git a/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/wsgi.cpython-37.pyc b/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/wsgi.cpython-37.pyc new file mode 100644 index 0000000..9524a60 Binary files /dev/null and b/Assets/MYContribution/mydjangoproject/mydjangoproject/__pycache__/wsgi.cpython-37.pyc differ diff --git a/Assets/MYContribution/mydjangoproject/mydjangoproject/asgi.py b/Assets/MYContribution/mydjangoproject/mydjangoproject/asgi.py new file mode 100644 index 0000000..f4313ec --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/mydjangoproject/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for mydjangoproject 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/3.0/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mydjangoproject.settings') + +application = get_asgi_application() diff --git a/Assets/MYContribution/mydjangoproject/mydjangoproject/settings.py b/Assets/MYContribution/mydjangoproject/mydjangoproject/settings.py new file mode 100644 index 0000000..671267a --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/mydjangoproject/settings.py @@ -0,0 +1,120 @@ +""" +Django settings for mydjangoproject project. + +Generated by 'django-admin startproject' using Django 3.0.4. + +For more information on this file, see +https://docs.djangoproject.com/en/3.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/3.0/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'jzwnaaz==ke@27)50-4b@@g&f2v*9l$2pga*&+quihr+hr7h^4' + +# 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', +] + +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 = 'mydjangoproject.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(os.path.dirname('mydjangoproject'), 'templates'), ], + '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 = 'mydjangoproject.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/3.0/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/3.0/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/3.0/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/3.0/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/Assets/MYContribution/mydjangoproject/mydjangoproject/urls.py b/Assets/MYContribution/mydjangoproject/mydjangoproject/urls.py new file mode 100644 index 0000000..2edb1c3 --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/mydjangoproject/urls.py @@ -0,0 +1,22 @@ +"""mydjangoproject URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/3.0/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("myapp/", include("myapp.urls")) +] diff --git a/Assets/MYContribution/mydjangoproject/mydjangoproject/wsgi.py b/Assets/MYContribution/mydjangoproject/mydjangoproject/wsgi.py new file mode 100644 index 0000000..227d44c --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/mydjangoproject/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for mydjangoproject 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/3.0/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mydjangoproject.settings') + +application = get_wsgi_application() diff --git a/Assets/MYContribution/mydjangoproject/templates/home.html b/Assets/MYContribution/mydjangoproject/templates/home.html new file mode 100644 index 0000000..e69de29 diff --git a/Assets/MYContribution/mydjangoproject/templates/index.html b/Assets/MYContribution/mydjangoproject/templates/index.html new file mode 100644 index 0000000..5bb14ce --- /dev/null +++ b/Assets/MYContribution/mydjangoproject/templates/index.html @@ -0,0 +1,20 @@ + + + + + GitHub PrO Search + + + +

GitHub PrO Search

+ + + diff --git a/Assets/MYContribution/selenium_automation.py b/Assets/MYContribution/selenium_automation.py new file mode 100644 index 0000000..4ee7acc --- /dev/null +++ b/Assets/MYContribution/selenium_automation.py @@ -0,0 +1,37 @@ +from selenium import webdriver +from selenium.webdriver.common.action_chains import ActionChains +from github import Github +import time +import os +from lxml import html +def search_github_repo(keyword): + query = '+'.join(keyword) + 'in:readme + in:description' + result = g.search_repositories(query, 'updated', 'desc') + for repo in result: + print(repo) + return result +def get_my_searchkey(): + url = r"C:\Users\ayush\OneDrive\Desktop\WebDevelopment_Course\Automation_with_python\GitHub_Site.html" + File_object = open(url, "r") + keywords = html.fromstring(File_object.read()) + keyword = keywords.xpath("/html/body/ul/form/input[1]") + print(keyword) + return keyword +browser = webdriver.Chrome(executable_path= r"C:\Users\ayush\Downloads\chromedriver_win32\chromedriver.exe") +x = browser.get('https://github.com/') +sign_in_1 = browser.find_element_by_xpath("/html/body/div[1]/header/div/div[2]/div[2]/a[1]") +actions = ActionChains(browser) +actions.click(sign_in_1).perform() +username = browser.find_element_by_xpath('//*[@id="login_field"]') +username.send_keys("ayushi19031") +password = browser.find_element_by_xpath('//*[@id="password"]') +password.send_keys("ayushij27") +sign_in_2 = browser.find_element_by_xpath('//*[@id="login"]/form/div[4]/input[9]') +actions = ActionChains(browser) +actions.click(sign_in_2).perform() +keywords = get_my_searchkey() +ACCESS_TOKEN = '0870c0ff1c5d2e57d3b25500fe7a2fd1c12398a8' +g = Github(ACCESS_TOKEN) +g.get_user().get_repos() +keyword = get_my_searchkey() +search_github_repo(keyword) diff --git a/Assets/Wireframes/wf2/after_sign_up.png b/Assets/Wireframes/wf2/after_sign_up.png new file mode 100644 index 0000000..23f76d9 Binary files /dev/null and b/Assets/Wireframes/wf2/after_sign_up.png differ diff --git a/Assets/Wireframes/wf2/home_page.png b/Assets/Wireframes/wf2/home_page.png new file mode 100644 index 0000000..557a469 Binary files /dev/null and b/Assets/Wireframes/wf2/home_page.png differ diff --git a/Assets/Wireframes/wf2/project_guide.png b/Assets/Wireframes/wf2/project_guide.png new file mode 100644 index 0000000..06ff2c4 Binary files /dev/null and b/Assets/Wireframes/wf2/project_guide.png differ