Browse Source

Correção de falha ao fazer rebase

pull/341/head
LeandroRoberto 9 years ago
parent
commit
bfcebb26f1
  1. 3
      crud/masterdetail.py
  2. 3
      parlamentares/forms.py
  3. 2
      protocoloadm/views.py

3
crud/masterdetail.py

@ -70,13 +70,10 @@ class MasterDetailCrud(Crud):
def get_url_regex(cls):
return r'^%s/(?P<pk>\d+)/delete$' % cls.model._meta.model_name
<<<<<<< c9325f593ff07366e8a4acc20bdfba1f54ce254e
def get_success_url(self):
pk = getattr(self.get_object(), self.crud.parent_field).pk
return self.resolve_url(LIST, args=(pk,))
=======
>>>>>>> Adiciona listagem ao crud mestre detalhe
@classonlymethod
def build(cls, model, parent_field, help_path):
crud = super(MasterDetailCrud, cls).build(model, help_path)

3
parlamentares/forms.py

@ -4,6 +4,7 @@ from django import forms
from django.db import transaction
from django.forms import ModelForm
from django.utils.translation import ugettext_lazy as _
from floppyforms.widgets import ClearableFileInput
import crispy_layout_mixin
import sapl
@ -23,7 +24,7 @@ class ParlamentarForm(ModelForm):
exclude = []
widgets = {'fotografia': sapl.utils.ImageThumbnailFileInput,
'biografia': forms.Textarea(
attrs={'id': 'texto-rico'})}
attrs={'id': 'texto-rico'})}
class ParlamentarCreateForm(ParlamentarForm):

2
protocoloadm/views.py

@ -3,7 +3,7 @@ from datetime import date, datetime
from braces.views import FormValidMessageMixin
from django.core.urlresolvers import reverse, reverse_lazy
from django.db.models import Q, Max
from django.db.models import Max, Q
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import redirect
from django.utils.translation import ugettext_lazy as _

Loading…
Cancel
Save