|
@ -3,7 +3,7 @@ from django.core.urlresolvers import reverse_lazy |
|
|
from django.views.generic import CreateView, DeleteView, ListView, UpdateView, DetailView |
|
|
from django.views.generic import CreateView, DeleteView, ListView, UpdateView, DetailView |
|
|
|
|
|
|
|
|
from sessao.models import SessaoPlenaria |
|
|
from sessao.models import SessaoPlenaria |
|
|
|
|
|
from .forms import SessaoPlenariaForm |
|
|
|
|
|
|
|
|
class SessaoPlenariaListView(ListView): |
|
|
class SessaoPlenariaListView(ListView): |
|
|
model = SessaoPlenaria |
|
|
model = SessaoPlenaria |
|
@ -15,8 +15,8 @@ class SessaoPlenariaDetailView(DetailView): |
|
|
|
|
|
|
|
|
class SessaoPlenariaCreateView(CreateView): |
|
|
class SessaoPlenariaCreateView(CreateView): |
|
|
model = SessaoPlenaria |
|
|
model = SessaoPlenaria |
|
|
fields = [f.name for f in SessaoPlenaria._meta.fields] |
|
|
# fields = [f.name for f in SessaoPlenaria._meta.fields] |
|
|
|
|
|
form_class = SessaoPlenariaForm |
|
|
form_invalid_message = u"Something went wrong, post was not saved" |
|
|
form_invalid_message = u"Something went wrong, post was not saved" |
|
|
|
|
|
|
|
|
success_url = reverse_lazy('sessao_list') |
|
|
success_url = reverse_lazy('sessao_list') |
|
|