Browse Source

Remove herança de object (padrão no python 3)

pull/261/head
Marcio Mazza 9 years ago
parent
commit
9c81be950b
  1. 6
      compilacao/views.py
  2. 2
      crispy_layout_mixin.py
  3. 2
      crud.py
  4. 4
      legacy/migration.py
  5. 2
      legacy/router.py
  6. 2
      legacy/scripts/scrap_original_forms.py
  7. 2
      sessao/views.py

6
compilacao/views.py

@ -138,7 +138,7 @@ def choice_models_in_extenal_views():
return result
class CompMixin(object):
class CompMixin:
@property
def title(self):
@ -1002,7 +1002,7 @@ class DispositivoEditView(TextEditView):
return result
class ActionsEditMixin(object):
class ActionsEditMixin:
def render_to_json_response(self, context, **response_kwargs):
@ -1346,7 +1346,7 @@ class ActionsEditView(ActionsEditMixin, TemplateView):
return self.render_to_json_response(context, **response_kwargs)
class DispositivoSuccessUrlMixin(object):
class DispositivoSuccessUrlMixin:
def get_success_url(self):
return reverse_lazy(

2
crispy_layout_mixin.py

@ -65,7 +65,7 @@ def get_field_display(obj, fieldname):
return verbose_name, display
class CrispyLayoutFormMixin(object):
class CrispyLayoutFormMixin:
def get_layout(self):
filename = join(

2
crud.py

@ -170,7 +170,7 @@ class CrudDeleteMixin(FormMessagesMixin):
return self.list_url
class Crud(object):
class Crud:
def __init__(self, model, help_path,
base_mixin=BaseCrudMixin,

4
legacy/migration.py

@ -120,7 +120,7 @@ def exec_sql(sql, db='default'):
def iter_sql_records(sql, db):
class Record(object):
class Record:
pass
cursor = exec_sql(sql, db)
fieldnames = [name[0] for name in cursor.description]
@ -149,7 +149,7 @@ def make_stub(model, id):
return new
class DataMigrator(object):
class DataMigrator:
def __init__(self):
self.field_renames, self.model_renames = get_renames()

2
legacy/router.py

@ -1,4 +1,4 @@
class LegacyRouter(object):
class LegacyRouter:
def db_for_read(self, model, **hints):
if model._meta.app_label == 'legacy':

2
legacy/scripts/scrap_original_forms.py

@ -240,7 +240,7 @@ def extract_fieldsets_for_current(model):
raise Exception(e, model)
class Under(object):
class Under:
def __init__(self, arg):
self.arg = arg

2
sessao/views.py

@ -39,7 +39,7 @@ tipo_expediente_crud = Crud(TipoExpediente, 'tipo_expediente')
registro_votacao_crud = Crud(RegistroVotacao, '')
class PresencaMixin(object):
class PresencaMixin:
def get_parlamentares(self):
self.object = self.get_object()

Loading…
Cancel
Save