Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
cd621477
Commit
cd621477
authored
Jan 05, 2015
by
Daniel W Bond
Browse files
create view, imported forms
parent
d6de3795
Changes
1
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/views.py
View file @
cd621477
...
@@ -3,9 +3,17 @@ from django.shortcuts import render
...
@@ -3,9 +3,17 @@ from django.shortcuts import render
from
django.views.generic
import
DetailView
,
ListView
,
CreateView
,
UpdateView
,
DeleteView
from
django.views.generic
import
DetailView
,
ListView
,
CreateView
,
UpdateView
,
DeleteView
from
accounts.models
import
Student
from
accounts.models
import
Student
from
accounts.forms
import
StudentForm
from
braces.views
import
LoginRequiredMixin
from
braces.views
import
LoginRequiredMixin
# create a student
class
CreateStudent
(
LoginRequiredMixin
,
CreateView
):
model
=
Student
form_class
=
StudentForm
success_url
=
'/'
#redirect location tba
login_url
=
'/'
# details about the student
# details about the student
class
DetailStudent
(
LoginRequiredMixin
,
DetailView
):
class
DetailStudent
(
LoginRequiredMixin
,
DetailView
):
model
=
Student
model
=
Student
...
...
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