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.
- [Django]-NameError: name 'RegexValidator' is not defined
- [Django]-Best way to incorporate external django app into a project and safely make local changes
0👍
Just a quick guess, but is this save method definately part of the CompanyProfile models class and is your indentation correct?
- [Django]-Django – button url
- [Django]-Django – how to restrict DeleteView to object owner
- [Django]-Boolean True/False/None
- [Django]-Django check if superuser in class-based view