Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CSCI 40 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
Li Niko M. Arceo
CSCI 40 Midterm Project
Commits
18eb025f
Commit
18eb025f
authored
Mar 12, 2020
by
Li Niko M. Arceo
🦈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urls.py should be setup
parent
7d00c34a
Pipeline
#962
canceled with stages
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
3 deletions
+33
-3
home.html
froyo/templates/home.html
+3
-0
tests.py
froyo/tests.py
+5
-1
urls.py
froyo/urls.py
+19
-0
views.py
froyo/views.py
+3
-0
urls.py
thegoodplace/urls.py
+3
-2
No files found.
froyo/templates/home.html
0 → 100644
View file @
18eb025f
<html>
<title>
Home
</title>
</html>
\ No newline at end of file
froyo/tests.py
View file @
18eb025f
from
django.test
import
TestCase
# Create your tests here.
class
HomePageTest
(
TestCase
):
def
test_uses_home_template
(
self
):
response
=
self
.
client
.
get
(
'/'
)
self
.
assertTemplateUsed
(
response
,
'home.html'
)
froyo/urls.py
0 → 100644
View file @
18eb025f
from
django.conf.urls
import
url
from
.views
import
HomeView
,
IngredientsList
urlpatterns
=
[
url
(
r'^$'
,
HomeView
,
name
=
'home_page'
),
url
(
r'^ingredients/list$'
,
IngredientsList
.
as_view
(),
name
=
'ingredients-list'
),
url
(
r'^ingredients/detail$'
,
IngredientsDetail
.
as_view
(),
name
=
'ingredients-detail'
),
url
(
r'^ingredients/update$'
,
IngredientsUpdate
.
as_view
(),
name
=
'ingredients-update'
),
url
(
r'^ingredients/create$'
,
IngredientsCreate
.
as_view
(),
name
=
'ingredients-create'
),
url
(
r'^recipes/list$'
,
RecipesList
.
as_view
(),
name
=
'recipes-list'
),
url
(
r'^recipes/detail$'
,
RecipesDetail
.
as_view
(),
name
=
'recipes-detail'
),
url
(
r'^recipes/update$'
,
RecipesUpdate
.
as_view
(),
name
=
'recipes-update'
),
url
(
r'^recipes/create$'
,
RecipesCreate
.
as_view
(),
name
=
'recipes-create'
),
url
(
r'^orders/list$'
,
OrdersList
.
as_view
(),
name
=
'orders-list'
),
url
(
r'^orders/detail$'
,
OrdersDetail
.
as_view
(),
name
=
'orders-detail'
),
url
(
r'^orders/update$'
,
OrdersUpdate
.
as_view
(),
name
=
'orders-update'
),
url
(
r'^orders/create$'
,
OrdersCreate
.
as_view
(),
name
=
'orders-create'
),
]
froyo/views.py
View file @
18eb025f
from
django.views.generic.base
import
TemplateView
class
HomeView
(
TemplateView
):
template_name
=
"home.html"
#ingredients model
class
IngredientsList
(
TemplateView
):
template_name
=
"ingredients_list.html"
...
...
thegoodplace/urls.py
View file @
18eb025f
...
...
@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from
django.contrib
import
admin
from
django.
urls
import
path
from
django.
conf.urls
import
include
,
url
urlpatterns
=
[
path
(
'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