Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bonnegent Sebastien
vehicules
Commits
2d3abed3
Commit
2d3abed3
authored
Nov 19, 2018
by
Bonnegent Sebastien
Browse files
vue générique
parent
70441ab0
Changes
1
Hide whitespace changes
Inline
Side-by-side
garage/views.py
View file @
2d3abed3
from
django.shortcuts
import
render
from
.models
import
Garage
,
Vehicule
from
django.views.generic
import
ListView
from
django.views.generic
import
edit
from
django.views
import
generic
def
home
(
request
):
return
render
(
request
,
'garage/home.html'
,
{})
class
GarageList
(
ListView
):
class
GarageList
(
generic
.
ListView
):
model
=
Garage
def
get_context_data
(
self
,
**
kwargs
):
...
...
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