Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Midterm-Project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kyra Hung
Midterm-Project
Commits
b211f093
Commit
b211f093
authored
Mar 16, 2020
by
KY-2187
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated urls.py and views.py
parent
f50f7787
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
17 deletions
+42
-17
urls.py
Midterm Project/froyo/urls.py
+3
-0
views.py
Midterm Project/froyo/views.py
+37
-1
urls.py
Midterm Project/thegoodplace/urls.py
+2
-16
No files found.
Midterm Project/froyo/urls.py
0 → 100644
View file @
b211f093
from
django.conf.urls
import
urls
from
.views
import
IngredientsListView
\ No newline at end of file
Midterm Project/froyo/views.py
View file @
b211f093
from
django.shortcuts
import
render
from
django.views.generic
import
TemplateView
# Create your views here.
class
IngredientsListView
(
TemplateView
):
template_name
=
'ingredients_list.html'
class
IngredientsDetailView
(
TemplateView
):
template_name
=
'ingredients_detail.html'
class
IngredientsUpdateView
(
TemplateView
):
template_name
=
'ingredients_update_form.html'
class
IngredientsCreateView
(
TemplateView
):
template_name
=
'ingredients_create_form.html'
class
RecipesListView
(
TemplateView
):
template_name
=
'recipes_list.html'
class
RecipesDetailView
(
TemplateView
):
template_name
=
'recipes_detail.html'
class
RecipesUpdateView
(
TemplateView
):
template_name
=
'recipes_update_form.html'
class
RecipesCreateView
(
TemplateView
):
template_name
=
'recipes_create_form.html'
class
OrdersListView
(
TemplateView
):
template_name
=
'orders_list.html'
class
OrdersDetailView
(
TemplateView
):
template_name
=
'orders_detail.html'
class
OrdersUpdateView
(
TemplateView
):
template_name
=
'orders_update_form.html'
class
OrdersCreateView
(
TemplateView
):
template_name
=
'orders_create_form.html'
Midterm Project/thegoodplace/urls.py
View file @
b211f093
"""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
from
django.conf.urls
import
include
,
url
from
django.contrib
import
admin
urlpatterns
=
[
url
(
r'^admin/'
,
admin
.
site
.
urls
),
url
(
r''
,
include
(
'froyo.urls'
)
),
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment