Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9619f5a
User Form added
ingenium-cipher Dec 18, 2019
6ef9218
implemented step 2
ingenium-cipher Dec 19, 2019
419d6a1
Updated DBer details and change password feature added
ingenium-cipher Dec 20, 2019
6b4d3a1
Updated DBer details and change password feature added
ingenium-cipher Dec 20, 2019
7e700e2
Added search facility and mailing system
ingenium-cipher Dec 20, 2019
00770a3
User Profile added
ingenium-cipher Dec 21, 2019
8d359b8
requirements.txt added
ingenium-cipher Dec 21, 2019
9036182
requirements.txt added
ingenium-cipher Dec 21, 2019
0a830ff
Error corrected
ingenium-cipher Dec 22, 2019
9a4628c
Error corrected
ingenium-cipher Dec 22, 2019
628405f
Frontend improved
ingenium-cipher Dec 22, 2019
26f1056
Frontend improved
ingenium-cipher Dec 22, 2019
e19ee6c
Frontend improved
ingenium-cipher Dec 22, 2019
4b75208
requirements.txt modified
ingenium-cipher Dec 23, 2019
54c2154
STATIC_ROOT added
ingenium-cipher Dec 23, 2019
b11fa1c
django-heroku installed
ingenium-cipher Dec 23, 2019
0d1aa41
django-heroku installed
ingenium-cipher Dec 23, 2019
7c2b5dc
Procfile modified
ingenium-cipher Dec 23, 2019
c9ddca5
Procfile modified
ingenium-cipher Dec 23, 2019
9304c59
Procfile added in manage.py folder
ingenium-cipher Dec 23, 2019
9307461
Procfile back to main folder
ingenium-cipher Dec 23, 2019
b229531
Procfile modified
ingenium-cipher Dec 23, 2019
fa12aaa
Procfile modified
ingenium-cipher Dec 23, 2019
793d9ff
Project_dir added
ingenium-cipher Dec 23, 2019
888176f
Procfile modified
ingenium-cipher Dec 23, 2019
601ce35
Procfile and runtime.txt updated
ingenium-cipher Dec 23, 2019
f5a243b
psycopg2_binary added
ingenium-cipher Dec 23, 2019
c0ff0c2
requirements.txt modified
ingenium-cipher Dec 23, 2019
be32a8a
Procfile updated
ingenium-cipher Dec 23, 2019
5d99f07
psycopg2 installed
ingenium-cipher Dec 23, 2019
17f7544
Procfile updated
ingenium-cipher Dec 23, 2019
f9fce8f
Procfile updated
ingenium-cipher Dec 23, 2019
cfbaa0f
Procfile updated
ingenium-cipher Dec 23, 2019
49dedf1
requirements.txt updated
ingenium-cipher Dec 23, 2019
03f80b1
Procfile updated
ingenium-cipher Dec 23, 2019
776484a
Procfile updated
ingenium-cipher Dec 23, 2019
94a7122
Procfile etc. shifted
ingenium-cipher Dec 23, 2019
432f9ec
Procfile etc. deleted
ingenium-cipher Dec 23, 2019
1b5262e
Folder locations changed
ingenium-cipher Dec 23, 2019
27b1b79
Procfile updated
ingenium-cipher Dec 23, 2019
7f604d1
Changes in views
ingenium-cipher Dec 23, 2019
1d7888c
Views updated
ingenium-cipher Dec 23, 2019
d4f001c
Updated views
ingenium-cipher Dec 23, 2019
774876f
Views Updated
ingenium-cipher Dec 23, 2019
69ef4fa
Views updated
ingenium-cipher Dec 23, 2019
3da6801
automatic city in excel
ingenium-cipher Dec 23, 2019
5392ee7
Made credentials private
ingenium-cipher Dec 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
secrets.py
Empty file added DBPortal/__init__.py
Empty file.
Binary file added DBPortal/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added DBPortal/__pycache__/secrets.cpython-36.pyc
Binary file not shown.
Binary file added DBPortal/__pycache__/settings.cpython-36.pyc
Binary file not shown.
Binary file added DBPortal/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file added DBPortal/__pycache__/wsgi.cpython-36.pyc
Binary file not shown.
16 changes: 16 additions & 0 deletions DBPortal/asgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
ASGI config for DBPortal 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', 'DBPortal.settings')

