diff --git a/team#14-{2}/HealthCare/HealthCare/__init__.py b/team#14-{2}/HealthCare/HealthCare/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/team#14-{2}/HealthCare/HealthCare/__pycache__/__init__.cpython-37.pyc b/team#14-{2}/HealthCare/HealthCare/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..7d108df Binary files /dev/null and b/team#14-{2}/HealthCare/HealthCare/__pycache__/__init__.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/HealthCare/__pycache__/settings.cpython-37.pyc b/team#14-{2}/HealthCare/HealthCare/__pycache__/settings.cpython-37.pyc new file mode 100644 index 0000000..abf2883 Binary files /dev/null and b/team#14-{2}/HealthCare/HealthCare/__pycache__/settings.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/HealthCare/__pycache__/urls.cpython-37.pyc b/team#14-{2}/HealthCare/HealthCare/__pycache__/urls.cpython-37.pyc new file mode 100644 index 0000000..ac83241 Binary files /dev/null and b/team#14-{2}/HealthCare/HealthCare/__pycache__/urls.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/HealthCare/__pycache__/wsgi.cpython-37.pyc b/team#14-{2}/HealthCare/HealthCare/__pycache__/wsgi.cpython-37.pyc new file mode 100644 index 0000000..934998a Binary files /dev/null and b/team#14-{2}/HealthCare/HealthCare/__pycache__/wsgi.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/HealthCare/settings.py b/team#14-{2}/HealthCare/HealthCare/settings.py new file mode 100644 index 0000000..29ead6b --- /dev/null +++ b/team#14-{2}/HealthCare/HealthCare/settings.py @@ -0,0 +1,126 @@ +""" +Django settings for HealthCare project. + +Generated by 'django-admin startproject' using Django 2.2.14. + +For more information on this file, see +https://docs.djangoproject.com/en/2.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.2/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/2.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '(p(4uv2oj-oe93@$nnj_6+p%kw3*cpdo79a=g#^x!6yub%*rp^' + +# 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', + 'health', +] + +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 = 'HealthCare.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': ['health/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 = 'HealthCare.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/2.2/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/2.2/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/2.2/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/2.2/howto/static-files/ + +STATIC_URL = '/static/' +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, 'static') +] +MEDIA_URL = '/media/' +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') \ No newline at end of file diff --git a/team#14-{2}/HealthCare/HealthCare/urls.py b/team#14-{2}/HealthCare/HealthCare/urls.py new file mode 100644 index 0000000..bf48e8c --- /dev/null +++ b/team#14-{2}/HealthCare/HealthCare/urls.py @@ -0,0 +1,30 @@ +"""HealthCare URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/2.2/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 +from health import views +from django.conf.urls.static import static +from HealthCare import settings + +urlpatterns = [ + path('admin/', admin.site.urls), + path('signup/',views.showsignuppage,name='signup'), + path('login/', views.loginpage,name='login'), + path('', views.home, name='home'), + path('CaloriesCalculator/', views.caloriescalculator,name='caloriesCalculator'), + path('logout/',views.logoutpage,name='logout'), + path('recomendation/',views.getrecomendation,name='recomendation'), +] +static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/team#14-{2}/HealthCare/HealthCare/wsgi.py b/team#14-{2}/HealthCare/HealthCare/wsgi.py new file mode 100644 index 0000000..ad6d5fd --- /dev/null +++ b/team#14-{2}/HealthCare/HealthCare/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for HealthCare 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/2.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'HealthCare.settings') + +application = get_wsgi_application() diff --git a/team#14-{2}/HealthCare/db.sqlite3 b/team#14-{2}/HealthCare/db.sqlite3 new file mode 100644 index 0000000..15b21ee Binary files /dev/null and b/team#14-{2}/HealthCare/db.sqlite3 differ diff --git a/team#14-{2}/HealthCare/health/__init__.py b/team#14-{2}/HealthCare/health/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/team#14-{2}/HealthCare/health/__pycache__/__init__.cpython-37.pyc b/team#14-{2}/HealthCare/health/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..3e3f900 Binary files /dev/null and b/team#14-{2}/HealthCare/health/__pycache__/__init__.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/health/__pycache__/admin.cpython-37.pyc b/team#14-{2}/HealthCare/health/__pycache__/admin.cpython-37.pyc new file mode 100644 index 0000000..6057246 Binary files /dev/null and b/team#14-{2}/HealthCare/health/__pycache__/admin.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/health/__pycache__/forms.cpython-37.pyc b/team#14-{2}/HealthCare/health/__pycache__/forms.cpython-37.pyc new file mode 100644 index 0000000..0af7345 Binary files /dev/null and b/team#14-{2}/HealthCare/health/__pycache__/forms.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/health/__pycache__/models.cpython-37.pyc b/team#14-{2}/HealthCare/health/__pycache__/models.cpython-37.pyc new file mode 100644 index 0000000..c340b6d Binary files /dev/null and b/team#14-{2}/HealthCare/health/__pycache__/models.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/health/__pycache__/views.cpython-37.pyc b/team#14-{2}/HealthCare/health/__pycache__/views.cpython-37.pyc new file mode 100644 index 0000000..08abf92 Binary files /dev/null and b/team#14-{2}/HealthCare/health/__pycache__/views.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/health/admin.py b/team#14-{2}/HealthCare/health/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/team#14-{2}/HealthCare/health/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/team#14-{2}/HealthCare/health/apps.py b/team#14-{2}/HealthCare/health/apps.py new file mode 100644 index 0000000..ea5593f --- /dev/null +++ b/team#14-{2}/HealthCare/health/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class HealthConfig(AppConfig): + name = 'health' diff --git a/team#14-{2}/HealthCare/health/forms.py b/team#14-{2}/HealthCare/health/forms.py new file mode 100644 index 0000000..8e126a2 --- /dev/null +++ b/team#14-{2}/HealthCare/health/forms.py @@ -0,0 +1,10 @@ +from django.forms import ModelForm +from django.contrib.auth.forms import UserCreationForm +from django.contrib.auth.models import User +from django import forms + + +class CreateUserForm(UserCreationForm): + class Meta: + model = User + fields = ['username','email', 'password1', 'password2'] \ No newline at end of file diff --git a/team#14-{2}/HealthCare/health/migrations/__init__.py b/team#14-{2}/HealthCare/health/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/team#14-{2}/HealthCare/health/migrations/__pycache__/__init__.cpython-37.pyc b/team#14-{2}/HealthCare/health/migrations/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..5220875 Binary files /dev/null and b/team#14-{2}/HealthCare/health/migrations/__pycache__/__init__.cpython-37.pyc differ diff --git a/team#14-{2}/HealthCare/health/models.py b/team#14-{2}/HealthCare/health/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/team#14-{2}/HealthCare/health/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/team#14-{2}/HealthCare/health/templates/caloriescalculator.html b/team#14-{2}/HealthCare/health/templates/caloriescalculator.html new file mode 100644 index 0000000..9164632 --- /dev/null +++ b/team#14-{2}/HealthCare/health/templates/caloriescalculator.html @@ -0,0 +1,279 @@ + + +{% load static %} +
+ + + + + + +| Name | +{{ calories.name }} | +
| Short Description | +{{ calories.Short_Description }} | +
| Energy | +{{ calories.Energy_in_Kcal }} Kcal | +
| Water | +{{ calories.Water }} % | +Protein | +{{ calories.Protein }} g | + +
| Carbohydrates | +{{ calories.Carbohydrates }} g | + +
| Calcium | +{{ calories.Calcium }} mg | +
| Iron | +{{ calories.Iron }} mg | +
| Cholestrol | +{{ calories.Cholestrol }} mg | +
| Vitamin C | +{{ calories.Vitamin_C }} mg | +
| Vitamin_b6 | +{{ calories.Vitamin_b6 }} mg | +
| Vitamin_b12 | +{{ calories.Vitamin_b12 }} mg | +
| Vitamin D | +{{ calories.Vitamin_D }} mg | +
| Vitamin A | +{{ calories.Vitamin_A }} mg | +
| Vitamin E | +{{ calories.Vitamin_E }} mg | +
| Sodium | +{{ calories.Sodium }} mg | +
| Zinc | +{{ calories.Zinc }} mg | +
| Copper | +{{ calories.Copper }} mg | +
It tells you about how much energy,protein,carbohydrates, mineral, vitamin etc your food contains. So that you know what you should actually eat to stay healthy.
+
+
+
+
+ It tells you about different type of varieties of a single product and how much protein ,fat ,carbohydrates etc are present in them. So that you know which variety of a product is more healthy to eat.
+{{message}}
+ {% endfor %} + +| Name | +{{ recom.Label }} | +
| Energy Kcal | +{{ recom.Energy_Kcal }} Kcal | +
| Fat | +{{ recom.Fat }} g | +
| Protein | +{{ recom.Protein }} g | +
| Total Carbohydrates | +{{ recom.Total_Carbohydrates }} g | +
| Category | +{{ recom.Category }} | +
`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n// Abbreviations\n//\n// 1. Duplicate behavior to the data-* attribute for our tooltip plugin\n// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Remove the bottom border in Firefox 39-.\n// 5. Prevent the text-decoration to be skipped.\n\nabbr[title],\nabbr[data-original-title] { // 1\n text-decoration: underline; // 2\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n border-bottom: 0; // 4\n text-decoration-skip-ink: none; // 5\n}\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // Undo browser default\n}\n\nblockquote {\n margin: 0 0 1rem;\n}\n\nb,\nstrong {\n font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari\n}\n\nsmall {\n @include font-size(80%); // Add the correct font size in all browsers\n}\n\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n//\n\nsub,\nsup {\n position: relative;\n @include font-size(75%);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n//\n// Links\n//\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n background-color: transparent; // Remove the gray background on active links in IE 10.\n\n @include hover() {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n color: inherit;\n text-decoration: none;\n\n @include hover() {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n//\n// Code\n//\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-monospace;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n}\n\npre {\n // Remove browser default top margin\n margin-top: 0;\n // Reset browser default of `1em` to use `rem`s\n margin-bottom: 1rem;\n // Don't allow content to break outside\n overflow: auto;\n // Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,\n // making it impossible to interact with the content\n -ms-overflow-style: scrollbar;\n}\n\n\n//\n// Figures\n//\n\nfigure {\n // Apply a consistent margin strategy (matches our type styles).\n margin: 0 0 1rem;\n}\n\n\n//\n// Images and content\n//\n\nimg {\n vertical-align: middle;\n border-style: none; // Remove the border on images inside links in IE 10-.\n}\n\nsvg {\n // Workaround for the SVG overflow bug in IE10/11 is still required.\n // See https://github.com/twbs/bootstrap/issues/26878\n overflow: hidden;\n vertical-align: middle;\n}\n\n\n//\n// Tables\n//\n\ntable {\n border-collapse: collapse; // Prevent double borders\n}\n\ncaption {\n padding-top: $table-cell-padding;\n padding-bottom: $table-cell-padding;\n color: $table-caption-color;\n text-align: left;\n caption-side: bottom;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `