Remove unnecessary form

This commit is contained in:
Daniel Greenfeld 2015-08-03 22:22:03 -07:00
parent 9bb3f08ea3
commit 48721b3d32
2 changed files with 1 additions and 18 deletions

View File

@ -1,16 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django import forms
from .models import User
class UserForm(forms.ModelForm):
class Meta:
# Set this form to use the User model.
model = User
# Constrain the UserForm to just the name field.
fields = ("name", )

View File

@ -6,7 +6,6 @@ from django.views.generic import DetailView, ListView, RedirectView, UpdateView
from braces.views import LoginRequiredMixin
from .forms import UserForm
from .models import User
@ -27,7 +26,7 @@ class UserRedirectView(LoginRequiredMixin, RedirectView):
class UserUpdateView(LoginRequiredMixin, UpdateView):
form_class = UserForm
fields = ['name', ]
# we already imported User in the view code above, remember?
model = User