application = get_asgi_application()
146 changes: 146 additions & 0 deletions DBPortal/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
"""
Django settings for DBPortal project.

Generated by 'django-admin startproject' using Django 3.0.

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
import django_heroku
from . import secrets

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATE_DIR = os.path.join(BASE_DIR, "templates")
STATIC_DIR = os.path.join(BASE_DIR, "static")

# 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 = secrets.SECRET_KEY

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
'users.apps.UsersConfig',
'rest_framework',
'crispy_forms',
'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 = 'DBPortal.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [TEMPLATE_DIR],
'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 = 'DBPortal.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/

PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
STATIC_URL = '/static/'
STATICFILES_DIRS = [
STATIC_DIR,
]

MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'

SEND_GRID_API_KEY = secrets.SEND_GRID_API_KEY

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = secrets.EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = secrets.EMAIL_HOST_PASSWORD
EMAIL_PORT = 587

CRISPY_TEMPLATE_PACK = 'bootstrap4'

django_heroku.settings(locals())
29 changes: 29 additions & 0 deletions DBPortal/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""DBPortal 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
from django.conf import settings
from django.conf.urls.static import static


urlpatterns = [
path('admin/', admin.site.urls),
path('', include('users.urls')),
path('api-auth/', include('rest_framework.urls')),
]

if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
16 changes: 16 additions & 0 deletions DBPortal/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for DBPortal 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', 'DBPortal.settings')

application = get_wsgi_application()
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn DBPortal.wsgi
Binary file added db.sqlite3
Binary file not shown.
Binary file added dbportal/bin/__pycache__/django-admin.cpython-36.pyc
Binary file not shown.
Binary file added dbportal/bin/__pycache__/runxlrd.cpython-36.pyc
Binary file not shown.
Binary file not shown.
76 changes: 76 additions & 0 deletions dbportal/bin/activate
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This file must be used with "source bin/activate" *from bash*
# you cannot run it directly

deactivate () {
# reset old environment variables
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
PATH="${_OLD_VIRTUAL_PATH:-}"
export PATH
unset _OLD_VIRTUAL_PATH
fi
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
export PYTHONHOME
unset _OLD_VIRTUAL_PYTHONHOME
fi

# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r
fi

if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1:-}"
export PS1
unset _OLD_VIRTUAL_PS1
fi

unset VIRTUAL_ENV
if [ ! "$1" = "nondestructive" ] ; then
# Self destruct!
unset -f deactivate
fi
}

# unset irrelevant variables
deactivate nondestructive

VIRTUAL_ENV="/home/ayush/Desktop/github/DBPortal/dbportal"
export VIRTUAL_ENV

_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/bin:$PATH"
export PATH

# unset PYTHONHOME if set
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
# could use `if (set -u; : $PYTHONHOME) ;` in bash
if [ -n "${PYTHONHOME:-}" ] ; then
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
unset PYTHONHOME
fi

if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
_OLD_VIRTUAL_PS1="${PS1:-}"
if [ "x(dbportal) " != x ] ; then
PS1="(dbportal) ${PS1:-}"
else
if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
# special case for Aspen magic directories
# see http://www.zetadev.com/software/aspen/
PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
else
PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
fi
fi
export PS1
fi

# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r
fi
37 changes: 37 additions & 0 deletions dbportal/bin/activate.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file must be used with "source bin/activate.csh" *from csh*.
# You cannot run it directly.
# Created by Davide Di Blasi <davidedb@gmail.com>.
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>

alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate'

# Unset irrelevant variables.
deactivate nondestructive

setenv VIRTUAL_ENV "/home/ayush/Desktop/github/DBPortal/dbportal"

set _OLD_VIRTUAL_PATH="$PATH"
setenv PATH "$VIRTUAL_ENV/bin:$PATH"


set _OLD_VIRTUAL_PROMPT="$prompt"

if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
if ("dbportal" != "") then
set env_name = "dbportal"
else
if (`basename "VIRTUAL_ENV"` == "__") then
# special case for Aspen magic directories
# see http://www.zetadev.com/software/aspen/
set env_name = `basename \`dirname "$VIRTUAL_ENV"\``
else
set env_name = `basename "$VIRTUAL_ENV"`
endif
endif
set prompt = "[$env_name] $prompt"
unset env_name
endif

alias pydoc python -m pydoc

rehash
Loading