[Django]-Django-admin: "super() argument 1 must be type, not None" when overriding save method

4👍

Maybe it’s a cyclic import issue?
http://markmail.org/message/zothlfayqkbidqfh#query:+page:1+mid:3cnpcw3e4cgo3cas+state:results

In the example here, he had an import statement in a signal that was the culprit.

You could check globals() for similar symptoms..

1👍

You need to use args/kwargs when overriding model methods: http://docs.djangoproject.com/en/dev/topics/db/models/#overriding-model-methods

It’s also important that you pass
through the arguments that can be
passed to the model method — that’s
what the *args, **kwargs bit does.
Django will, from time to time, extend
the capabilities of built-in model
methods, adding new arguments. If you
use *args, **kwargs in your method
definitions, you are guaranteed that
your code will automatically support
those arguments when they are added.

1👍

Try following the save() override example from the docs here. Note the use of *args, **kwargs. If that doesn’t work then something is serious messed up.

0👍

Just a quick guess, but is this save method definately part of the CompanyProfile models class and is your indentation correct?

Leave a comment