Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
project-1-Wang-Alec-185292
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
Alec
project-1-Wang-Alec-185292
Commits
bff0cdff
Commit
bff0cdff
authored
Mar 18, 2020
by
Alec Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added urls and views
parent
28755e2b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
2 deletions
+81
-2
db.sqlite3
thegoodplace/db.sqlite3
+0
-0
urls.py
thegoodplace/froyo/urls.py
+21
-0
views.py
thegoodplace/froyo/views.py
+57
-1
settings.py
thegoodplace/thegoodplace/settings.py
+1
-0
urls.py
thegoodplace/thegoodplace/urls.py
+2
-1
No files found.
thegoodplace/db.sqlite3
0 → 100644
View file @
bff0cdff
File added
thegoodplace/froyo/urls.py
View file @
bff0cdff
from
django.conf.urls
import
url
from
.views
import
*
urlpatterns
=
[
url
(
r'^$'
,
home
,
name
=
"home"
),
url
(
r'^ingredients_list/$'
,
ingredients_list
,
name
=
"ingredients_list"
),
url
(
r'^ingredients_update/$'
,
ingredients_update_form
,
name
=
"ingredients_update"
),
url
(
r'^ingredients_create/$'
,
ingredients_create_form
,
name
=
"ingredients_create"
),
url
(
r'^ingredients_detail/$'
,
ingredients_detail
,
name
=
"ingredients_detail"
),
url
(
r'^orders_list/$'
,
orders_list
,
name
=
"orders_list"
),
url
(
r'^orders_update/$'
,
orders_update_form
,
name
=
"orders_update"
),
url
(
r'^orders_create/$'
,
orders_create_form
,
name
=
"orders_create"
),
url
(
r'^orders_detail/$'
,
orders_detail
,
name
=
"orders_detail"
),
url
(
r'^recipes_list/$'
,
recipes_list
,
name
=
"recipes_list"
),
url
(
r'^recipes_update/$'
,
recipes_update_form
,
name
=
"recipes_update"
),
url
(
r'^recipes_create/$'
,
recipes_create_form
,
name
=
"recipes_create"
),
url
(
r'^recipes_detail/$'
,
recipes_detail
,
name
=
"recipes_detail"
),
]
thegoodplace/froyo/views.py
View file @
bff0cdff
from
django.shortcuts
import
render
# Create your views here.
# =============ingredients=================
def
ingredients_list
(
request
):
return
render
(
request
,
'ingredients_list.html'
)
def
ingredients_detail
(
request
):
return
render
(
request
,
'ingredients_detail.html'
)
def
ingredients_create_form
(
request
):
return
render
(
request
,
'ingredients_create_form.html'
)
def
ingredients_update_form
(
request
):
return
render
(
request
,
'ingredients_update_form.html'
)
# =============orders=================
def
orders_list
(
request
):
return
render
(
request
,
'orders_list.html'
)
def
orders_detail
(
request
):
return
render
(
request
,
'orders_detail.html'
)
def
orders_create_form
(
request
):
return
render
(
request
,
'orders_create_form.html'
)
def
orders_update_form
(
request
):
return
render
(
request
,
'orders_update_form.html'
)
# =============recipes=================
def
recipes_list
(
request
):
return
render
(
request
,
'recipes_list.html'
)
def
recipes_detail
(
request
):
return
render
(
request
,
'recipes_detail.html'
)
def
recipes_create_form
(
request
):
return
render
(
request
,
'recipes_create_form.html'
)
def
recipes_update_form
(
request
):
return
render
(
request
,
'recipes_update_form.html'
)
def
home
(
request
):
return
render
(
request
,
'home.html'
)
thegoodplace/thegoodplace/settings.py
View file @
bff0cdff
...
...
@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'froyo'
,
]
MIDDLEWARE
=
[
...
...
thegoodplace/thegoodplace/urls.py
View file @
bff0cdff
...
...
@@ -13,9 +13,10 @@ 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
url
,
include
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