Commit 30a044c8 authored by Daniel W Bond's avatar Daniel W Bond

added form_class to create and update views to lookout app as well

parent a082f9e7
......@@ -32,7 +32,7 @@ SRCT Bookshare • Create Lookout
<div class="panel-body">
<div class="row">
<div class="col-md-10 col-md-offset-1">
{% crispy my_form %}
{% crispy form %}
</div>
</div>
</div>
......
......@@ -16,19 +16,11 @@ from core.models import Student
class CreateLookout(LoginRequiredMixin, CreateView):
model = Lookout
fields = ['isbn', ]
form_class = LookoutForm
context_object_name = 'lookout'
template_name = 'create_lookout.html'
login_url = 'login'
def get_context_data(self, **kwargs):
context = super(CreateLookout, self).get_context_data(**kwargs)
form = LookoutForm()
context['my_form'] = form
return context
def form_valid(self, form):
me = self.request.user.student
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment