Commit d6e27b75 authored by Cian Laguesma's avatar Cian Laguesma

Merge branch 'develop' into 'master'

Develop

See merge request !1
parents c9aa5ce9 f0b85398
geckodriver.log
geckodriver.exe
db.sqlite3
env/
__pycache__
*.pyc
.vscode
\ No newline at end of file
{
"python.pythonPath": "env\\Scripts\\python.exe"
}
\ No newline at end of file
# thegoodplace-Laguesma
Run virtualenv by .\env\Scripts\activate
Run the server by python manage.py runserver
Run the tests by python functional_tests.py
\ No newline at end of file
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class FroyoConfig(AppConfig):
name = 'froyo'
from django.db import models
# Create your models here.
<html>
<head>
<title>The Good Place FroYo Shop</title>
<h1 id="header_home">The Good Place Froyo Shop</h1>
</head>
<body>
<ul>
<li><a href="http://localhost:8000/ingredients/create_form" id="ingredients_create_form">Create form for Ingredients</a></li>
<li><a href="http://localhost:8000/ingredients/update_form" id="ingredients_update_form">Update form for Ingredients</a></li>
<li><a href="http://localhost:8000/ingredients/list" id="ingredients_list">See List for all Ingredients</a></li>
<li><a href="http://localhost:8000/ingredients/detail" id="ingredients_detail">See Details for an Ingredient</a></li>
<li><a href="http://localhost:8000/recipes/create_form" id="recipe_create_form">Create form for Recipe</a></li>
<li><a href="http://localhost:8000/recipes/update_form" id="recipe_update_form">Update form for Recipe</a></li>
<li><a href="http://localhost:8000/recipes/list" id="recipe_list">See List for all Recipes</a></li>
<li><a href="http://localhost:8000/recipes/detail" id="recipe_detail">See Details for a Recipe</a></li>
<li><a href="http://localhost:8000/orders/create_form" id="orders_create_form">Create form for Orders</a></li>
<li><a href="http://localhost:8000/orders/update_form" id="orders_update_form">Update form for Orders</a></li>
<li><a href="http://localhost:8000/orders/list" id="orders_list">See List for all Orders</a></li>
<li><a href="http://localhost:8000/orders/detail" id="orders_detail">See Details for an Order</a></li>
</ul>
</body>
</html>
<html>
<head>
<h1 id="ingredients_create_form_header">Ingredients - Create Form</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="ingredients_detail_header">Ingredients - Detail</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="ingredients_list_header">Ingredients - List</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="ingredients_update_form_header">Ingredients - Update Form</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="orders_create_form_header">Orders - Create Form</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="orders_detail_header">Orders - Detail</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="orders_list_header">Orders - List</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="orders_update_form_header">Orders - Update Form</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="recipes_create_form_header">Recipes - Create Form</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="recipes_detail_header">Recipes - Detail</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="recipes_list_header">Recipes - List</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
<html>
<head>
<h1 id="recipes_update_form_header">Recipes - Update Form</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
</html>
from django.test import TestCase
# Create your tests here.
from django.conf.urls import url
from .views import ingredients_list, ingredients_detail, ingredients_update_form, ingredients_create_form, recipes_list, recipes_detail, recipes_update_form, recipes_create_form, orders_list, orders_detail, orders_update_form, orders_create_form, home_page
urlpatterns = [
url(r'^index$', home_page.as_view(), name='home_page'),
url(r'^ingredients/list$', ingredients_list.as_view(), name='ingredients_list'),
url(r'^ingredients/detail$', ingredients_detail.as_view(), name='ingredients_detail'),
url(r'^ingredients/update_form$', ingredients_update_form.as_view(), name='ingredients_update_form'),
url(r'^ingredients/create_form$', ingredients_create_form.as_view(), name='ingredients_create_form'),
url(r'^recipes/list$', recipes_list.as_view(), name='recipes_list'),
url(r'^recipes/detail$', recipes_detail.as_view(), name='recipes_detail'),
url(r'^recipes/update_form$', recipes_update_form.as_view(), name='recipes_update_form'),
url(r'^recipes/create_form$', recipes_create_form.as_view(), name='recipes_create_form'),
url(r'^orders/list$', orders_list.as_view(), name='orders_list'),
url(r'^orders/detail$', orders_detail.as_view(), name='orders_detail'),
url(r'^orders/update_form$', orders_update_form.as_view(), name='orders_update_form'),
url(r'^orders/create_form$', orders_create_form.as_view(), name='recipes_create_form'),
]
from django.views.generic.base import TemplateView
class home_page(TemplateView):
template_name = 'index.html'
class ingredients_list(TemplateView):
template_name = 'ingredients_list.html'
class ingredients_detail(TemplateView):
template_name = 'ingredients_detail.html'
class ingredients_update_form(TemplateView):
template_name = 'ingredients_update_form.html'
class ingredients_create_form(TemplateView):
template_name = 'ingredients_create_form.html'
class recipes_list(TemplateView):
template_name = 'recipes_list.html'
class recipes_detail(TemplateView):
template_name = 'recipes_detail.html'
class recipes_update_form(TemplateView):
template_name = 'recipes_update_form.html'
class recipes_create_form(TemplateView):
template_name = 'recipes_create_form.html'
class orders_list(TemplateView):
template_name = 'orders_list.html'
class orders_detail(TemplateView):
template_name = 'orders_detail.html'
class orders_update_form(TemplateView):
template_name = 'orders_update_form.html'
class orders_create_form(TemplateView):
template_name = 'orders_create_form.html'
# Create your views here.
This diff is collapsed.
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "thegoodplace.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django
except ImportError:
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?"
)
raise
execute_from_command_line(sys.argv)
"""
Django settings for thegoodplace project.
Generated by 'django-admin startproject' using Django 1.11.17.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/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/1.11/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'hi_iyz-t$s^l54o-h!v#w9@6r(t+lk*u85iu8w2@o#$%5yo^l5'
# 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',
'froyo',
]
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 = 'thegoodplace.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'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 = 'thegoodplace.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.11/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/1.11/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/1.11/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/1.11/howto/static-files/
STATIC_URL = '/static/'
"""thegoodplace URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url,include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'',include("froyo.urls"))
]
\ No newline at end of file
"""
WSGI config for thegoodplace 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/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "thegoodplace.settings")
application = get_wsgi_application()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment