Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Francia - Midterm
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
Alex Bernard Francia
Francia - Midterm
Commits
c9147998
Commit
c9147998
authored
Mar 17, 2020
by
Alex Bernard Francia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set up froyo views.py, urls.py. Edited thegoodplace urls.py.
parent
4d9a6cd4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
1 deletion
+84
-1
urls.py
froyo/urls.py
+38
-0
views.py
froyo/views.py
+44
-0
urls.py
thegoodplace/urls.py
+2
-1
No files found.
froyo/urls.py
0 → 100644
View file @
c9147998
from
django.conf.urls
import
url
# from .views import go_to_home_page
from
.views
import
go_to_ingredients_detail
from
.views
import
go_to_ingredients_list
from
.views
import
go_to_ingredients_update_form
from
.views
import
go_to_ingredients_create_form
from
.views
import
go_to_orders_create_form
from
.views
import
go_to_orders_detail
from
.views
import
go_to_orders_list
from
.views
import
go_to_orders_update_form
from
.views
import
go_to_recipes_create_form
from
.views
import
go_to_recipes_detail
from
.views
import
go_to_recipes_list
from
.views
import
go_to_recipes_update_form
urlpatterns
=
[
# url(r'^thegoodplace$', go_to_home_page,name='homepage'),
url
(
r'^ingredients/detail$'
,
go_to_ingredients_detail
,
name
=
'ingredients_detail'
),
url
(
r'^ingredients/list$'
,
go_to_ingredients_list
,
name
=
'ingredients_list'
),
url
(
r'^ingredients/update$'
,
go_to_ingredients_update_form
,
name
=
'ingredients_update_form'
),
url
(
r'^ingredients/create$'
,
go_to_ingredients_create_form
,
name
=
'ingredients_create_form'
),
url
(
r'^orders/detail$'
,
go_to_orders_detail
,
name
=
'orders_detail'
),
url
(
r'^orders/list$'
,
go_to_orders_list
,
name
=
'orders_list'
),
url
(
r'^orders/update$'
,
go_to_orders_update_form
,
name
=
'orders_update_form'
),
url
(
r'^orders/create$'
,
go_to_orders_create_form
,
name
=
'orders_create_form'
),
url
(
r'^recipes/detail$'
,
go_to_recipes_detail
,
name
=
'recipes_detail'
),
url
(
r'^recipes/list$'
,
go_to_recipes_list
,
name
=
'recipes_list'
),
url
(
r'^recipes/update$'
,
go_to_recipes_update_form
,
name
=
'recipes_update_form'
),
url
(
r'^recipes/create$'
,
go_to_recipes_create_form
,
name
=
'recipes_create_form'
),
]
\ No newline at end of file
froyo/views.py
View file @
c9147998
from
django.shortcuts
import
render
from
django.shortcuts
import
render
# from django.http import HttpResponse
def
go_to_ingredients_create_form
(
request
):
return
render
(
request
,
'ingredients_create_form.html'
)
def
go_to_ingredients_detail
(
request
):
return
render
(
request
,
"ingredients_detail.html"
)
def
go_to_ingredients_list
(
request
):
return
render
(
request
,
"ingredients_list.html"
)
def
go_to_ingredients_update_form
(
request
):
return
render
(
request
,
"ingredients_update_form.html"
)
def
go_to_orders_create_form
(
request
):
return
render
(
request
,
'orders_create_form.html'
)
def
go_to_orders_detail
(
request
):
return
render
(
request
,
"orders_detail.html"
)
def
go_to_orders_list
(
request
):
return
render
(
request
,
"orders_list.html"
)
def
go_to_orders_update_form
(
request
):
return
render
(
request
,
"orders_update_form.html"
)
def
go_to_recipes_create_form
(
request
):
return
render
(
request
,
'recipes_create_form.html'
)
def
go_to_recipes_detail
(
request
):
return
render
(
request
,
"recipes_detail.html"
)
def
go_to_recipes_list
(
request
):
return
render
(
request
,
"recipes_list.html"
)
def
go_to_recipes_update_form
(
request
):
return
render
(
request
,
"recipes_update_form.html"
)
# Create your views here.
# Create your views here.
thegoodplace/urls.py
View file @
c9147998
...
@@ -13,9 +13,10 @@ Including another URLconf
...
@@ -13,9 +13,10 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
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
from
django.contrib
import
admin
urlpatterns
=
[
urlpatterns
=
[
url
(
r'^admin/'
,
admin
.
site
.
urls
),
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