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